aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pm8001
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-11-17 20:59:50 -0500
committerJames Bottomley <JBottomley@Parallels.com>2012-02-19 14:50:12 -0500
commit312d3e56119a4bc5c36a96818f87f650c069ddc2 (patch)
treed8cf7586656301ff1c4e5a49f9cbddde61e3e561 /drivers/scsi/pm8001
parentb1124cd3ec97406c767b90bf7e93ecd2d2915592 (diff)
[SCSI] libsas: remove ata_port.lock management duties from lldds
Each libsas driver (mvsas, pm8001, and isci) has invented a different method for managing the ap->lock. The lock is held by the ata ->queuecommand() path. mvsas drops it prior to acquiring any internal locks which allows it to hold its internal lock across calls to task->task_done(). This capability is important as it is the only way the driver can flush task->task_done() instances to guarantee that it no longer has any in-flight references to a domain_device at ->lldd_dev_gone() time. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/pm8001')
-rw-r--r--drivers/scsi/pm8001/pm8001_sas.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/scsi/pm8001/pm8001_sas.c b/drivers/scsi/pm8001/pm8001_sas.c
index 50837933a1e5..310860e37d98 100644
--- a/drivers/scsi/pm8001/pm8001_sas.c
+++ b/drivers/scsi/pm8001/pm8001_sas.c
@@ -364,7 +364,7 @@ static int pm8001_task_exec(struct sas_task *task, const int num,
364 struct pm8001_ccb_info *ccb; 364 struct pm8001_ccb_info *ccb;
365 u32 tag = 0xdeadbeef, rc, n_elem = 0; 365 u32 tag = 0xdeadbeef, rc, n_elem = 0;
366 u32 n = num; 366 u32 n = num;
367 unsigned long flags = 0, flags_libsas = 0; 367 unsigned long flags = 0;
368 368
369 if (!dev->port) { 369 if (!dev->port) {
370 struct task_status_struct *tsm = &t->task_status; 370 struct task_status_struct *tsm = &t->task_status;
@@ -388,11 +388,7 @@ static int pm8001_task_exec(struct sas_task *task, const int num,
388 ts->stat = SAS_PHY_DOWN; 388 ts->stat = SAS_PHY_DOWN;
389 389
390 spin_unlock_irqrestore(&pm8001_ha->lock, flags); 390 spin_unlock_irqrestore(&pm8001_ha->lock, flags);
391 spin_unlock_irqrestore(dev->sata_dev.ap->lock,
392 flags_libsas);
393 t->task_done(t); 391 t->task_done(t);
394 spin_lock_irqsave(dev->sata_dev.ap->lock,
395 flags_libsas);
396 spin_lock_irqsave(&pm8001_ha->lock, flags); 392 spin_lock_irqsave(&pm8001_ha->lock, flags);
397 if (n > 1) 393 if (n > 1)
398 t = list_entry(t->list.next, 394 t = list_entry(t->list.next,