Deleted Added
full compact
scsi.4 (204704) scsi.4 (236712)
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 204704 2010-03-04 10:59:21Z mav $
27.Dd March 4, 2010
26.\" $FreeBSD: head/share/man/man4/scsi.4 236712 2012-06-07 10:05:51Z mav $
27.Dd June 7, 2012
28.Dt CAM 4
29.Os
30.Sh NAME
31.Nm CAM
32.Nd Common Access Method SCSI/ATA subsystem
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"
28.Dt CAM 4
29.Os
30.Sh NAME
31.Nm CAM
32.Nd Common Access Method SCSI/ATA subsystem
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_COMPILE=CAM_DEBUG_INFO|CAM_DEBUG_CDB|CAM_DEBUG_PROBE"
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
53.Nm

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

67.Xr pass 4
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
71.Nm
72subsystem:
73.Bl -tag -width SCSI_NO_SENSE_STRINGS
74.It Dv CAMDEBUG
47.Cd "options CAM_DEBUG_FLAGS=CAM_DEBUG_INFO|CAM_DEBUG_CDB"
48.Cd "options CAM_MAX_HIGHPOWER=4"
49.Cd "options SCSI_NO_SENSE_STRINGS"
50.Cd "options SCSI_NO_OP_STRINGS"
51.Cd "options SCSI_DELAY=8000"
52.Sh DESCRIPTION
53The
54.Nm

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

68.Xr pass 4
69driver, if it is configured in the kernel, will attach to all devices.
70.Sh KERNEL CONFIGURATION
71There are a number of generic kernel configuration options for the
72.Nm
73subsystem:
74.Bl -tag -width SCSI_NO_SENSE_STRINGS
75.It Dv CAMDEBUG
75This option enables the
76This option compiles in all the
76.Nm
77debugging printf code.
78This will not actually
79cause any debugging information to be printed out when included by itself.
77.Nm
78debugging printf code.
79This will not actually
80cause 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.
86An example of this is the
87.Tn SCSI
88START UNIT command.

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

243.Nm
244.Tn SCSI
245subsystem.
246.Sh FILES
247see other
248.Nm
249device entries.
250.Sh DIAGNOSTICS
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.
86An example of this is the
87.Tn SCSI
88START UNIT command.

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

243.Nm
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
252used to enable various amounts of tracing information on any
253specific device.
254Devices not being traced will not produce trace information.
255There are currently four debugging flags that may be turned on:
251An XPT_DEBUG CCB can be used to enable various amounts of tracing information
252on any specific bus/device from the list of options compiled into the kernel.
253There are currently seven debugging flags that may be compiled in and used:
256.Bl -tag -width CAM_DEBUG_SUBTRACE
257.It Dv CAM_DEBUG_INFO
254.Bl -tag -width CAM_DEBUG_SUBTRACE
255.It Dv CAM_DEBUG_INFO
258This debugging flag enables general informational printfs for the device
256This flag enables general informational printfs for the device
259or devices in question.
260.It Dv CAM_DEBUG_TRACE
257or devices in question.
258.It Dv CAM_DEBUG_TRACE
261This debugging flag enables function-level command flow tracing.
259This flag enables function-level command flow tracing.
262i.e.\&
263kernel printfs will happen at the entrance and exit of various functions.
264.It Dv CAM_DEBUG_SUBTRACE
260i.e.\&
261kernel printfs will happen at the entrance and exit of various functions.
262.It Dv CAM_DEBUG_SUBTRACE
265This debugging flag enables debugging output internal to various functions.
263This flag enables debugging output internal to various functions.
266.It Dv CAM_DEBUG_CDB
264.It Dv CAM_DEBUG_CDB
267This debugging flag will cause the kernel to print out all
265This flag will cause the kernel to print out all
266.Tn ATA
267and
268.Tn SCSI
269commands sent to a particular device or devices.
268.Tn SCSI
269commands sent to a particular device or devices.
270.It Dv CAM_DEBUG_XPT
271This flag will enable command scheduler tracing.
272.It Dv CAM_DEBUG_PERIPH
273This flag will enable peripheral drivers messages.
274.It Dv CAM_DEBUG_PROBE
275This flag will enable devices probe process tracing.
270.El
271.Pp
272Some of these flags, most notably
273.Dv CAM_DEBUG_TRACE
274and
276.El
277.Pp
278Some of these flags, most notably
279.Dv CAM_DEBUG_TRACE
280and
275.Dv CAM_DEBUG_SUBTRACE
276will produce kernel printfs in EXTREME numbers,
277and because of that, they are not especially useful.
278There are not many things logged at the
279.Dv CAM_DEBUG_INFO
280level, so it is not especially useful.
281The most useful debugging flag is the
282.Dv CAM_DEBUG_CDB
283flag.
281.Dv CAM_DEBUG_SUBTRACE ,
282will produce kernel printfs in EXTREME numbers.
283.Pp
284Users can enable debugging from their kernel config file, by using
285the following kernel config options:
284Users can enable debugging from their kernel config file, by using
285the following kernel config options:
286.Bl -tag -width CAM_DEBUG_TARGET
286.Bl -tag -width CAM_DEBUG_COMPILE
287.It Dv CAMDEBUG
287.It Dv CAMDEBUG
288This enables
288This builds into the kernel all possible
289.Nm
290debugging.
289.Nm
290debugging.
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.
291.It Dv CAM_DEBUG_COMPILE
292This allows to specify support for which debugging flags described above
293should be built into the kernel.
297Flags may be ORed together if the user wishes to
298see printfs for multiple debugging levels.
294Flags may be ORed together if the user wishes to
295see printfs for multiple debugging levels.
296.It Dv CAM_DEBUG_FLAGS
297This allows to set the various debugging flags from a kernel config file.
299.It Dv CAM_DEBUG_BUS
300Specify a bus to debug.
301To debug all busses, set this to -1.
302.It Dv CAM_DEBUG_TARGET
303Specify a target to debug.
304To debug all targets, set this to -1.
305.It Dv CAM_DEBUG_LUN
306Specify a lun to debug.
307To debug all luns, set this to -1.
308.El
309.Pp
298.It Dv CAM_DEBUG_BUS
299Specify a bus to debug.
300To debug all busses, set this to -1.
301.It Dv CAM_DEBUG_TARGET
302Specify a target to debug.
303To debug all targets, set this to -1.
304.It Dv CAM_DEBUG_LUN
305Specify a lun to debug.
306To debug all luns, set this to -1.
307.El
308.Pp
310When specifying a bus, target or lun to debug, you
311.Em MUST
312specify all three bus/target/lun options above.
313Using wildcards, you
314should be able to enable debugging on most anything.
315.Pp
316Users may also enable debugging printfs on the fly, if the
317.Dv CAMDEBUG
318option is their config file, by using the
309Users may also enable debugging on the fly by using the
319.Xr camcontrol 8
310.Xr camcontrol 8
320utility.
311utility, if wanted options built into the kernel.
321See
322.Xr camcontrol 8
323for details.
324.Sh SEE ALSO
325.Xr ada 4 ,
326.Xr aha 4 ,
327.Xr ahb 4 ,
328.Xr ahc 4 ,

--- 35 unchanged lines hidden ---
312See
313.Xr camcontrol 8
314for details.
315.Sh SEE ALSO
316.Xr ada 4 ,
317.Xr aha 4 ,
318.Xr ahb 4 ,
319.Xr ahc 4 ,

--- 35 unchanged lines hidden ---