SCSI(3)                                                   SCSI(3)

     NAME
          scsi - SCSI command interface

     SYNOPSIS
          #S/id
          #S/0/cmd
          #S/0/data
          #S/0/debug
          ...

     DESCRIPTION
          The scsi interface is accessed through a two-level direc-
          tory.  The single-byte id file contains the SCSI id of the
          host interface, typically 7.  Some implementations allow
          this to be changed by writing to the file; in many cases,
          the higher-order bits are hardware specific.

          Each SCSI target n (0<=n<=7) is associated with a subdirec-
          tory #S/n containing files cmd, data, and debug.  The fol-
          lowing steps may be used to execute a SCSI command:

               The command block is written to the cmd file.

               The data file is either written or read depending on
               the direction of the transfer.  (A command that
               involves no data transfer is executed with a zero-
               length write.)

               The cmd file is read to retrieve the status of the com-
               mand, returned as a 4-byte big-endian integer.

          Writing an ASCII `1' to the debug file causes tracing infor-
          mation to be written to /dev/klog; writing a `0' turns the
          tracing off.

     SEE ALSO
          hard(3)

     Page 1                       Plan 9             (printed 4/26/24)