diff options
author | Dan Williams <dan.j.williams@intel.com> | 2011-03-10 00:27:46 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 06:55:30 -0400 |
commit | 50e7f9b5a9ae4a763b2c27500807cf237faca9b0 (patch) | |
tree | 2275230176a12f2f0a5f7a395100b5a4f2c3e134 /drivers/scsi/isci/task.h | |
parent | 70957a94d70cb82459bd3aea171c54d0a5cd6dbb (diff) |
isci: Errors in the submit path for SATA devices manage the ap lock.
Since libsas takes the domain device sata_dev.ap->lock before submitting
a task, error completions in the submit path for SATA devices must
unlock/relock when completing the sas_task back to libsas.
Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/task.h')
-rw-r--r-- | drivers/scsi/isci/task.h | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/drivers/scsi/isci/task.h b/drivers/scsi/isci/task.h index 4c2a27eede49..e1c9c8f04050 100644 --- a/drivers/scsi/isci/task.h +++ b/drivers/scsi/isci/task.h | |||
@@ -341,64 +341,5 @@ isci_task_set_completion_status( | |||
341 | return task_notification_selection; | 341 | return task_notification_selection; |
342 | 342 | ||
343 | } | 343 | } |
344 | /** | ||
345 | * isci_task_complete_for_upper_layer() - This function completes the request | ||
346 | * to the upper layer driver. | ||
347 | * @host: This parameter is a pointer to the host on which the the request | ||
348 | * should be queued (either as an error or success). | ||
349 | * @request: This parameter is the completed request. | ||
350 | * @response: This parameter is the response code for the completed task. | ||
351 | * @status: This parameter is the status code for the completed task. | ||
352 | * | ||
353 | * none. | ||
354 | */ | ||
355 | static inline void isci_task_complete_for_upper_layer( | ||
356 | struct sas_task *task, | ||
357 | enum service_response response, | ||
358 | enum exec_status status, | ||
359 | enum isci_completion_selection task_notification_selection) | ||
360 | { | ||
361 | task_notification_selection | ||
362 | = isci_task_set_completion_status(task, response, status, | ||
363 | task_notification_selection); | ||
364 | |||
365 | /* Tasks aborted specifically by a call to the lldd_abort_task | ||
366 | * function should not be completed to the host in the regular path. | ||
367 | */ | ||
368 | switch (task_notification_selection) { | ||
369 | case isci_perform_normal_io_completion: | ||
370 | /* Normal notification (task_done) */ | ||
371 | dev_dbg(task->dev->port->ha->dev, | ||
372 | "%s: Normal - task = %p, response=%d, status=%d\n", | ||
373 | __func__, task, response, status); | ||
374 | task->task_done(task); | ||
375 | task->lldd_task = NULL; | ||
376 | break; | ||
377 | |||
378 | case isci_perform_aborted_io_completion: | ||
379 | /* No notification because this request is already in the | ||
380 | * abort path. | ||
381 | */ | ||
382 | dev_warn(task->dev->port->ha->dev, | ||
383 | "%s: Aborted - task = %p, response=%d, status=%d\n", | ||
384 | __func__, task, response, status); | ||
385 | break; | ||
386 | |||
387 | case isci_perform_error_io_completion: | ||
388 | /* Use sas_task_abort */ | ||
389 | dev_warn(task->dev->port->ha->dev, | ||
390 | "%s: Error - task = %p, response=%d, status=%d\n", | ||
391 | __func__, task, response, status); | ||
392 | sas_task_abort(task); | ||
393 | break; | ||
394 | |||
395 | default: | ||
396 | dev_warn(task->dev->port->ha->dev, | ||
397 | "%s: isci task notification default case!", | ||
398 | __func__); | ||
399 | sas_task_abort(task); | ||
400 | break; | ||
401 | } | ||
402 | } | ||
403 | 344 | ||
404 | #endif /* !defined(_SCI_TASK_H_) */ | 345 | #endif /* !defined(_SCI_TASK_H_) */ |