Deleted Added
full compact
scsi.4 (193204) scsi.4 (204704)
1.\" Copyright (c) 1996
2.\" Julian Elischer <julian@FreeBSD.org>. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 9 unchanged lines hidden (view full) ---

18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\" SUCH DAMAGE.
25.\"
1.\" Copyright (c) 1996
2.\" Julian Elischer <julian@FreeBSD.org>. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 9 unchanged lines hidden (view full) ---

18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\" SUCH DAMAGE.
25.\"
26.\" $FreeBSD: head/share/man/man4/scsi.4 193204 2009-06-01 06:52:03Z jmallett $
27.Dd October 15, 1998
28.Dt SCSI 4
26.\" $FreeBSD: head/share/man/man4/scsi.4 204704 2010-03-04 10:59:21Z mav $
27.Dd March 4, 2010
28.Dt CAM 4
29.Os
30.Sh NAME
29.Os
30.Sh NAME
31.Nm SCSI ,
32.Nm CAM
31.Nm CAM
33.Nd CAM SCSI subsystem
32.Nd Common Access Method SCSI/ATA subsystem
34.Sh SYNOPSIS
35.Cd "device scbus"
33.Sh SYNOPSIS
34.Cd "device scbus"
35.Cd "device ada"
36.Cd "device cd"
37.Cd "device ch"
38.Cd "device da"
39.Cd "device pass"
40.Cd "device pt"
41.Cd "device sa"
42.Cd "options CAMDEBUG"
43.Cd "options CAM_DEBUG_BUS=-1"
44.Cd "options CAM_DEBUG_TARGET=-1"
45.Cd "options CAM_DEBUG_LUN=-1"
46.Cd "options CAM_DEBUG_FLAGS=CAM_DEBUG_INFO|CAM_DEBUG_CDB"
47.Cd "options CAM_MAX_HIGHPOWER=4"
48.Cd "options SCSI_NO_SENSE_STRINGS"
49.Cd "options SCSI_NO_OP_STRINGS"
50.Cd "options SCSI_DELAY=8000"
51.Sh DESCRIPTION
36.Cd "device cd"
37.Cd "device ch"
38.Cd "device da"
39.Cd "device pass"
40.Cd "device pt"
41.Cd "device sa"
42.Cd "options CAMDEBUG"
43.Cd "options CAM_DEBUG_BUS=-1"
44.Cd "options CAM_DEBUG_TARGET=-1"
45.Cd "options CAM_DEBUG_LUN=-1"
46.Cd "options CAM_DEBUG_FLAGS=CAM_DEBUG_INFO|CAM_DEBUG_CDB"
47.Cd "options CAM_MAX_HIGHPOWER=4"
48.Cd "options SCSI_NO_SENSE_STRINGS"
49.Cd "options SCSI_NO_OP_STRINGS"
50.Cd "options SCSI_DELAY=8000"
51.Sh DESCRIPTION
52The CAM
53.Tn SCSI
52The
53.Nm
54subsystem provides a uniform and modular system for the implementation
55of drivers to control various
56.Tn SCSI
54subsystem provides a uniform and modular system for the implementation
55of drivers to control various
56.Tn SCSI
57and
58.Tn ATA
57devices, and to utilize different
58.Tn SCSI
59devices, and to utilize different
60.Tn SCSI
61and
62.Tn ATA
59host adapters through host adapter drivers.
63host adapters through host adapter drivers.
60When the system probes the
61.Tn SCSI
62busses, it attaches any devices it finds to the appropriate
63drivers.
64When the system probes busses, it attaches any devices it finds to the
65appropriate drivers.
64The
65.Xr pass 4
66The
67.Xr pass 4
66driver, if it is configured in the kernel, will attach to all
67.Tn SCSI
68devices.
68driver, if it is configured in the kernel, will attach to all devices.
69.Sh KERNEL CONFIGURATION
70There are a number of generic kernel configuration options for the
69.Sh KERNEL CONFIGURATION
70There are a number of generic kernel configuration options for the
71CAM
72.Tn SCSI
71.Nm
73subsystem:
74.Bl -tag -width SCSI_NO_SENSE_STRINGS
75.It Dv CAMDEBUG
72subsystem:
73.Bl -tag -width SCSI_NO_SENSE_STRINGS
74.It Dv CAMDEBUG
76This option enables the CAM debugging printf code.
75This option enables the
76.Nm
77debugging printf code.
77This will not actually
78cause any debugging information to be printed out when included by itself.
79Enabling printouts requires additional configuration.
80See below for details.
81.It Dv "CAM_MAX_HIGHPOWER=4"
82This sets the maximum allowable number of concurrent "high power" commands.
83A "high power" command is a command that takes more electrical power than
84most to complete.
78This will not actually
79cause any debugging information to be printed out when included by itself.
80Enabling printouts requires additional configuration.
81See below for details.
82.It Dv "CAM_MAX_HIGHPOWER=4"
83This sets the maximum allowable number of concurrent "high power" commands.
84A "high power" command is a command that takes more electrical power than
85most to complete.
85An example of this (and the only command currently
86tagged as "high power") is the
86An example of this is the
87.Tn SCSI
88START UNIT command.
87.Tn SCSI
88START UNIT command.
89Starting a SCSI disk often takes significantly more
90electrical power than normal operation of the disk.
89Starting a disk often takes significantly more electrical power than normal
90operation.
91This option allows the
92user to specify how many concurrent high power commands may be outstanding
93without overloading the power supply on his computer.
94.It Dv SCSI_NO_SENSE_STRINGS
95This eliminates text descriptions of each
96.Tn SCSI
97Additional Sense Code and Additional Sense Code Qualifier pair.
98Since this

