aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/skge.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/skge.c')
-rw-r--r--drivers/net/skge.c38
1 files changed, 21 insertions, 17 deletions
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index 57764935a9f8..c19f49bce7af 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -197,8 +197,8 @@ static u32 skge_supported_modes(const struct skge_hw *hw)
197 else if (hw->chip_id == CHIP_ID_YUKON) 197 else if (hw->chip_id == CHIP_ID_YUKON)
198 supported &= ~SUPPORTED_1000baseT_Half; 198 supported &= ~SUPPORTED_1000baseT_Half;
199 } else 199 } else
200 supported = SUPPORTED_1000baseT_Full | SUPPORTED_FIBRE 200 supported = SUPPORTED_1000baseT_Full | SUPPORTED_1000baseT_Half
201 | SUPPORTED_Autoneg; 201 | SUPPORTED_FIBRE | SUPPORTED_Autoneg;
202 202
203 return supported; 203 return supported;
204} 204}
@@ -1018,6 +1018,14 @@ static const u16 phy_pause_map[] = {
1018 [FLOW_MODE_REM_SEND] = PHY_AN_PAUSE_CAP | PHY_AN_PAUSE_ASYM, 1018 [FLOW_MODE_REM_SEND] = PHY_AN_PAUSE_CAP | PHY_AN_PAUSE_ASYM,
1019}; 1019};
1020 1020
1021/* special defines for FIBER (88E1011S only) */
1022static const u16 fiber_pause_map[] = {
1023 [FLOW_MODE_NONE] = PHY_X_P_NO_PAUSE,
1024 [FLOW_MODE_LOC_SEND] = PHY_X_P_ASYM_MD,
1025 [FLOW_MODE_SYMMETRIC] = PHY_X_P_SYM_MD,
1026 [FLOW_MODE_REM_SEND] = PHY_X_P_BOTH_MD,
1027};
1028
1021 1029
1022/* Check status of Broadcom phy link */ 1030/* Check status of Broadcom phy link */
1023static void bcom_check_link(struct skge_hw *hw, int port) 1031static void bcom_check_link(struct skge_hw *hw, int port)
@@ -1207,17 +1215,7 @@ static void xm_phy_init(struct skge_port *skge)
1207 if (skge->advertising & ADVERTISED_1000baseT_Full) 1215 if (skge->advertising & ADVERTISED_1000baseT_Full)
1208 ctrl |= PHY_X_AN_FD; 1216 ctrl |= PHY_X_AN_FD;
1209 1217
1210 switch(skge->flow_control) { 1218 ctrl |= fiber_pause_map[skge->flow_control];
1211 case FLOW_MODE_NONE:
1212 ctrl |= PHY_X_P_NO_PAUSE;
1213 break;
1214 case FLOW_MODE_LOC_SEND:
1215 ctrl |= PHY_X_P_ASYM_MD;
1216 break;
1217 case FLOW_MODE_SYMMETRIC:
1218 ctrl |= PHY_X_P_BOTH_MD;
1219 break;
1220 }
1221 1219
1222 xm_phy_write(hw, port, PHY_XMAC_AUNE_ADV, ctrl); 1220 xm_phy_write(hw, port, PHY_XMAC_AUNE_ADV, ctrl);
1223 1221
@@ -1796,11 +1794,17 @@ static void yukon_init(struct skge_hw *hw, int port)
1796 adv |= PHY_M_AN_10_FD; 1794 adv |= PHY_M_AN_10_FD;
1797 if (skge->advertising & ADVERTISED_10baseT_Half) 1795 if (skge->advertising & ADVERTISED_10baseT_Half)
1798 adv |= PHY_M_AN_10_HD; 1796 adv |= PHY_M_AN_10_HD;
1799 } else /* special defines for FIBER (88E1011S only) */
1800 adv |= PHY_M_AN_1000X_AHD | PHY_M_AN_1000X_AFD;
1801 1797
1802 /* Set Flow-control capabilities */ 1798 /* Set Flow-control capabilities */
1803 adv |= phy_pause_map[skge->flow_control]; 1799 adv |= phy_pause_map[skge->flow_control];
1800 } else {
1801 if (skge->advertising & ADVERTISED_1000baseT_Full)
1802 adv |= PHY_M_AN_1000X_AFD;
1803 if (skge->advertising & ADVERTISED_1000baseT_Half)
1804 adv |= PHY_M_AN_1000X_AHD;
1805
1806 adv |= fiber_pause_map[skge->flow_control];
1807 }
1804 1808
1805 /* Restart Auto-negotiation */ 1809 /* Restart Auto-negotiation */
1806 ctrl |= PHY_CT_ANE | PHY_CT_RE_CFG; 1810 ctrl |= PHY_CT_ANE | PHY_CT_RE_CFG;