diff options
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/scsi_eh.h | 5 | ||||
-rw-r--r-- | include/scsi/sg.h | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/include/scsi/scsi_eh.h b/include/scsi/scsi_eh.h index 06a8790893ef..49af14ad5288 100644 --- a/include/scsi/scsi_eh.h +++ b/include/scsi/scsi_eh.h @@ -62,11 +62,16 @@ extern void scsi_build_sense_buffer(int desc, u8 *buf, u8 key, u8 asc, u8 ascq); /* * Reset request from external source + * Note: if SCSI_TRY_RESET_DEVICE fails then it will escalate to + * SCSI_TRY_RESET_TARGET which if it fails will escalate to + * SCSI_TRY_RESET_BUS which if it fails will escalate to SCSI_TRY_RESET_HOST. + * To prevent escalation OR with SCSI_TRY_RESET_NO_ESCALATE. */ #define SCSI_TRY_RESET_DEVICE 1 #define SCSI_TRY_RESET_BUS 2 #define SCSI_TRY_RESET_HOST 3 #define SCSI_TRY_RESET_TARGET 4 +#define SCSI_TRY_RESET_NO_ESCALATE 0x100 /* OR-ed to prior defines */ extern int scsi_reset_provider(struct scsi_device *, int); diff --git a/include/scsi/sg.h b/include/scsi/sg.h index 750e5db7c6bf..3afec7032448 100644 --- a/include/scsi/sg.h +++ b/include/scsi/sg.h @@ -164,12 +164,15 @@ typedef struct sg_req_info { /* used by SG_GET_REQUEST_TABLE ioctl() */ /* Returns -EBUSY if occupied. 3rd argument pointer to int (see next) */ #define SG_SCSI_RESET 0x2284 -/* Associated values that can be given to SG_SCSI_RESET follow */ +/* Associated values that can be given to SG_SCSI_RESET follow. + * SG_SCSI_RESET_NO_ESCALATE may be OR-ed to the _DEVICE, _TARGET, _BUS + * or _HOST reset value so only that action is attempted. */ #define SG_SCSI_RESET_NOTHING 0 #define SG_SCSI_RESET_DEVICE 1 #define SG_SCSI_RESET_BUS 2 #define SG_SCSI_RESET_HOST 3 #define SG_SCSI_RESET_TARGET 4 +#define SG_SCSI_RESET_NO_ESCALATE 0x100 /* synchronous SCSI command ioctl, (only in version 3 interface) */ #define SG_IO 0x2285 /* similar effect as write() followed by read() */ |