aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@steeleye.com>2006-08-25 14:48:18 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-08-27 23:30:11 -0400
commitf4ad7b5807385ad1fed0347d966e51a797cd1013 (patch)
tree7661a3f739cc6fc808175a482202885ee1c3ab48 /drivers/message
parent8ce7a9c159c8c4eb480f0a65c6af753dbf9a1a70 (diff)
[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 <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/message')
-rw-r--r--drivers/message/fusion/mptsas.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index dfdd1e445768..b752a479f6db 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -852,6 +852,10 @@ static int mptsas_get_linkerrors(struct sas_phy *phy)
852 dma_addr_t dma_handle; 852 dma_addr_t dma_handle;
853 int error; 853 int error;
854 854
855 /* FIXME: only have link errors on local phys */
856 if (!scsi_is_sas_phy_local(phy))
857 return -EINVAL;
858
855 hdr.PageVersion = MPI_SASPHY1_PAGEVERSION; 859 hdr.PageVersion = MPI_SASPHY1_PAGEVERSION;
856 hdr.ExtPageLength = 0; 860 hdr.ExtPageLength = 0;
857 hdr.PageNumber = 1 /* page number 1*/; 861 hdr.PageNumber = 1 /* page number 1*/;
@@ -924,6 +928,10 @@ static int mptsas_phy_reset(struct sas_phy *phy, int hard_reset)
924 unsigned long timeleft; 928 unsigned long timeleft;
925 int error = -ERESTARTSYS; 929 int error = -ERESTARTSYS;
926 930
931 /* FIXME: fusion doesn't allow non-local phy reset */
932 if (!scsi_is_sas_phy_local(phy))
933 return -EINVAL;
934
927 /* not implemented for expanders */ 935 /* not implemented for expanders */
928 if (phy->identify.target_port_protocols & SAS_PROTOCOL_SMP) 936 if (phy->identify.target_port_protocols & SAS_PROTOCOL_SMP)
929 return -ENXIO; 937 return -ENXIO;
@@ -1570,9 +1578,6 @@ static int mptsas_probe_one_phy(struct device *dev,
1570 1578
1571 if (!phy_info->phy) { 1579 if (!phy_info->phy) {
1572 1580
1573 if (local)
1574 phy->local_attached = 1;
1575
1576 error = sas_phy_add(phy); 1581 error = sas_phy_add(phy);
1577 if (error) { 1582 if (error) {
1578 sas_phy_free(phy); 1583 sas_phy_free(phy);