mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
[SCSI] scsi_transport_sas: remove local_attached flag
This flag denotes local attachment of the phy. There are two problems with it: 1) It's actually redundant ... you can get the same information simply by seeing whether a host is the phys parent 2) we condition a lot of phy parameters on it on the false assumption that we can only control local phys. I'm wiring up phy resets in the aic94xx now, and it will be able to reset non-local phys as well. I fixed 2) by moving the local check into the reset and stats function of the mptsas, since that seems to be the only HBA that can't (currently) control non-local phys. Signed-off-by: James Bottomley <[email protected]>
This commit is contained in:
parent
8ce7a9c159
commit
f4ad7b5807
3 changed files with 12 additions and 14 deletions
|
|
@ -852,6 +852,10 @@ static int mptsas_get_linkerrors(struct sas_phy *phy)
|
|||
dma_addr_t dma_handle;
|
||||
int error;
|
||||
|
||||
/* FIXME: only have link errors on local phys */
|
||||
if (!scsi_is_sas_phy_local(phy))
|
||||
return -EINVAL;
|
||||
|
||||
hdr.PageVersion = MPI_SASPHY1_PAGEVERSION;
|
||||
hdr.ExtPageLength = 0;
|
||||
hdr.PageNumber = 1 /* page number 1*/;
|
||||
|
|
@ -924,6 +928,10 @@ static int mptsas_phy_reset(struct sas_phy *phy, int hard_reset)
|
|||
unsigned long timeleft;
|
||||
int error = -ERESTARTSYS;
|
||||
|
||||
/* FIXME: fusion doesn't allow non-local phy reset */
|
||||
if (!scsi_is_sas_phy_local(phy))
|
||||
return -EINVAL;
|
||||
|
||||
/* not implemented for expanders */
|
||||
if (phy->identify.target_port_protocols & SAS_PROTOCOL_SMP)
|
||||
return -ENXIO;
|
||||
|
|
@ -1570,9 +1578,6 @@ static int mptsas_probe_one_phy(struct device *dev,
|
|||
|
||||
if (!phy_info->phy) {
|
||||
|
||||
if (local)
|
||||
phy->local_attached = 1;
|
||||
|
||||
error = sas_phy_add(phy);
|
||||
if (error) {
|
||||
sas_phy_free(phy);
|
||||
|
|
|
|||
Loading…
Reference in a new issue