aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi.c')
-rw-r--r--drivers/scsi/scsi.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 1cb5f7d4f278..d14523d7e449 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -113,6 +113,7 @@ const char *const scsi_device_types[MAX_SCSI_DEVICE_CODE] = {
113 "Unknown ", 113 "Unknown ",
114 "RAID ", 114 "RAID ",
115 "Enclosure ", 115 "Enclosure ",
116 "Direct-Access-RBC",
116}; 117};
117EXPORT_SYMBOL(scsi_device_types); 118EXPORT_SYMBOL(scsi_device_types);
118 119
@@ -259,8 +260,6 @@ struct scsi_cmnd *scsi_get_command(struct scsi_device *dev, int gfp_mask)
259 260
260 memset(cmd, 0, sizeof(*cmd)); 261 memset(cmd, 0, sizeof(*cmd));
261 cmd->device = dev; 262 cmd->device = dev;
262 cmd->state = SCSI_STATE_UNUSED;
263 cmd->owner = SCSI_OWNER_NOBODY;
264 init_timer(&cmd->eh_timeout); 263 init_timer(&cmd->eh_timeout);
265 INIT_LIST_HEAD(&cmd->list); 264 INIT_LIST_HEAD(&cmd->list);
266 spin_lock_irqsave(&dev->list_lock, flags); 265 spin_lock_irqsave(&dev->list_lock, flags);
@@ -610,10 +609,6 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
610 * We will use a queued command if possible, otherwise we will 609 * We will use a queued command if possible, otherwise we will
611 * emulate the queuing and calling of completion function ourselves. 610 * emulate the queuing and calling of completion function ourselves.
612 */ 611 */
613
614 cmd->state = SCSI_STATE_QUEUED;
615 cmd->owner = SCSI_OWNER_LOWLEVEL;
616
617 atomic_inc(&cmd->device->iorequest_cnt); 612 atomic_inc(&cmd->device->iorequest_cnt);
618 613
619 /* 614 /*
@@ -683,7 +678,6 @@ void scsi_init_cmd_from_req(struct scsi_cmnd *cmd, struct scsi_request *sreq)
683{ 678{
684 sreq->sr_command = cmd; 679 sreq->sr_command = cmd;
685 680
686 cmd->owner = SCSI_OWNER_MIDLEVEL;
687 cmd->cmd_len = sreq->sr_cmd_len; 681 cmd->cmd_len = sreq->sr_cmd_len;
688 cmd->use_sg = sreq->sr_use_sg; 682 cmd->use_sg = sreq->sr_use_sg;
689 683
@@ -719,7 +713,6 @@ void scsi_init_cmd_from_req(struct scsi_cmnd *cmd, struct scsi_request *sreq)
719 /* 713 /*
720 * Start the timer ticking. 714 * Start the timer ticking.
721 */ 715 */
722 cmd->abort_reason = 0;
723 cmd->result = 0; 716 cmd->result = 0;
724 717
725 SCSI_LOG_MLQUEUE(3, printk("Leaving scsi_init_cmd_from_req()\n")); 718 SCSI_LOG_MLQUEUE(3, printk("Leaving scsi_init_cmd_from_req()\n"));
@@ -768,8 +761,6 @@ void __scsi_done(struct scsi_cmnd *cmd)
768 * Set the serial numbers back to zero 761 * Set the serial numbers back to zero
769 */ 762 */
770 cmd->serial_number = 0; 763 cmd->serial_number = 0;
771 cmd->state = SCSI_STATE_BHQUEUE;
772 cmd->owner = SCSI_OWNER_BH_HANDLER;
773 764
774 atomic_inc(&cmd->device->iodone_cnt); 765 atomic_inc(&cmd->device->iodone_cnt);
775 if (cmd->result) 766 if (cmd->result)
@@ -890,9 +881,6 @@ void scsi_finish_command(struct scsi_cmnd *cmd)
890 SCSI_LOG_MLCOMPLETE(4, printk("Notifying upper driver of completion " 881 SCSI_LOG_MLCOMPLETE(4, printk("Notifying upper driver of completion "
891 "for device %d %x\n", sdev->id, cmd->result)); 882 "for device %d %x\n", sdev->id, cmd->result));
892 883
893 cmd->owner = SCSI_OWNER_HIGHLEVEL;
894 cmd->state = SCSI_STATE_FINISHED;
895
896 /* 884 /*
897 * We can get here with use_sg=0, causing a panic in the upper level 885 * We can get here with use_sg=0, causing a panic in the upper level
898 */ 886 */