driver_status

The Linux SCSI Generic (sg) HOWTO
Prev | Chapter 6. The sg_io_hdr_t structure in detail | Next

# 6.19. driver_status

One driver can potentially control several host adapters. For example Advansys provide one Linux adapter driver that controls all adapters made by that company - if 2 of more Advansys adapters are in 1 machine, then 1 driver controls both. When ('driver_status' & SG_ERR_DRIVER_SENSE) is true the 'sense_buffer' is also output. The 'driver_status' field has the following values whose #defines mimic those which are only visible within the kernel (with the "SG_ERR_" removed from the front of each define). A copy of these defines can be found in sg_err.h (see the utilities section):

- SG_ERR_DRIVER_OK [0x00] Typically no suggestion

- SG_ERR_DRIVER_BUSY [0x01]

- SG_ERR_DRIVER_SOFT [0x02]

- SG_ERR_DRIVER_MEDIA [0x03]

- SG_ERR_DRIVER_ERROR [0x04]

- SG_ERR_DRIVER_INVALID [0x05]

- SG_ERR_DRIVER_TIMEOUT [0x06] Adapter driver is unable to control the SCSI bus to its is setting its devices offline (and giving up)

- SG_ERR_DRIVER_HARD [0x07]

- SG_ERR_DRIVER_SENSE [0x08] Implies sense_buffer output

- above status 'or'ed with one of the following suggestions

- SG_ERR_SUGGEST_RETRY [0x10]

- SG_ERR_SUGGEST_ABORT [0x20]

- SG_ERR_SUGGEST_REMAP [0x30]

- SG_ERR_SUGGEST_DIE [0x40]

- SG_ERR_SUGGEST_SENSE [0x80]

The type of driver_status is unsigned short .

Prev | Home | Next
host_status | Up | resid