> For the complete documentation index, see [llms.txt](https://book.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.bsdcn.org/man/man4/sbp_targ.4.md).

# sbp\_targ.4

`sbp_targ` — Serial Bus Protocol 2 (SBP-2) 目标模式设备驱动

## 名称

`sbp_targ`

## 概要

若要将此驱动程序编译进内核，请在你的内核配置文件中加入以下行：

> device sbp\_targ device firewire device scbus device targ

或者，若要在引导时以模块方式加载驱动程序，在 loader.conf(5) 中加入以下行：

```sh
firewire_load="YES"
cam_load="YES"
sbp_targ_load"YES"
```

## 描述

`sbp_targ` 驱动提供对 SBP-2 目标模式的支持。此驱动应与 cam(4)、[targ(4)](/man/man4/targ.4.md) 和 [firewire(4)](/man/man4/firewire.4.md) 一起工作。你还需要使用 scsi\_target(8)，可在 **`/usr/share/examples/scsi_target`** 中找到，以提供实际设备。

## 实例

```sh
# mdconfig -a -t malloc -s 10m
md0
# scsi_target 0:0:0 /dev/md0
（假设 sbp_targ0 在 scbus0 上）
```

## 参见

cam(4), [firewire(4)](/man/man4/firewire.4.md), [targ(4)](/man/man4/targ.4.md), [camcontrol(8)](/man/man8/camcontrol.8.md), fwcontrol(8), [kldload(8)](/man/man8/kldload.8.md), scsi\_target(8)

## 作者

`sbp_targ` 驱动由 Hidetoshi Shimokawa 编写。

## 缺陷

此驱动尚不可用。在多发起方环境中或总线拓扑更改后无法正确工作。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://book.bsdcn.org/man/man4/sbp_targ.4.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
