summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-18 14:25:40 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-18 14:25:40 -0700
commit0b2cad2f30d0353f2576b1a2207c0792ba713157 (patch)
tree0d7f73fcc961111ddca915cc8f267ebb088a04c2 /include
parent238628edb6cd427454fb54994e2605e191bfc26a (diff)
parent686579d95d48c713bdb7008cc76af8398219e687 (diff)
downloadop-kernel-dev-0b2cad2f30d0353f2576b1a2207c0792ba713157.zip
op-kernel-dev-0b2cad2f30d0353f2576b1a2207c0792ba713157.tar.gz
Merge SCSI tree from James Bottomley.
Done with "git-pull-script rsync://www.parisc-linux.org/~jejb/scsi-rc-fixes-2.6.git" together with an automated content merge.
Diffstat (limited to 'include')
-rw-r--r--include/scsi/scsi.h11
-rw-r--r--include/scsi/scsi_cmnd.h28
2 files changed, 20 insertions, 19 deletions
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h
index 1d54c06..659ecf48 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 */
/*
@@ -360,6 +362,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 |\
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
index 9d9871c..07f5c69 100644
--- a/include/scsi/scsi_cmnd.h
+++ b/include/scsi/scsi_cmnd.h
@@ -43,21 +43,17 @@ struct scsi_cmnd {
void (*done) (struct scsi_cmnd *); /* Mid-level done function */
/*
- * A SCSI Command is assigned a nonzero serial_number when internal_cmnd
- * passes it to the driver's queue command function. The serial_number
- * is cleared when scsi_done is entered indicating that the command has
- * been completed. If a timeout occurs, the serial number at the moment
- * of timeout is copied into serial_number_at_timeout. By subsequently
- * comparing the serial_number and serial_number_at_timeout fields
- * during abort or reset processing, we can detect whether the command
- * has already completed. This also detects cases where the command has
- * completed and the SCSI Command structure has already being reused
- * for another command, so that we can avoid incorrectly aborting or
- * resetting the new command.
- * The serial number is only unique per host.
+ * A SCSI Command is assigned a nonzero serial_number before passed
+ * to the driver's queue command function. The serial_number is
+ * cleared when scsi_done is entered indicating that the command
+ * has been completed. It currently doesn't have much use other
+ * than printk's. Some lldd's use this number for other purposes.
+ * It's almost certain that such usages are either incorrect or
+ * meaningless. Please kill all usages other than printk's. Also,
+ * as this number is always identical to ->pid, please convert
+ * printk's to use ->pid, so that we can kill this field.
*/
unsigned long serial_number;
- unsigned long serial_number_at_timeout;
int retries;
int allowed;
@@ -65,12 +61,6 @@ struct scsi_cmnd {
int timeout_total;
int timeout;
- /*
- * We handle the timeout differently if it happens when a reset,
- * abort, etc are in process.
- */
- unsigned volatile char internal_timeout;
-
unsigned char cmd_len;
unsigned char old_cmd_len;
enum dma_data_direction sc_data_direction;
OpenPOWER on IntegriCloud