Commit 68350a88 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Martin K. Petersen

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: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarTomas Henzl <thenzl@redhat.com>
Reviewed-by: default avatarEwan D. Milne <emilne@redhat.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent d9083160
...@@ -1120,9 +1120,9 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp, ...@@ -1120,9 +1120,9 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp,
"reselection is tag %d, slot %p(%d)\n", "reselection is tag %d, slot %p(%d)\n",
hostdata->msgin[2], slot, slot->tag); hostdata->msgin[2], slot, slot->tag);
} else { } else {
struct scsi_cmnd *SCp; struct NCR_700_Device_Parameters *p = SDp->hostdata;
struct scsi_cmnd *SCp = p->current_cmnd;
SCp = SDp->current_cmnd;
if(unlikely(SCp == NULL)) { if(unlikely(SCp == NULL)) {
sdev_printk(KERN_ERR, SDp, sdev_printk(KERN_ERR, SDp,
"no saved request for untagged cmd\n"); "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,9 +1825,11 @@ NCR_700_queuecommand_lck(struct scsi_cmnd *SCp, void (*done)(struct scsi_cmnd *)
CDEBUG(KERN_DEBUG, SCp, "sending out tag %d, slot %p\n", CDEBUG(KERN_DEBUG, SCp, "sending out tag %d, slot %p\n",
slot->tag, slot); slot->tag, slot);
} else { } else {
struct NCR_700_Device_Parameters *p = SCp->device->hostdata;
slot->tag = SCSI_NO_TAG; slot->tag = SCSI_NO_TAG;
/* save current command for reselection */ /* save current command for reselection */
SCp->device->current_cmnd = SCp; p->current_cmnd = SCp;
} }
/* sanity check: some of the commands generated by the mid-layer /* sanity check: some of the commands generated by the mid-layer
* have an eccentric idea of their sc_data_direction */ * have an eccentric idea of their sc_data_direction */
......
...@@ -82,6 +82,7 @@ struct NCR_700_Device_Parameters { ...@@ -82,6 +82,7 @@ struct NCR_700_Device_Parameters {
* cmnd[1], this could be in static storage */ * cmnd[1], this could be in static storage */
unsigned char cmnd[MAX_COMMAND_SIZE]; unsigned char cmnd[MAX_COMMAND_SIZE];
__u8 depth; __u8 depth;
struct scsi_cmnd *current_cmnd; /* currently active command */
}; };
......
...@@ -94,7 +94,6 @@ struct scsi_device { ...@@ -94,7 +94,6 @@ struct scsi_device {
spinlock_t list_lock; spinlock_t list_lock;
struct list_head cmd_list; /* queue of in use SCSI Command structures */ struct list_head cmd_list; /* queue of in use SCSI Command structures */
struct list_head starved_entry; struct list_head starved_entry;
struct scsi_cmnd *current_cmnd; /* currently active command */
unsigned short queue_depth; /* How deep of a queue we want */ unsigned short queue_depth; /* How deep of a queue we want */
unsigned short max_queue_depth; /* max queue depth */ unsigned short max_queue_depth; /* max queue depth */
unsigned short last_queue_full_depth; /* These two are used by */ unsigned short last_queue_full_depth; /* These two are used by */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment