diff options
| author | Frederic Weisbecker <fweisbec@gmail.com> | 2013-05-02 17:37:49 +0200 | 
|---|---|---|
| committer | Frederic Weisbecker <fweisbec@gmail.com> | 2013-05-02 17:54:19 +0200 | 
| commit | c032862fba51a3ca504752d3a25186b324c5ce83 (patch) | |
| tree | 955dc2ba4ab3df76ecc2bb780ee84aca04967e8d /drivers/scsi/libsas/sas_expander.c | |
| parent | fda76e074c7737fc57855dd17c762e50ed526052 (diff) | |
| parent | 8700c95adb033843fc163d112b9d21d4fda78018 (diff) | |
| download | olio-linux-3.10-c032862fba51a3ca504752d3a25186b324c5ce83.tar.xz olio-linux-3.10-c032862fba51a3ca504752d3a25186b324c5ce83.zip  | |
Merge commit '8700c95adb03' into timers/nohz
The full dynticks tree needs the latest RCU and sched
upstream updates in order to fix some dependencies.
Merge a common upstream merge point that has these
updates.
Conflicts:
	include/linux/perf_event.h
	kernel/rcutree.h
	kernel/rcutree_plugin.h
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
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;  |