--- 16 unchanged lines hidden (view full) ---

115Enabling this option for normal use is not recommended, since it slows
116debugging of
117.Tn SCSI
118problems.
119.It Dv SCSI_DELAY=8000
120This is the
121.Tn SCSI
122"bus settle delay."
91This option allows the
92user to specify how many concurrent high power commands may be outstanding
93without overloading the power supply on his computer.
94.It Dv SCSI_NO_SENSE_STRINGS
95This eliminates text descriptions of each
96.Tn SCSI
97Additional Sense Code and Additional Sense Code Qualifier pair.
98Since this

--- 16 unchanged lines hidden (view full) ---

115Enabling this option for normal use is not recommended, since it slows
116debugging of
117.Tn SCSI
118problems.
119.It Dv SCSI_DELAY=8000
120This is the
121.Tn SCSI
122"bus settle delay."
123In CAM, it is specified in
123In
124.Nm ,
125it is specified in
124.Em milliseconds ,
125not seconds like the old
126.Tn SCSI
127layer used to do.
128When the kernel boots, it sends a bus reset to each
129.Tn SCSI
130bus to tell each device to reset itself to a default set of transfer
131negotiations and other settings.

--- 11 unchanged lines hidden (view full) ---

143One special case is that if the
144.Dv SCSI_DELAY
145is set to 0, that will be taken to mean the "lowest possible value."
146In that case, the
147.Dv SCSI_DELAY
148will be reset to 100ms.
149.El
150.Pp
126.Em milliseconds ,
127not seconds like the old
128.Tn SCSI
129layer used to do.
130When the kernel boots, it sends a bus reset to each
131.Tn SCSI
132bus to tell each device to reset itself to a default set of transfer
133negotiations and other settings.

--- 11 unchanged lines hidden (view full) ---

145One special case is that if the
146.Dv SCSI_DELAY
147is set to 0, that will be taken to mean the "lowest possible value."
148In that case, the
149.Dv SCSI_DELAY
150will be reset to 100ms.
151.El
152.Pp
151All devices and the SCSI busses support boot time allocation so that
153All devices and busses support dynamic allocation so that
152an upper number of devices and controllers does not need to be configured;
153.Cd "device da"
154will suffice for any number of disk drivers.
155.Pp
156The devices are either
157.Em wired
158so they appear as a particular device unit or
159.Em counted

--- 39 unchanged lines hidden (view full) ---

199hint.da.0.at="scbus0"
200hint.da.0.target="0"
201hint.da.0.unit="0"
202.Ed
203.Pp
204This assigns
205.Em da0
206to target 0, unit (lun) 0 of scbus 0.
154an upper number of devices and controllers does not need to be configured;
155.Cd "device da"
156will suffice for any number of disk drivers.
157.Pp
158The devices are either
159.Em wired
160so they appear as a particular device unit or
161.Em counted

--- 39 unchanged lines hidden (view full) ---

201hint.da.0.at="scbus0"
202hint.da.0.target="0"
203hint.da.0.unit="0"
204.Ed
205.Pp
206This assigns
207.Em da0
208to target 0, unit (lun) 0 of scbus 0.
207Omitting the target or unit hints will instruct CAM to treat them as wildcards
209Omitting the target or unit hints will instruct
210.Nm
211to treat them as wildcards
208and use the first respective counted instances.
209These examples can be combined together to allow a peripheral device to be
210wired to any particular controller, bus, target, and/or unit instance.
211.Pp
212When you have a mixture of wired down and counted devices then the
213counting begins with the first non-wired down unit for a particular
214type.
215That is, if you have a disk wired down as
216.Em "device da1" ,
217then the first non-wired disk shall come on line as
218.Em da2 .
219.Sh ADAPTERS
220The system allows common device drivers to work through many different
221types of adapters.
222The adapters take requests from the upper layers and do
223all IO between the
212and use the first respective counted instances.
213These examples can be combined together to allow a peripheral device to be
214wired to any particular controller, bus, target, and/or unit instance.
215.Pp
216When you have a mixture of wired down and counted devices then the
217counting begins with the first non-wired down unit for a particular
218type.
219That is, if you have a disk wired down as
220.Em "device da1" ,
221then the first non-wired disk shall come on line as
222.Em da2 .
223.Sh ADAPTERS
224The system allows common device drivers to work through many different
225types of adapters.
226The adapters take requests from the upper layers and do
227all IO between the
224.Em SCSI
228.Tn SCSI
229or
230.Tn ATA
225bus and the system.
226The maximum size of a transfer is governed by the
227adapter.
228Most adapters can transfer 64KB in a single operation, however
229many can transfer larger amounts.
230.Sh TARGET MODE
231Some adapters support
232.Em target mode
233in which the system is capable of operating as a device, responding to
234operations initiated by another system.
235Target mode is supported for
231bus and the system.
232The maximum size of a transfer is governed by the
233adapter.
234Most adapters can transfer 64KB in a single operation, however
235many can transfer larger amounts.
236.Sh TARGET MODE
237Some adapters support
238.Em target mode
239in which the system is capable of operating as a device, responding to
240operations initiated by another system.
241Target mode is supported for
236some adapters, but is not yet complete for this version of the CAM
242some adapters, but is not yet complete for this version of the
243.Nm
237.Tn SCSI
238subsystem.
239.Sh FILES
240see other
241.Nm
242device entries.
243.Sh DIAGNOSTICS
244When the kernel is compiled with options CAMDEBUG, an XPT_DEBUG CCB can be

