From 312d3e56119a4bc5c36a96818f87f650c069ddc2 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 17 Nov 2011 17:59:50 -0800 Subject: [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 Signed-off-by: James Bottomley --- drivers/scsi/mvsas/mv_sas.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'drivers/scsi/mvsas') 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, mvi = ((struct mvs_device *)task->dev->lldd_dev)->mvi_info; - if ((dev->dev_type == SATA_DEV) && (dev->sata_dev.ap != NULL)) - spin_unlock_irq(dev->sata_dev.ap->lock); - spin_lock_irqsave(&mvi->lock, flags); rc = mvs_task_prep(task, mvi, is_tmf, tmf, &pass); if (rc) @@ -906,9 +903,6 @@ static int mvs_task_exec(struct sas_task *task, const int num, gfp_t gfp_flags, (MVS_CHIP_SLOT_SZ - 1)); spin_unlock_irqrestore(&mvi->lock, flags); - if ((dev->dev_type == SATA_DEV) && (dev->sata_dev.ap != NULL)) - spin_lock_irq(dev->sata_dev.ap->lock); - return rc; } -- cgit v1.2.2