diff options
author | <htejun@gmail.com> | 2005-04-03 15:59:11 -0400 |
---|---|---|
committer | James Bottomley <jejb@titanic> | 2005-04-18 13:33:15 -0400 |
commit | c6295cdf656de63d6d1123def71daba6cd91939c (patch) | |
tree | c4e5d02355df7443afa45ecc491807a67962f0d8 /include/scsi | |
parent | d3a933dc9851e74581f9f4c8e703e77901ae8d01 (diff) |
[PATCH] scsi: remove meaningless scsi_cmnd->serial_number_at_timeout field
scsi_cmnd->serial_number_at_timeout doesn't serve any purpose
anymore. All serial_number == serial_number_at_timeout tests
are always true in abort callbacks. Kill the field. Also, as
->pid always equals ->serial_number and ->serial_number
doesn't have any special meaning anymore, update comments
above ->serial_number accordingly. Once we remove all uses of
this field from all lldd's, this field should go.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/scsi_cmnd.h | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index ae45d6f8f98c..07f5c699eaa7 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h | |||
@@ -43,21 +43,17 @@ struct scsi_cmnd { | |||
43 | void (*done) (struct scsi_cmnd *); /* Mid-level done function */ | 43 | void (*done) (struct scsi_cmnd *); /* Mid-level done function */ |
44 | 44 | ||
45 | /* | 45 | /* |
46 | * A SCSI Command is assigned a nonzero serial_number when internal_cmnd | 46 | * A SCSI Command is assigned a nonzero serial_number before passed |
47 | * passes it to the driver's queue command function. The serial_number | 47 | * to the driver's queue command function. The serial_number is |
48 | * is cleared when scsi_done is entered indicating that the command has | 48 | * cleared when scsi_done is entered indicating that the command |
49 | * been completed. If a timeout occurs, the serial number at the moment | 49 | * has been completed. It currently doesn't have much use other |
50 | * of timeout is copied into serial_number_at_timeout. By subsequently | 50 | * than printk's. Some lldd's use this number for other purposes. |
51 | * comparing the serial_number and serial_number_at_timeout fields | 51 | * It's almost certain that such usages are either incorrect or |
52 | * during abort or reset processing, we can detect whether the command | 52 | * meaningless. Please kill all usages other than printk's. Also, |
53 | * has already completed. This also detects cases where the command has | 53 | * as this number is always identical to ->pid, please convert |
54 | * completed and the SCSI Command structure has already being reused | 54 | * printk's to use ->pid, so that we can kill this field. |
55 | * for another command, so that we can avoid incorrectly aborting or | ||
56 | * resetting the new command. | ||
57 | * The serial number is only unique per host. | ||
58 | */ | 55 | */ |
59 | unsigned long serial_number; | 56 | unsigned long serial_number; |
60 | unsigned long serial_number_at_timeout; | ||
61 | 57 | ||
62 | int retries; | 58 | int retries; |
63 | int allowed; | 59 | int allowed; |