diff options
author | Jeff Skirvin <jeffrey.d.skirvin@intel.com> | 2011-11-16 09:44:13 +0000 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-02-19 14:22:49 -0600 |
commit | 89d3cf6ac3cdc4f15a82709f8c78ed169a98be5b (patch) | |
tree | 6da0cf7d0f6e0ff10890f456e754aa6f76013452 /drivers/scsi/libsas/sas_discover.c | |
parent | 1f4fe89c9c78d3163cf1e389bdc6438a44b64244 (diff) |
[SCSI] libsas: add mutex for SMP task execution
SAS does not tag SMP requests, and at least one lldd (isci) does not permit
more than one in-flight request at a time.
[jejb: fix sas_init_dev tab issues while we're at it]
Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/libsas/sas_discover.c')
-rw-r--r-- | drivers/scsi/libsas/sas_discover.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/drivers/scsi/libsas/sas_discover.c b/drivers/scsi/libsas/sas_discover.c index bad5eba4a92..c56cc640081 100644 --- a/drivers/scsi/libsas/sas_discover.c +++ b/drivers/scsi/libsas/sas_discover.c @@ -37,21 +37,22 @@ void sas_init_dev(struct domain_device *dev) { - switch (dev->dev_type) { - case SAS_END_DEV: - break; - case EDGE_DEV: - case FANOUT_DEV: - INIT_LIST_HEAD(&dev->ex_dev.children); - break; - case SATA_DEV: - case SATA_PM: - case SATA_PM_PORT: - INIT_LIST_HEAD(&dev->sata_dev.children); - break; - default: - break; - } + switch (dev->dev_type) { + case SAS_END_DEV: + break; + case EDGE_DEV: + case FANOUT_DEV: + INIT_LIST_HEAD(&dev->ex_dev.children); + mutex_init(&dev->ex_dev.cmd_mutex); + break; + case SATA_DEV: + case SATA_PM: + case SATA_PM_PORT: + INIT_LIST_HEAD(&dev->sata_dev.children); + break; + default: + break; + } } /* ---------- Domain device discovery ---------- */ |