diff options
Diffstat (limited to 'drivers/scsi/libsas/sas_expander.c')
-rw-r--r-- | drivers/scsi/libsas/sas_expander.c | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index b653a263f76a..02e796ee027e 100644 --- a/drivers/scsi/libsas/sas_expander.c +++ b/drivers/scsi/libsas/sas_expander.c | |||
@@ -191,20 +191,7 @@ static void sas_set_ex_phy(struct domain_device *dev, int phy_id, | |||
191 | phy->phy->maximum_linkrate_hw = SAS_LINK_RATE_3_0_GBPS; | 191 | phy->phy->maximum_linkrate_hw = SAS_LINK_RATE_3_0_GBPS; |
192 | phy->phy->minimum_linkrate = SAS_LINK_RATE_1_5_GBPS; | 192 | phy->phy->minimum_linkrate = SAS_LINK_RATE_1_5_GBPS; |
193 | phy->phy->maximum_linkrate = SAS_LINK_RATE_3_0_GBPS; | 193 | phy->phy->maximum_linkrate = SAS_LINK_RATE_3_0_GBPS; |
194 | switch (phy->linkrate) { | 194 | phy->phy->negotiated_linkrate = phy->linkrate; |
195 | case PHY_LINKRATE_1_5: | ||
196 | phy->phy->negotiated_linkrate = SAS_LINK_RATE_1_5_GBPS; | ||
197 | break; | ||
198 | case PHY_LINKRATE_3: | ||
199 | phy->phy->negotiated_linkrate = SAS_LINK_RATE_3_0_GBPS; | ||
200 | break; | ||
201 | case PHY_LINKRATE_6: | ||
202 | phy->phy->negotiated_linkrate = SAS_LINK_RATE_6_0_GBPS; | ||
203 | break; | ||
204 | default: | ||
205 | phy->phy->negotiated_linkrate = SAS_LINK_RATE_UNKNOWN; | ||
206 | break; | ||
207 | } | ||
208 | 195 | ||
209 | if (!rediscover) | 196 | if (!rediscover) |
210 | sas_phy_add(phy->phy); | 197 | sas_phy_add(phy->phy); |
@@ -450,7 +437,7 @@ static void sas_ex_disable_phy(struct domain_device *dev, int phy_id) | |||
450 | struct ex_phy *phy = &ex->ex_phy[phy_id]; | 437 | struct ex_phy *phy = &ex->ex_phy[phy_id]; |
451 | 438 | ||
452 | sas_smp_phy_control(dev, phy_id, PHY_FUNC_DISABLE); | 439 | sas_smp_phy_control(dev, phy_id, PHY_FUNC_DISABLE); |
453 | phy->linkrate = PHY_DISABLED; | 440 | phy->linkrate = SAS_PHY_DISABLED; |
454 | } | 441 | } |
455 | 442 | ||
456 | static void sas_ex_disable_port(struct domain_device *dev, u8 *sas_addr) | 443 | static void sas_ex_disable_port(struct domain_device *dev, u8 *sas_addr) |
@@ -743,7 +730,7 @@ static int sas_ex_discover_dev(struct domain_device *dev, int phy_id) | |||
743 | int res = 0; | 730 | int res = 0; |
744 | 731 | ||
745 | /* Phy state */ | 732 | /* Phy state */ |
746 | if (ex_phy->linkrate == PHY_SPINUP_HOLD) { | 733 | if (ex_phy->linkrate == SAS_SATA_SPINUP_HOLD) { |
747 | if (!sas_smp_phy_control(dev, phy_id, PHY_FUNC_LINK_RESET)) | 734 | if (!sas_smp_phy_control(dev, phy_id, PHY_FUNC_LINK_RESET)) |
748 | res = sas_ex_phy_discover(dev, phy_id); | 735 | res = sas_ex_phy_discover(dev, phy_id); |
749 | if (res) | 736 | if (res) |
@@ -773,7 +760,7 @@ static int sas_ex_discover_dev(struct domain_device *dev, int phy_id) | |||
773 | sas_configure_routing(dev, ex_phy->attached_sas_addr); | 760 | sas_configure_routing(dev, ex_phy->attached_sas_addr); |
774 | } | 761 | } |
775 | return 0; | 762 | return 0; |
776 | } else if (ex_phy->linkrate == PHY_LINKRATE_UNKNOWN) | 763 | } else if (ex_phy->linkrate == SAS_LINK_RATE_UNKNOWN) |
777 | return 0; | 764 | return 0; |
778 | 765 | ||
779 | if (ex_phy->attached_dev_type != SAS_END_DEV && | 766 | if (ex_phy->attached_dev_type != SAS_END_DEV && |
@@ -922,9 +909,9 @@ static int sas_ex_discover_devices(struct domain_device *dev, int single) | |||
922 | continue; | 909 | continue; |
923 | 910 | ||
924 | switch (ex_phy->linkrate) { | 911 | switch (ex_phy->linkrate) { |
925 | case PHY_DISABLED: | 912 | case SAS_PHY_DISABLED: |
926 | case PHY_RESET_PROBLEM: | 913 | case SAS_PHY_RESET_PROBLEM: |
927 | case PHY_PORT_SELECTOR: | 914 | case SAS_SATA_PORT_SELECTOR: |
928 | continue; | 915 | continue; |
929 | default: | 916 | default: |
930 | res = sas_ex_discover_dev(dev, i); | 917 | res = sas_ex_discover_dev(dev, i); |