The target driver's callback routine should verify that sense data is available by checking the STATE_ARQ_DONE bit in pkt_state, which implies that a check condition has occurred and a request sense has been performed. If auto-request-sense has been temporarily disabled in a packet, there is no guarantee that the sense data can be retrieved at a later time.
The target driver should then verify whether the auto request sense command completed successfully and decode the sense data.
Dump Handling
The dump(9E) entry point is used to copy a portion of virtual address space directly to the specified device in the case of system failure or checkpoint operation. See the cpr(7) and dump(9E) man pages. The dump(9E) entry point must be capable of performing this operation without the use of interrupts.
The arguments for dump() are as follows. dev is the device number of the dump device, addr is the kernel virtual address at which to start the dump, blkno is the first destination block on the device, and nblk is the number of blocks to dump.
Example 14-7 dump(9E) Routine
SCSI Options
SCSA defines a global variable, scsi_options, which can be used for debug and control. The defined bits in scsi_options can be found in the file <sys/scsi/conf/autoconf.h>. The following table describes the use of these bits.
Table 14-2 SCSA Options
Option | Description |
---|---|
SCSI_OPTIONS_DR | Enables global disconnect/reconnect |
SCSI_OPTIONS_SYNC | Enables global synchronous transfer capability |
SCSI_OPTIONS_LINK | Enables global link support |
SCSI_OPTIONS_PARITY | Enables global parity support |
SCSI_OPTIONS_TAG | Enables global tagged queuing support |
SCSI_OPTIONS_FAST | Enables global FAST SCSI support: 10 Mbytes/sec transfers, as opposed to 5 Mbytes/sec |
SCSI_OPTIONS_FAST20 | Enables global FAST20 SCSI support: 20 Mbytes/sec transfers |
SCSI_OPTIONS_FAST40 | Enables global FAST40 SCSI support: 40 Mbytes/sec transfers |
SCSI_OPTIONS_FAST80 | Enables global FAST80 SCSI support: 80 Mbytes/sec transfers |
SCSI_OPTIONS_WIDE | Enables global WIDE SCSI |
Note - The setting of scsi_options affects all host adapter and target drivers present on the system (as opposed to scsi_ifsetcap(9F). Refer to the scsi_hba_attach(9F) man page for information on controlling these options for a particular host adapter.