diff options
author | Darrick J. Wong <djwong@us.ibm.com> | 2007-01-11 17:15:15 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-01-13 17:17:04 -0500 |
commit | 37958fb040cf6f88b354b9fa7e846014ffbd3b73 (patch) | |
tree | 09da0d5e6d756619079c7b31113b231d850d6d36 | |
parent | 8f3b8fa9afe75cafc4feb317d305444f6c5271fb (diff) |
[SCSI] libsas: Remove SAS_TASK_INITIATOR_ABORTED flag
This flag is no longer necessary because we push tasks to be aborted into
the EH as soon as we possibly can, and let the SCSI EH code take care of
the coordination for which this flag was used.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
-rw-r--r-- | drivers/scsi/libsas/sas_scsi_host.c | 17 | ||||
-rw-r--r-- | include/scsi/libsas.h | 1 |
2 files changed, 0 insertions, 18 deletions
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c index 3f647c695da5..f90c332474c8 100644 --- a/drivers/scsi/libsas/sas_scsi_host.c +++ b/drivers/scsi/libsas/sas_scsi_host.c | |||
@@ -310,15 +310,6 @@ static enum task_disposition sas_scsi_find_task(struct sas_task *task) | |||
310 | spin_unlock_irqrestore(&core->task_queue_lock, flags); | 310 | spin_unlock_irqrestore(&core->task_queue_lock, flags); |
311 | } | 311 | } |
312 | 312 | ||
313 | spin_lock_irqsave(&task->task_state_lock, flags); | ||
314 | if (task->task_state_flags & SAS_TASK_INITIATOR_ABORTED) { | ||
315 | spin_unlock_irqrestore(&task->task_state_lock, flags); | ||
316 | SAS_DPRINTK("%s: task 0x%p already aborted\n", | ||
317 | __FUNCTION__, task); | ||
318 | return TASK_IS_ABORTED; | ||
319 | } | ||
320 | spin_unlock_irqrestore(&task->task_state_lock, flags); | ||
321 | |||
322 | for (i = 0; i < 5; i++) { | 313 | for (i = 0; i < 5; i++) { |
323 | SAS_DPRINTK("%s: aborting task 0x%p\n", __FUNCTION__, task); | 314 | SAS_DPRINTK("%s: aborting task 0x%p\n", __FUNCTION__, task); |
324 | res = si->dft->lldd_abort_task(task); | 315 | res = si->dft->lldd_abort_task(task); |
@@ -534,12 +525,6 @@ enum scsi_eh_timer_return sas_scsi_timed_out(struct scsi_cmnd *cmd) | |||
534 | } | 525 | } |
535 | 526 | ||
536 | spin_lock_irqsave(&task->task_state_lock, flags); | 527 | spin_lock_irqsave(&task->task_state_lock, flags); |
537 | if (task->task_state_flags & SAS_TASK_INITIATOR_ABORTED) { | ||
538 | spin_unlock_irqrestore(&task->task_state_lock, flags); | ||
539 | SAS_DPRINTK("command 0x%p, task 0x%p, aborted by initiator: " | ||
540 | "EH_NOT_HANDLED\n", cmd, task); | ||
541 | return EH_NOT_HANDLED; | ||
542 | } | ||
543 | if (task->task_state_flags & SAS_TASK_STATE_DONE) { | 528 | if (task->task_state_flags & SAS_TASK_STATE_DONE) { |
544 | spin_unlock_irqrestore(&task->task_state_lock, flags); | 529 | spin_unlock_irqrestore(&task->task_state_lock, flags); |
545 | SAS_DPRINTK("command 0x%p, task 0x%p, timed out: EH_HANDLED\n", | 530 | SAS_DPRINTK("command 0x%p, task 0x%p, timed out: EH_HANDLED\n", |
@@ -826,7 +811,6 @@ static int do_sas_task_abort(struct sas_task *task) | |||
826 | return 0; | 811 | return 0; |
827 | } | 812 | } |
828 | 813 | ||
829 | task->task_state_flags |= SAS_TASK_INITIATOR_ABORTED; | ||
830 | if (!(task->task_state_flags & SAS_TASK_STATE_DONE)) | 814 | if (!(task->task_state_flags & SAS_TASK_STATE_DONE)) |
831 | task->task_state_flags |= SAS_TASK_STATE_ABORTED; | 815 | task->task_state_flags |= SAS_TASK_STATE_ABORTED; |
832 | spin_unlock_irqrestore(&task->task_state_lock, flags); | 816 | spin_unlock_irqrestore(&task->task_state_lock, flags); |
@@ -849,7 +833,6 @@ static int do_sas_task_abort(struct sas_task *task) | |||
849 | } | 833 | } |
850 | 834 | ||
851 | spin_lock_irqsave(&task->task_state_lock, flags); | 835 | spin_lock_irqsave(&task->task_state_lock, flags); |
852 | task->task_state_flags &= ~SAS_TASK_INITIATOR_ABORTED; | ||
853 | if (!(task->task_state_flags & SAS_TASK_STATE_DONE)) | 836 | if (!(task->task_state_flags & SAS_TASK_STATE_DONE)) |
854 | task->task_state_flags &= ~SAS_TASK_STATE_ABORTED; | 837 | task->task_state_flags &= ~SAS_TASK_STATE_ABORTED; |
855 | spin_unlock_irqrestore(&task->task_state_lock, flags); | 838 | spin_unlock_irqrestore(&task->task_state_lock, flags); |
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 0689d6682aa3..1d394855b366 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h | |||
@@ -553,7 +553,6 @@ struct sas_task { | |||
553 | #define SAS_TASK_STATE_PENDING 1 | 553 | #define SAS_TASK_STATE_PENDING 1 |
554 | #define SAS_TASK_STATE_DONE 2 | 554 | #define SAS_TASK_STATE_DONE 2 |
555 | #define SAS_TASK_STATE_ABORTED 4 | 555 | #define SAS_TASK_STATE_ABORTED 4 |
556 | #define SAS_TASK_INITIATOR_ABORTED 8 | ||
557 | #define SAS_TASK_AT_INITIATOR 16 | 556 | #define SAS_TASK_AT_INITIATOR 16 |
558 | 557 | ||
559 | static inline struct sas_task *sas_alloc_task(gfp_t flags) | 558 | static inline struct sas_task *sas_alloc_task(gfp_t flags) |