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>
This commit is contained in:
parent
8694e79287
commit
5b3f2bd877
1 changed files with 13 additions and 13 deletions
|
@ -344,26 +344,26 @@ isci_task_set_completion_status(
|
||||||
* @status: This parameter is the status code for the completed task.
|
* @status: This parameter is the status code for the completed task.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static inline void isci_execpath_callback(
|
static inline void isci_execpath_callback(struct isci_host *ihost,
|
||||||
struct isci_host *ihost,
|
struct sas_task *task,
|
||||||
struct sas_task *task,
|
void (*func)(struct sas_task *))
|
||||||
void (*func)(struct sas_task *))
|
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
struct domain_device *dev = task->dev;
|
||||||
|
|
||||||
|
if (dev_is_sata(dev) && task->uldd_task) {
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
if (dev_is_sata(task->dev) && task->uldd_task) {
|
|
||||||
/* Since we are still in the submit path, and since
|
/* Since we are still in the submit path, and since
|
||||||
* libsas takes the host lock on behalf of SATA
|
* libsas takes the host lock on behalf of SATA
|
||||||
* devices before I/O starts (in the non-discovery case),
|
* devices before I/O starts (in the non-discovery case),
|
||||||
* we need to unlock before we can call the callback function.
|
* we need to unlock before we can call the callback function.
|
||||||
*/
|
*/
|
||||||
raw_local_irq_save(flags);
|
raw_local_irq_save(flags);
|
||||||
spin_unlock(ihost->shost->host_lock);
|
spin_unlock(dev->sata_dev.ap->lock);
|
||||||
func(task);
|
func(task);
|
||||||
spin_lock(ihost->shost->host_lock);
|
spin_lock(dev->sata_dev.ap->lock);
|
||||||
raw_local_irq_restore(flags);
|
raw_local_irq_restore(flags);
|
||||||
} else
|
} else
|
||||||
func(task);
|
func(task);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* !defined(_SCI_TASK_H_) */
|
#endif /* !defined(_SCI_TASK_H_) */
|
||||||
|
|
Reference in a new issue