aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/task.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-05-05 20:47:44 -0400
committerDan Williams <dan.j.williams@intel.com>2011-07-03 07:04:46 -0400
commit5b3f2bd877382eaf4b5a7d90fdec72ef14b9ec97 (patch)
treeb0594e7c86943cf863ba106b6848c9b3a2559eab /drivers/scsi/isci/task.h
parent8694e79287ad92e351feceededeb6804babb6d9a (diff)
isci: fix ata locking
Upstream commit a29b5dad "libata: fix locking for sas paths" switched libsas ata locking to the ata_host lock. We need to do the same when returning ata tasks from the execute path. 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.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/scsi/isci/task.h b/drivers/scsi/isci/task.h
index 77cc54dbe81f..aa2458658d1e 100644
--- a/drivers/scsi/isci/task.h
+++ b/drivers/scsi/isci/task.h
@@ -344,26 +344,26 @@ isci_task_set_completion_status(
344* @status: This parameter is the status code for the completed task. 344* @status: This parameter is the status code for the completed task.
345* 345*
346*/ 346*/
347static inline void isci_execpath_callback( 347static inline void isci_execpath_callback(struct isci_host *ihost,
348 struct isci_host *ihost, 348 struct sas_task *task,
349 struct sas_task *task, 349 void (*func)(struct sas_task *))
350 void (*func)(struct sas_task *))
351{ 350{
352 unsigned long flags; 351 struct domain_device *dev = task->dev;
352
353 if (dev_is_sata(dev) && task->uldd_task) {
354 unsigned long flags;
353 355
354 if (dev_is_sata(task->dev) && task->uldd_task) {
355 /* Since we are still in the submit path, and since 356 /* Since we are still in the submit path, and since
356 * libsas takes the host lock on behalf of SATA 357 * libsas takes the host lock on behalf of SATA
357 * devices before I/O starts (in the non-discovery case), 358 * devices before I/O starts (in the non-discovery case),
358 * we need to unlock before we can call the callback function. 359 * we need to unlock before we can call the callback function.
359 */ 360 */
360 raw_local_irq_save(flags); 361 raw_local_irq_save(flags);
361 spin_unlock(ihost->shost->host_lock); 362 spin_unlock(dev->sata_dev.ap->lock);
362 func(task); 363 func(task);
363 spin_lock(ihost->shost->host_lock); 364 spin_lock(dev->sata_dev.ap->lock);
364 raw_local_irq_restore(flags); 365 raw_local_irq_restore(flags);
365 } else 366 } else
366 func(task); 367 func(task);
367} 368}
368
369#endif /* !defined(_SCI_TASK_H_) */ 369#endif /* !defined(_SCI_TASK_H_) */