From: Date: Sun, 3 Apr 2005 19:52:44 +0000 (-0500) Subject: [PATCH] consolidate timeout defintions in scsi.h X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b6651129cc27d56a9cbefcb5f713cea7706fd6b7;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git [PATCH] consolidate timeout defintions in scsi.h Adapted from a patch in SuSE's kernel SRPM. Signed-off-by: James Bottomley --- diff --git a/drivers/block/scsi_ioctl.c b/drivers/block/scsi_ioctl.c index 689527a89de7..681871ca5d60 100644 --- a/drivers/block/scsi_ioctl.c +++ b/drivers/block/scsi_ioctl.c @@ -328,11 +328,6 @@ static int sg_io(struct file *file, request_queue_t *q, return 0; } -#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 OMAX_SB_LEN 16 /* For backward compatibility */ static int sg_scsi_ioctl(struct file *file, request_queue_t *q, diff --git a/drivers/scsi/scsi_ioctl.c b/drivers/scsi/scsi_ioctl.c index 68c9728dfbbb..7a6b530115ac 100644 --- a/drivers/scsi/scsi_ioctl.c +++ b/drivers/scsi/scsi_ioctl.c @@ -27,11 +27,6 @@ #define NORMAL_RETRIES 5 #define IOCTL_NORMAL_TIMEOUT (10 * HZ) -#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 ) /* ZIP-250 on parallel port takes as long! */ #define MAX_BUF PAGE_SIZE diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index 1d54c063ae52..3507b3d7c0eb 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 |\