aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_error.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2005-06-19 07:40:52 -0400
committerJames Bottomley <jejb@titanic.(none)>2005-06-26 13:15:28 -0400
commitb4edcbcafdecc80ef5356ff6452768b1b926ea76 (patch)
treee30da76124facf97f4183b0fe41b29d90b00f237 /drivers/scsi/scsi_error.c
parentf5ad56145d43cdb68760bba3e14655ff6ae726aa (diff)
[SCSI] remove scsi_cmnd->owner
never checked anywhere Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/scsi_error.c')
-rw-r--r--drivers/scsi/scsi_error.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index af61f989896e..0df8615732c1 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -77,7 +77,6 @@ int scsi_eh_scmd_add(struct scsi_cmnd *scmd, int eh_flag)
77 /* 77 /*
78 * FIXME: Can we stop setting owner and state. 78 * FIXME: Can we stop setting owner and state.
79 */ 79 */
80 scmd->owner = SCSI_OWNER_ERROR_HANDLER;
81 scmd->state = SCSI_STATE_FAILED; 80 scmd->state = SCSI_STATE_FAILED;
82 list_add_tail(&scmd->eh_entry, &shost->eh_cmd_q); 81 list_add_tail(&scmd->eh_entry, &shost->eh_cmd_q);
83 set_bit(SHOST_RECOVERY, &shost->shost_state); 82 set_bit(SHOST_RECOVERY, &shost->shost_state);
@@ -451,7 +450,6 @@ static void scsi_eh_done(struct scsi_cmnd *scmd)
451 */ 450 */
452 if (del_timer(&scmd->eh_timeout)) { 451 if (del_timer(&scmd->eh_timeout)) {
453 scmd->request->rq_status = RQ_SCSI_DONE; 452 scmd->request->rq_status = RQ_SCSI_DONE;
454 scmd->owner = SCSI_OWNER_ERROR_HANDLER;
455 453
456 SCSI_LOG_ERROR_RECOVERY(3, printk("%s scmd: %p result: %x\n", 454 SCSI_LOG_ERROR_RECOVERY(3, printk("%s scmd: %p result: %x\n",
457 __FUNCTION__, scmd, scmd->result)); 455 __FUNCTION__, scmd, scmd->result));
@@ -484,8 +482,6 @@ static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, int timeout)
484 * we will use a queued command if possible, otherwise we will 482 * we will use a queued command if possible, otherwise we will
485 * emulate the queuing and calling of completion function ourselves. 483 * emulate the queuing and calling of completion function ourselves.
486 */ 484 */
487 scmd->owner = SCSI_OWNER_LOWLEVEL;
488
489 if (sdev->scsi_level <= SCSI_2) 485 if (sdev->scsi_level <= SCSI_2)
490 scmd->cmnd[1] = (scmd->cmnd[1] & 0x1f) | 486 scmd->cmnd[1] = (scmd->cmnd[1] & 0x1f) |
491 (sdev->lun << 5 & 0xe0); 487 (sdev->lun << 5 & 0xe0);
@@ -514,7 +510,6 @@ static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, int timeout)
514 */ 510 */
515 if (scsi_eh_eflags_chk(scmd, SCSI_EH_REC_TIMEOUT)) { 511 if (scsi_eh_eflags_chk(scmd, SCSI_EH_REC_TIMEOUT)) {
516 scsi_eh_eflags_clr(scmd, SCSI_EH_REC_TIMEOUT); 512 scsi_eh_eflags_clr(scmd, SCSI_EH_REC_TIMEOUT);
517 scmd->owner = SCSI_OWNER_LOWLEVEL;
518 513
519 /* 514 /*
520 * as far as the low level driver is 515 * as far as the low level driver is
@@ -530,8 +525,6 @@ static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, int timeout)
530 shost->hostt->eh_abort_handler(scmd); 525 shost->hostt->eh_abort_handler(scmd);
531 526
532 scmd->request->rq_status = RQ_SCSI_DONE; 527 scmd->request->rq_status = RQ_SCSI_DONE;
533 scmd->owner = SCSI_OWNER_ERROR_HANDLER;
534
535 rtn = FAILED; 528 rtn = FAILED;
536 } 529 }
537 530
@@ -742,9 +735,6 @@ static int scsi_try_to_abort_cmd(struct scsi_cmnd *scmd)
742 */ 735 */
743 if (scmd->serial_number == 0) 736 if (scmd->serial_number == 0)
744 return SUCCESS; 737 return SUCCESS;
745
746 scmd->owner = SCSI_OWNER_LOWLEVEL;
747
748 return scmd->device->host->hostt->eh_abort_handler(scmd); 738 return scmd->device->host->hostt->eh_abort_handler(scmd);
749} 739}
750 740
@@ -862,10 +852,7 @@ static int scsi_try_bus_device_reset(struct scsi_cmnd *scmd)
862 if (!scmd->device->host->hostt->eh_device_reset_handler) 852 if (!scmd->device->host->hostt->eh_device_reset_handler)
863 return FAILED; 853 return FAILED;
864 854
865 scmd->owner = SCSI_OWNER_LOWLEVEL;
866
867 rtn = scmd->device->host->hostt->eh_device_reset_handler(scmd); 855 rtn = scmd->device->host->hostt->eh_device_reset_handler(scmd);
868
869 if (rtn == SUCCESS) { 856 if (rtn == SUCCESS) {
870 scmd->device->was_reset = 1; 857 scmd->device->was_reset = 1;
871 scmd->device->expecting_cc_ua = 1; 858 scmd->device->expecting_cc_ua = 1;
@@ -1048,7 +1035,6 @@ static int scsi_try_bus_reset(struct scsi_cmnd *scmd)
1048 1035
1049 SCSI_LOG_ERROR_RECOVERY(3, printk("%s: Snd Bus RST\n", 1036 SCSI_LOG_ERROR_RECOVERY(3, printk("%s: Snd Bus RST\n",
1050 __FUNCTION__)); 1037 __FUNCTION__));
1051 scmd->owner = SCSI_OWNER_LOWLEVEL;
1052 1038
1053 if (!scmd->device->host->hostt->eh_bus_reset_handler) 1039 if (!scmd->device->host->hostt->eh_bus_reset_handler)
1054 return FAILED; 1040 return FAILED;
@@ -1077,7 +1063,6 @@ static int scsi_try_host_reset(struct scsi_cmnd *scmd)
1077 1063
1078 SCSI_LOG_ERROR_RECOVERY(3, printk("%s: Snd Host RST\n", 1064 SCSI_LOG_ERROR_RECOVERY(3, printk("%s: Snd Host RST\n",
1079 __FUNCTION__)); 1065 __FUNCTION__));
1080 scmd->owner = SCSI_OWNER_LOWLEVEL;
1081 1066
1082 if (!scmd->device->host->hostt->eh_host_reset_handler) 1067 if (!scmd->device->host->hostt->eh_host_reset_handler)
1083 return FAILED; 1068 return FAILED;
@@ -1819,8 +1804,7 @@ scsi_reset_provider(struct scsi_device *dev, int flag)
1819 memset(&scmd->eh_timeout, 0, sizeof(scmd->eh_timeout)); 1804 memset(&scmd->eh_timeout, 0, sizeof(scmd->eh_timeout));
1820 scmd->request->rq_status = RQ_SCSI_BUSY; 1805 scmd->request->rq_status = RQ_SCSI_BUSY;
1821 scmd->state = SCSI_STATE_INITIALIZING; 1806 scmd->state = SCSI_STATE_INITIALIZING;
1822 scmd->owner = SCSI_OWNER_MIDLEVEL; 1807
1823
1824 memset(&scmd->cmnd, '\0', sizeof(scmd->cmnd)); 1808 memset(&scmd->cmnd, '\0', sizeof(scmd->cmnd));
1825 1809
1826 scmd->scsi_done = scsi_reset_provider_done_command; 1810 scmd->scsi_done = scsi_reset_provider_done_command;