From b6651129cc27d56a9cbefcb5f713cea7706fd6b7 Mon Sep 17 00:00:00 2001 From: Date: Sun, 3 Apr 2005 14:52:44 -0500 Subject: [PATCH] consolidate timeout defintions in scsi.h Adapted from a patch in SuSE's kernel SRPM. Signed-off-by: James Bottomley --- include/scsi/scsi.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/scsi/scsi.h') diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index 1d54c063ae5..3507b3d7c0e 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h @@ -360,6 +360,15 @@ struct scsi_lun { #define sense_error(sense) ((sense) & 0xf) #define sense_valid(sense) ((sense) & 0x80); +/* + * default timeouts +*/ +#define FORMAT_UNIT_TIMEOUT (2 * 60 * 60 * HZ) +#define START_STOP_TIMEOUT (60 * HZ) +#define MOVE_MEDIUM_TIMEOUT (5 * 60 * HZ) +#define READ_ELEMENT_STATUS_TIMEOUT (5 * 60 * HZ) +#define READ_DEFECT_DATA_TIMEOUT (60 * HZ ) + #define IDENTIFY_BASE 0x80 #define IDENTIFY(can_disconnect, lun) (IDENTIFY_BASE |\ -- cgit v1.2.3 From bf341919dbc1fbcbb565fb3224c840760ebd9f85 Mon Sep 17 00:00:00 2001 From: Date: Tue, 12 Apr 2005 17:49:09 -0500 Subject: scsi: add DID_REQUEUE to the error handling We have a DID_IMM_RETRY to require a retry at once, but we could do with a DID_REQUEUE to instruct the mid-layer to treat this command in the same manner as QUEUE_FULL or BUSY (i.e. halt the submission until another command returns ... or the queue pressure builds if there are no outstanding commands). Signed-off-by: James Bottomley --- include/scsi/scsi.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/scsi/scsi.h') diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index 3507b3d7c0e..659ecf48fb4 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h @@ -295,6 +295,8 @@ struct scsi_lun { #define DID_PASSTHROUGH 0x0a /* Force command past mid-layer */ #define DID_SOFT_ERROR 0x0b /* The low level driver just wish a retry */ #define DID_IMM_RETRY 0x0c /* Retry without decrementing retry count */ +#define DID_REQUEUE 0x0d /* Requeue command (no immediate retry) also + * without decrementing the retry count */ #define DRIVER_OK 0x00 /* Driver status */ /* -- cgit v1.2.3