diff options
author | Christoph Hellwig <hch@lst.de> | 2016-07-11 00:34:55 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-07-13 22:33:23 -0400 |
commit | 68350a886e7df0269a14af888dd68be2ba9203ca (patch) | |
tree | fba17d8d095336f22ecdd435a3956b8961c3c009 /drivers/scsi | |
parent | d9083160c2f6ee456ea867ea2279c1fc6124e56f (diff) |
scsi: remove current_cmnd field from struct scsi_device
The field is only used by the 53c700 driver, so move it into the
driver-private device data instead of having it in the common structure.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/53c700.c | 8 | ||||
-rw-r--r-- | drivers/scsi/53c700.h | 1 |
2 files changed, 6 insertions, 3 deletions
diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c index 55562019acf8..95e32a47face 100644 --- a/drivers/scsi/53c700.c +++ b/drivers/scsi/53c700.c | |||
@@ -1120,9 +1120,9 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp, | |||
1120 | "reselection is tag %d, slot %p(%d)\n", | 1120 | "reselection is tag %d, slot %p(%d)\n", |
1121 | hostdata->msgin[2], slot, slot->tag); | 1121 | hostdata->msgin[2], slot, slot->tag); |
1122 | } else { | 1122 | } else { |
1123 | struct scsi_cmnd *SCp; | 1123 | struct NCR_700_Device_Parameters *p = SDp->hostdata; |
1124 | struct scsi_cmnd *SCp = p->current_cmnd; | ||
1124 | 1125 | ||
1125 | SCp = SDp->current_cmnd; | ||
1126 | if(unlikely(SCp == NULL)) { | 1126 | if(unlikely(SCp == NULL)) { |
1127 | sdev_printk(KERN_ERR, SDp, | 1127 | sdev_printk(KERN_ERR, SDp, |
1128 | "no saved request for untagged cmd\n"); | 1128 | "no saved request for untagged cmd\n"); |
@@ -1825,9 +1825,11 @@ NCR_700_queuecommand_lck(struct scsi_cmnd *SCp, void (*done)(struct scsi_cmnd *) | |||
1825 | CDEBUG(KERN_DEBUG, SCp, "sending out tag %d, slot %p\n", | 1825 | CDEBUG(KERN_DEBUG, SCp, "sending out tag %d, slot %p\n", |
1826 | slot->tag, slot); | 1826 | slot->tag, slot); |
1827 | } else { | 1827 | } else { |
1828 | struct NCR_700_Device_Parameters *p = SCp->device->hostdata; | ||
1829 | |||
1828 | slot->tag = SCSI_NO_TAG; | 1830 | slot->tag = SCSI_NO_TAG; |
1829 | /* save current command for reselection */ | 1831 | /* save current command for reselection */ |
1830 | SCp->device->current_cmnd = SCp; | 1832 | p->current_cmnd = SCp; |
1831 | } | 1833 | } |
1832 | /* sanity check: some of the commands generated by the mid-layer | 1834 | /* sanity check: some of the commands generated by the mid-layer |
1833 | * have an eccentric idea of their sc_data_direction */ | 1835 | * have an eccentric idea of their sc_data_direction */ |
diff --git a/drivers/scsi/53c700.h b/drivers/scsi/53c700.h index c893a5d3ff8d..f34c916b95bc 100644 --- a/drivers/scsi/53c700.h +++ b/drivers/scsi/53c700.h | |||
@@ -82,6 +82,7 @@ struct NCR_700_Device_Parameters { | |||
82 | * cmnd[1], this could be in static storage */ | 82 | * cmnd[1], this could be in static storage */ |
83 | unsigned char cmnd[MAX_COMMAND_SIZE]; | 83 | unsigned char cmnd[MAX_COMMAND_SIZE]; |
84 | __u8 depth; | 84 | __u8 depth; |
85 | struct scsi_cmnd *current_cmnd; /* currently active command */ | ||
85 | }; | 86 | }; |
86 | 87 | ||
87 | 88 | ||