On Tue, May 3, 2011 at 11:36 AM, Dan Williams <dan.j.williams@xxxxxxxxx> wrote: > This patch also introduces sas_device_gone() which hopefully allows > subtle/tricky locking to be dropped from lldd drivers, like the > following in mvsas which is broken if the ata path is ever converted to > call lldd_execute_task() with irqs enabled: [..] > diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c > index 505ffe3..7a785df 100644 > --- a/drivers/scsi/libsas/sas_expander.c > +++ b/drivers/scsi/libsas/sas_expander.c > @@ -1721,13 +1721,27 @@ out: > return res; > } > > +/* FIXME: delete this routine when/if sas_ata stops submitting tasks > + * with host_lock held > + */ > +void sas_device_gone(struct domain_device *dev) > +{ > + struct sas_rphy *rphy = dev->rphy; > + struct Scsi_Host *shost = dev_to_shost(rphy->dev.parent); > + > + /* take the lock to synchronize against incoming sata i/o */ > + spin_lock_irq(shost->host_lock); > + dev->gone = 1; > + spin_unlock_irq(shost->host_lock); > +} Commit a29b5dad "libata: fix locking for sas paths" has gone in since this patch was created so this locking no longer has any effect. Now needs to be dev->sata_dev.ap->lock, will resubmit. -- Dan -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html