--- 28 unchanged lines hidden (view full) ---

273level, so it is not especially useful.
274The most useful debugging flag is the
275.Dv CAM_DEBUG_CDB
276flag.
277Users can enable debugging from their kernel config file, by using
278the following kernel config options:
279.Bl -tag -width CAM_DEBUG_TARGET
280.It Dv CAMDEBUG
244.Tn SCSI
245subsystem.
246.Sh FILES
247see other
248.Nm
249device entries.
250.Sh DIAGNOSTICS
251When the kernel is compiled with options CAMDEBUG, an XPT_DEBUG CCB can be

--- 28 unchanged lines hidden (view full) ---

280level, so it is not especially useful.
281The most useful debugging flag is the
282.Dv CAM_DEBUG_CDB
283flag.
284Users can enable debugging from their kernel config file, by using
285the following kernel config options:
286.Bl -tag -width CAM_DEBUG_TARGET
287.It Dv CAMDEBUG
281This enables CAM debugging.
288This enables
289.Nm
290debugging.
282Without this option, users will not even be able
283to turn on debugging from userland via
284.Xr camcontrol 8 .
285.It Dv CAM_DEBUG_FLAGS
286This allows the user to set the various debugging flags described above
287in a kernel config file.
288Flags may be ORed together if the user wishes to
289see printfs for multiple debugging levels.

--- 18 unchanged lines hidden (view full) ---

308.Dv CAMDEBUG
309option is their config file, by using the
310.Xr camcontrol 8
311utility.
312See
313.Xr camcontrol 8
314for details.
315.Sh SEE ALSO
291Without this option, users will not even be able
292to turn on debugging from userland via
293.Xr camcontrol 8 .
294.It Dv CAM_DEBUG_FLAGS
295This allows the user to set the various debugging flags described above
296in a kernel config file.
297Flags may be ORed together if the user wishes to
298see printfs for multiple debugging levels.

--- 18 unchanged lines hidden (view full) ---

317.Dv CAMDEBUG
318option is their config file, by using the
319.Xr camcontrol 8
320utility.
321See
322.Xr camcontrol 8
323for details.
324.Sh SEE ALSO
325.Xr ada 4 ,
316.Xr aha 4 ,
317.Xr ahb 4 ,
318.Xr ahc 4 ,
326.Xr aha 4 ,
327.Xr ahb 4 ,
328.Xr ahc 4 ,
329.Xr ahci 4 ,
330.Xr ata 4 ,
319.Xr bt 4 ,
320.Xr cd 4 ,
321.Xr ch 4 ,
322.Xr da 4 ,
323.Xr pass 4 ,
324.Xr pt 4 ,
325.Xr sa 4 ,
326.Xr xpt 4 ,
327.Xr camcontrol 8
328.Sh HISTORY
331.Xr bt 4 ,
332.Xr cd 4 ,
333.Xr ch 4 ,
334.Xr da 4 ,
335.Xr pass 4 ,
336.Xr pt 4 ,
337.Xr sa 4 ,
338.Xr xpt 4 ,
339.Xr camcontrol 8
340.Sh HISTORY
329The CAM
341The
342.Nm
330.Tn SCSI
331subsystem first appeared in
332.Fx 3.0 .
343.Tn SCSI
344subsystem first appeared in
345.Fx 3.0 .
346The
347.Nm
348ATA support was added in
349.Fx 8.0 .
333.Sh AUTHORS
334.An -nosplit
350.Sh AUTHORS
351.An -nosplit
335The CAM
352The
353.Nm
336.Tn SCSI
337subsystem was written by
338.An Justin Gibbs
339and
340.An Kenneth Merry .
354.Tn SCSI
355subsystem was written by
356.An Justin Gibbs
357and
358.An Kenneth Merry .
359The
360.Nm
361.Tn ATA
362support was added by
363.An Alexander Motin Aq mav@FreeBSD.org .