Skip to content

Commit

Permalink
[PATCH] consolidate timeout defintions in scsi.h
Browse files Browse the repository at this point in the history
Adapted from a patch in SuSE's kernel SRPM.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
Unknown authored and James Bottomley committed Apr 17, 2005
1 parent a757e64 commit 0890d74
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
5 changes: 0 additions & 5 deletions drivers/block/scsi_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 0 additions & 5 deletions drivers/scsi/scsi_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 9 additions & 0 deletions include/scsi/scsi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 |\
Expand Down

0 comments on commit 0890d74

Please sign in to comment.