diff options
author | Jeff Skirvin <jeffrey.d.skirvin@intel.com> | 2011-10-27 18:05:16 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-10-31 05:17:48 -0400 |
commit | 98145cb722b51ccc3ba27166c9803545accba950 (patch) | |
tree | 714aaae27bd45da93793729f3321c6409aad45ae /drivers/scsi/isci/task.h | |
parent | db49c2d037d50dfc67b29a4e013d6250ca97c3aa (diff) |
[SCSI] isci: Fix task management for SMP, SATA and on dev remove.
libsas uses the LLDD abort task interface to handle I/O timeouts
in the SATA/STP and SMP discovery paths, so this change will terminate
STP/SMP requests. Also, if the device is gone, the lldd will prevent
libsas from further escalations in the error handler.
Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/isci/task.h')
-rw-r--r-- | drivers/scsi/isci/task.h | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/drivers/scsi/isci/task.h b/drivers/scsi/isci/task.h index c9ccd0b5ff53..bc78c0a41d5c 100644 --- a/drivers/scsi/isci/task.h +++ b/drivers/scsi/isci/task.h | |||
@@ -226,35 +226,6 @@ enum isci_completion_selection { | |||
226 | isci_perform_error_io_completion /* Use sas_task_abort */ | 226 | isci_perform_error_io_completion /* Use sas_task_abort */ |
227 | }; | 227 | }; |
228 | 228 | ||
229 | static inline void isci_set_task_doneflags( | ||
230 | struct sas_task *task) | ||
231 | { | ||
232 | /* Since no futher action will be taken on this task, | ||
233 | * make sure to mark it complete from the lldd perspective. | ||
234 | */ | ||
235 | task->task_state_flags |= SAS_TASK_STATE_DONE; | ||
236 | task->task_state_flags &= ~SAS_TASK_AT_INITIATOR; | ||
237 | task->task_state_flags &= ~SAS_TASK_STATE_PENDING; | ||
238 | } | ||
239 | /** | ||
240 | * isci_task_all_done() - This function clears the task bits to indicate the | ||
241 | * LLDD is done with the task. | ||
242 | * | ||
243 | * | ||
244 | */ | ||
245 | static inline void isci_task_all_done( | ||
246 | struct sas_task *task) | ||
247 | { | ||
248 | unsigned long flags; | ||
249 | |||
250 | /* Since no futher action will be taken on this task, | ||
251 | * make sure to mark it complete from the lldd perspective. | ||
252 | */ | ||
253 | spin_lock_irqsave(&task->task_state_lock, flags); | ||
254 | isci_set_task_doneflags(task); | ||
255 | spin_unlock_irqrestore(&task->task_state_lock, flags); | ||
256 | } | ||
257 | |||
258 | /** | 229 | /** |
259 | * isci_task_set_completion_status() - This function sets the completion status | 230 | * isci_task_set_completion_status() - This function sets the completion status |
260 | * for the request. | 231 | * for the request. |
@@ -336,7 +307,9 @@ isci_task_set_completion_status( | |||
336 | /* Fall through to the normal case... */ | 307 | /* Fall through to the normal case... */ |
337 | case isci_perform_normal_io_completion: | 308 | case isci_perform_normal_io_completion: |
338 | /* Normal notification (task_done) */ | 309 | /* Normal notification (task_done) */ |
339 | isci_set_task_doneflags(task); | 310 | task->task_state_flags |= SAS_TASK_STATE_DONE; |
311 | task->task_state_flags &= ~(SAS_TASK_AT_INITIATOR | | ||
312 | SAS_TASK_STATE_PENDING); | ||
340 | break; | 313 | break; |
341 | default: | 314 | default: |
342 | WARN_ONCE(1, "unknown task_notification_selection: %d\n", | 315 | WARN_ONCE(1, "unknown task_notification_selection: %d\n", |