aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mvsas
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/mvsas
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/mvsas')
-rw-r--r--drivers/scsi/mvsas/mv_sas.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c
index b118e632bc7d..cd882230591f 100644
--- a/drivers/scsi/mvsas/mv_sas.c
+++ b/drivers/scsi/mvsas/mv_sas.c
@@ -893,9 +893,6 @@ static int mvs_task_exec(struct sas_task *task, const int num, gfp_t gfp_flags,
893 893
894 mvi = ((struct mvs_device *)task->dev->lldd_dev)->mvi_info; 894 mvi = ((struct mvs_device *)task->dev->lldd_dev)->mvi_info;
895 895
896 if ((dev->dev_type == SATA_DEV) && (dev->sata_dev.ap != NULL))
897 spin_unlock_irq(dev->sata_dev.ap->lock);
898
899 spin_lock_irqsave(&mvi->lock, flags); 896 spin_lock_irqsave(&mvi->lock, flags);
900 rc = mvs_task_prep(task, mvi, is_tmf, tmf, &pass); 897 rc = mvs_task_prep(task, mvi, is_tmf, tmf, &pass);
901 if (rc) 898 if (rc)
@@ -906,9 +903,6 @@ static int mvs_task_exec(struct sas_task *task, const int num, gfp_t gfp_flags,
906 (MVS_CHIP_SLOT_SZ - 1)); 903 (MVS_CHIP_SLOT_SZ - 1));
907 spin_unlock_irqrestore(&mvi->lock, flags); 904 spin_unlock_irqrestore(&mvi->lock, flags);
908 905
909 if ((dev->dev_type == SATA_DEV) && (dev->sata_dev.ap != NULL))
910 spin_lock_irq(dev->sata_dev.ap->lock);
911
912 return rc; 906 return rc;
913} 907}
914 908