This commit was generated by cvs2svn to track changes on a CVS vendor
[unix-history] / share / man / man4 / scsi.4
CommitLineData
22c961eb
RG
1.Dd August 27, 1993
2.Dt SD 4
3.Os 386BSD/NetBSD
4.Sh NAME
5.Nm scsi
6.Nd scsi system
7.Sh SYNOPSIS
8.Nm device-driver scbus
9.Sh DESCRIPTION
10The
11.Em scsi
12system provides a uniform and modular system for the implimentation
13of drivers to control various scsi devices, and to utilise different
14scsi adapters through adapter drivers. When the system probes the
15.Em SCSI
16busses, it attaches any devices it finds to the appropriate
17drivers. If no driver seems appropriate, then at attaches the device to the
18uk (unknown) driver (if configured), so that user level scsi ioctls may
19still be performed against the device.
20.Sh KERNEL CONFIGURATION
21Continuously changing. check your nearest bsd mailing list.
22The option SCSIDEBUG enables the debug ioctl.
23.Sh IOCTLS
24There are a number of ioctls that will (when the next stage is complete)
25work on any
26.Em SCSI
27device. They are defined in
28.Em sys/scsiio.h
29and can be applied against any scsi device that allows both read and write,
30though for devices such as tape, it must be applied against the control
31device. See the manual page for each device type for more information about
32how generic scsi ioctls may be applied to a specific device.
33.Bl -tag -width DIOCSDINFO____
34.It Dv SCIOCRESET*
35reset a device.
36.It Dv SCIOCDEBUG
37Turn on debugging.. All scsi operations originating from this device's driver
38will be traced to the console, along with other information. Debugging is
39controlled by four bits, described in the header file. If no debugging is
40configured into the kernel, debugging will have no effect.
41.Em SCSI
42debugging is controlled by the configuration option
43.Em SCSIDEBUG.
44.It Dv SCIOCCOMMAND
45Take a scsi command and data from a user process and apply them to the scsi
46device. Return all status information and return data to the process. The
47ioctl will return a successful status even if the device rejected the
48command. As all status is returned to the user, it is up to the user
49process to examine this information to decide the success of the command.
50.It Dv SCIOCREPROBE
51Ask the system to probe the scsi busses for any new devices. If it finds
52any, they will be attached to the appropriate drivers. The search can be
53narrowed to a specific bus, target or lun. The new device may or may not
54be related to the device on which the ioctl was performed.
55.It Dv SCIOCIDENTIFY
56Ask the driver what it's bus, target and lun are.
57.It Dv SCIOCDECONFIG
58Ask the device to dissappear. This may not happen if the device is in use.
59.El
60.Sh NOTES
61the generic scsi part of the system is still being mapped out.
62Watch this space for changes.
63.Pp
64 A device by the name of su (scsi_user)
65(e.g su0-0-0) will map bus, target and lun to minor numbers. I have not
66yet decided yet whether this device will be able to open a device that is
67already controlled by an explicit driver.
68.Sh ADAPTERS
69The system allows common device drivers to work through many different
70types of adapters. The adapters take requests from the upper layers and do
71all IO between the
72.Em SCSI
73bus and the system. The maximum size of a transfer is governed by the
74adapter. Most adapters can transfer 64KB in a single operation, however
75many can transfer larger amounts.
76.Sh TARGET MODE
77Some adapters support
78.Em Target mode
79in which the system is capable of operating as a device, responding to
80operations initioated by another system. Target mode will be supported for
81some adapters, but is not yet complete for this version of the scsi system.
82.Sh FILES
83see other scsi device entries.
84.Sh DIAGNOSTICS
85When the kernel is compiled with option SCSIDEBUG, the SCIOCDEBUG ioctl
86can be used to enable various amounts of tracing information on any
87specific device. Devices not being traced will not produce trace information.
88The four bits that make up the debug level, each control certain types
89of debugging information.
90.Bl -tag -width THIS_WIDE_PLEASE
91.It Dv Bit 0
92Bit 0 shows all scsi bus operations including scsi commands,
93error information and the first 48 bytes of any data transferred.
94.It Dv Bit 1
95Bit 1 shows routines called.
96.It Dv Bit 2
97Bit 2 shows information about what branches are taken and often some
98of the return values of functions.
99.It Dv Bit 3
100Bit 3 shows more detailed information including DMA scatter-gather logs.
101.El
102.Sh SEE ALSO
103.Xr ch 4
104.Xr cd 4
105.Xr sd 4
106.Xr st 4
107.Xr uk 4
108.Xr su 4
109.Xr aha 4
110.Xr ahb 4
111.Xr bt 4
112.Xr uha 4
113.Sh HISTORY
114This
115.Nm
116system appeared in MACH 2.5 at TRW.
117