SC(4) COMMAND REFERENCE SC(4)
NAME
sc - raw SCSI interface
SYNOPSIS
#include <sys/ioctl.h>
#include <box/scsi.h>
DESCRIPTION
The files /dev/scxy refer to devices on the SCSI bus, where
x specifies the interface slot number (1 through 6) and y
specifies the SCSI device (0 through D). This provides for
one or two drives (in SCSI parlance, logical units) on each
of seven controllers. (The SCSI interface itself uses
controller address 7.) For example, sc57 refers to
enhancement slot 5, controller 3, drive 1.
There are three ioctls which send commands to the device.
All three take the address of an sccommand structure
(defined in scsi.h) as an argument. The structure provides
for up to twelve command bytes and a pointer to any data to
be moved. SCIOCCMD does not move any data; cmdarg and
cmdcount are ignored. SCIOCWCMD writes data to the device.
SCIOCRCMD reads data from the device. In each case, the
driver will send the command to the device. If the device
returns BUSY status, the driver will continue trying
indefinitely. In such cases, it may be necessary to turn
the SCSI device off or remove it from the bus to 'unhang'
the driver. When the command completes, the driver will
return 0 (successful completion) or -1 (error).
RETURN VALUE
If an error occurs, the call returns -1 and one of the
following values is left in errno:
[ENODEV] You have attempted to access an interface or
device which doesn't exist.
[EIO] The SCSI command returned with a check status.
You should do a request sense command to find
the reason for the error.
CAVEATS
There is no way to set the host interface address, share
peripherals, or communicate between hosts.
There is no way to access logical units 2 through 7.
If a SCSI device hangs, it may be necessary to turn it off
or unplug it from the SCSI bus to abort the command.
SEE ALSO
ds(4), tc(4).
Printed 10/17/86 Engineering Computing Systems 1
%%index%%
na:72,59;
sy:131,113;
de:244,1533;
rv:1777,503;
ca:2280,343;
se:2623,78;
%%index%%000000000106