diff options
| author | Takashi Iwai <tiwai@suse.de> | 2013-04-18 16:24:31 +0200 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2013-04-18 16:24:31 +0200 |
| commit | 8dd2b66d1a961231685a3bfe5937c85d846fbf5d (patch) | |
| tree | 8117553488bf4ef09b048a4b343cf37cc16bf46d /drivers/scsi/libsas/sas_expander.c | |
| parent | 126825e7ea271ae8e3172e10ca1fc22c908b5385 (diff) | |
| parent | 24568ea4bef5ab8106206eddf5512434421c00ed (diff) | |
| download | olio-linux-3.10-8dd2b66d1a961231685a3bfe5937c85d846fbf5d.tar.xz olio-linux-3.10-8dd2b66d1a961231685a3bfe5937c85d846fbf5d.zip | |
Merge tag 'asoc-v3.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: More updates for v3.10
The main additional change here is Lars-Peter's DMA work plus the
platform conversions which have been tested - getting this in mainline
will make life easier for development after the merge window. These
factor a large chunk of code out of the drivers for the platforms using
dmaengine, greatly simplifying development.
Diffstat (limited to 'drivers/scsi/libsas/sas_expander.c')
| -rw-r--r-- | drivers/scsi/libsas/sas_expander.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index aec2e0da501..55cbd018015 100644 --- a/drivers/scsi/libsas/sas_expander.c +++ b/drivers/scsi/libsas/sas_expander.c @@ -235,6 +235,17 @@ static void sas_set_ex_phy(struct domain_device *dev, int phy_id, void *rsp) linkrate = phy->linkrate; memcpy(sas_addr, phy->attached_sas_addr, SAS_ADDR_SIZE); + /* Handle vacant phy - rest of dr data is not valid so skip it */ + if (phy->phy_state == PHY_VACANT) { + memset(phy->attached_sas_addr, 0, SAS_ADDR_SIZE); + phy->attached_dev_type = NO_DEVICE; + if (!test_bit(SAS_HA_ATA_EH_ACTIVE, &ha->state)) { + phy->phy_id = phy_id; + goto skip; + } else + goto out; + } + phy->attached_dev_type = to_dev_type(dr); if (test_bit(SAS_HA_ATA_EH_ACTIVE, &ha->state)) goto out; @@ -272,6 +283,7 @@ static void sas_set_ex_phy(struct domain_device *dev, int phy_id, void *rsp) phy->phy->maximum_linkrate = dr->pmax_linkrate; phy->phy->negotiated_linkrate = phy->linkrate; + skip: if (new_phy) if (sas_phy_add(phy->phy)) { sas_phy_free(phy->phy); @@ -388,7 +400,7 @@ int sas_ex_phy_discover(struct domain_device *dev, int single) if (!disc_req) return -ENOMEM; - disc_resp = alloc_smp_req(DISCOVER_RESP_SIZE); + disc_resp = alloc_smp_resp(DISCOVER_RESP_SIZE); if (!disc_resp) { kfree(disc_req); return -ENOMEM; |