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