diff options
author | David S. Miller <davem@davemloft.net> | 2013-01-15 15:05:59 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-01-15 15:05:59 -0500 |
commit | 4b87f922598acf91eee18f71688a33f54f57bcde (patch) | |
tree | 9cdfe30c6b96c47093da5392ed82d147290cd64c /drivers/net/ethernet/broadcom | |
parent | 55eb555d9674e2ebe9d4de0146602f96ff18e7d6 (diff) | |
parent | daf3ec688e057f6060fb9bb0819feac7a8bbf45c (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
Documentation/networking/ip-sysctl.txt
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
Both conflicts were simply overlapping context.
A build fix for qlcnic is in here too, simply removing the added
devinit annotations which no longer exist.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 30 | ||||
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 60 | ||||
-rw-r--r-- | drivers/net/ethernet/broadcom/tg3.c | 62 |
4 files changed, 120 insertions, 34 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index 00706c4b090c..6312e636e37b 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | |||
@@ -78,8 +78,8 @@ static inline void bnx2x_move_fp(struct bnx2x *bp, int from, int to) | |||
78 | new_txdata_index = new_max_eth_txqs + FCOE_TXQ_IDX_OFFSET; | 78 | new_txdata_index = new_max_eth_txqs + FCOE_TXQ_IDX_OFFSET; |
79 | } | 79 | } |
80 | 80 | ||
81 | memcpy(&bp->bnx2x_txq[old_txdata_index], | 81 | memcpy(&bp->bnx2x_txq[new_txdata_index], |
82 | &bp->bnx2x_txq[new_txdata_index], | 82 | &bp->bnx2x_txq[old_txdata_index], |
83 | sizeof(struct bnx2x_fp_txdata)); | 83 | sizeof(struct bnx2x_fp_txdata)); |
84 | to_fp->txdata_ptr[0] = &bp->bnx2x_txq[new_txdata_index]; | 84 | to_fp->txdata_ptr[0] = &bp->bnx2x_txq[new_txdata_index]; |
85 | } | 85 | } |
@@ -112,6 +112,31 @@ void bnx2x_fill_fw_str(struct bnx2x *bp, char *buf, size_t buf_len) | |||
112 | } | 112 | } |
113 | } | 113 | } |
114 | 114 | ||
115 | /** | ||
116 | * bnx2x_shrink_eth_fp - guarantees fastpath structures stay intact | ||
117 | * | ||
118 | * @bp: driver handle | ||
119 | * @delta: number of eth queues which were not allocated | ||
120 | */ | ||
121 | static void bnx2x_shrink_eth_fp(struct bnx2x *bp, int delta) | ||
122 | { | ||
123 | int i, cos, old_eth_num = BNX2X_NUM_ETH_QUEUES(bp); | ||
124 | |||
125 | /* Queue pointer cannot be re-set on an fp-basis, as moving pointer | ||
126 | * backward along the array could cause memory to be overriden | ||
127 | */ | ||
128 | for (cos = 1; cos < bp->max_cos; cos++) { | ||
129 | for (i = 0; i < old_eth_num - delta; i++) { | ||
130 | struct bnx2x_fastpath *fp = &bp->fp[i]; | ||
131 | int new_idx = cos * (old_eth_num - delta) + i; | ||
132 | |||
133 | memcpy(&bp->bnx2x_txq[new_idx], fp->txdata_ptr[cos], | ||
134 | sizeof(struct bnx2x_fp_txdata)); | ||
135 | fp->txdata_ptr[cos] = &bp->bnx2x_txq[new_idx]; | ||
136 | } | ||
137 | } | ||
138 | } | ||
139 | |||
115 | int load_count[2][3] = { {0} }; /* per-path: 0-common, 1-port0, 2-port1 */ | 140 | int load_count[2][3] = { {0} }; /* per-path: 0-common, 1-port0, 2-port1 */ |
116 | 141 | ||
117 | /* free skb in the packet ring at pos idx | 142 | /* free skb in the packet ring at pos idx |
@@ -4136,6 +4161,7 @@ int bnx2x_alloc_fp_mem(struct bnx2x *bp) | |||
4136 | int delta = BNX2X_NUM_ETH_QUEUES(bp) - i; | 4161 | int delta = BNX2X_NUM_ETH_QUEUES(bp) - i; |
4137 | 4162 | ||
4138 | WARN_ON(delta < 0); | 4163 | WARN_ON(delta < 0); |
4164 | bnx2x_shrink_eth_fp(bp, delta); | ||
4139 | if (CNIC_SUPPORT(bp)) | 4165 | if (CNIC_SUPPORT(bp)) |
4140 | /* move non eth FPs next to last eth FP | 4166 | /* move non eth FPs next to last eth FP |
4141 | * must be done in that order | 4167 | * must be done in that order |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c index 292634f0e90b..d7029c895471 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | |||
@@ -2768,10 +2768,10 @@ static int bnx2x_set_rss_flags(struct bnx2x *bp, struct ethtool_rxnfc *info) | |||
2768 | } else if ((info->flow_type == UDP_V6_FLOW) && | 2768 | } else if ((info->flow_type == UDP_V6_FLOW) && |
2769 | (bp->rss_conf_obj.udp_rss_v6 != udp_rss_requested)) { | 2769 | (bp->rss_conf_obj.udp_rss_v6 != udp_rss_requested)) { |
2770 | bp->rss_conf_obj.udp_rss_v6 = udp_rss_requested; | 2770 | bp->rss_conf_obj.udp_rss_v6 = udp_rss_requested; |
2771 | return bnx2x_config_rss_pf(bp, &bp->rss_conf_obj, 0); | ||
2772 | DP(BNX2X_MSG_ETHTOOL, | 2771 | DP(BNX2X_MSG_ETHTOOL, |
2773 | "rss re-configured, UDP 4-tupple %s\n", | 2772 | "rss re-configured, UDP 4-tupple %s\n", |
2774 | udp_rss_requested ? "enabled" : "disabled"); | 2773 | udp_rss_requested ? "enabled" : "disabled"); |
2774 | return bnx2x_config_rss_pf(bp, &bp->rss_conf_obj, 0); | ||
2775 | } else { | 2775 | } else { |
2776 | return 0; | 2776 | return 0; |
2777 | } | 2777 | } |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index a296758a6e1a..f808ed031ee7 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | |||
@@ -128,6 +128,17 @@ MODULE_PARM_DESC(debug, " Default debug msglevel"); | |||
128 | 128 | ||
129 | struct workqueue_struct *bnx2x_wq; | 129 | struct workqueue_struct *bnx2x_wq; |
130 | 130 | ||
131 | struct bnx2x_mac_vals { | ||
132 | u32 xmac_addr; | ||
133 | u32 xmac_val; | ||
134 | u32 emac_addr; | ||
135 | u32 emac_val; | ||
136 | u32 umac_addr; | ||
137 | u32 umac_val; | ||
138 | u32 bmac_addr; | ||
139 | u32 bmac_val[2]; | ||
140 | }; | ||
141 | |||
131 | enum bnx2x_board_type { | 142 | enum bnx2x_board_type { |
132 | BCM57710 = 0, | 143 | BCM57710 = 0, |
133 | BCM57711, | 144 | BCM57711, |
@@ -9548,12 +9559,19 @@ static inline void bnx2x_undi_int_disable(struct bnx2x *bp) | |||
9548 | bnx2x_undi_int_disable_e1h(bp); | 9559 | bnx2x_undi_int_disable_e1h(bp); |
9549 | } | 9560 | } |
9550 | 9561 | ||
9551 | static void bnx2x_prev_unload_close_mac(struct bnx2x *bp) | 9562 | static void bnx2x_prev_unload_close_mac(struct bnx2x *bp, |
9563 | struct bnx2x_mac_vals *vals) | ||
9552 | { | 9564 | { |
9553 | u32 val, base_addr, offset, mask, reset_reg; | 9565 | u32 val, base_addr, offset, mask, reset_reg; |
9554 | bool mac_stopped = false; | 9566 | bool mac_stopped = false; |
9555 | u8 port = BP_PORT(bp); | 9567 | u8 port = BP_PORT(bp); |
9556 | 9568 | ||
9569 | /* reset addresses as they also mark which values were changed */ | ||
9570 | vals->bmac_addr = 0; | ||
9571 | vals->umac_addr = 0; | ||
9572 | vals->xmac_addr = 0; | ||
9573 | vals->emac_addr = 0; | ||
9574 | |||
9557 | reset_reg = REG_RD(bp, MISC_REG_RESET_REG_2); | 9575 | reset_reg = REG_RD(bp, MISC_REG_RESET_REG_2); |
9558 | 9576 | ||
9559 | if (!CHIP_IS_E3(bp)) { | 9577 | if (!CHIP_IS_E3(bp)) { |
@@ -9575,14 +9593,18 @@ static void bnx2x_prev_unload_close_mac(struct bnx2x *bp) | |||
9575 | */ | 9593 | */ |
9576 | wb_data[0] = REG_RD(bp, base_addr + offset); | 9594 | wb_data[0] = REG_RD(bp, base_addr + offset); |
9577 | wb_data[1] = REG_RD(bp, base_addr + offset + 0x4); | 9595 | wb_data[1] = REG_RD(bp, base_addr + offset + 0x4); |
9596 | vals->bmac_addr = base_addr + offset; | ||
9597 | vals->bmac_val[0] = wb_data[0]; | ||
9598 | vals->bmac_val[1] = wb_data[1]; | ||
9578 | wb_data[0] &= ~BMAC_CONTROL_RX_ENABLE; | 9599 | wb_data[0] &= ~BMAC_CONTROL_RX_ENABLE; |
9579 | REG_WR(bp, base_addr + offset, wb_data[0]); | 9600 | REG_WR(bp, vals->bmac_addr, wb_data[0]); |
9580 | REG_WR(bp, base_addr + offset + 0x4, wb_data[1]); | 9601 | REG_WR(bp, vals->bmac_addr + 0x4, wb_data[1]); |
9581 | 9602 | ||
9582 | } | 9603 | } |
9583 | BNX2X_DEV_INFO("Disable emac Rx\n"); | 9604 | BNX2X_DEV_INFO("Disable emac Rx\n"); |
9584 | REG_WR(bp, NIG_REG_NIG_EMAC0_EN + BP_PORT(bp)*4, 0); | 9605 | vals->emac_addr = NIG_REG_NIG_EMAC0_EN + BP_PORT(bp)*4; |
9585 | 9606 | vals->emac_val = REG_RD(bp, vals->emac_addr); | |
9607 | REG_WR(bp, vals->emac_addr, 0); | ||
9586 | mac_stopped = true; | 9608 | mac_stopped = true; |
9587 | } else { | 9609 | } else { |
9588 | if (reset_reg & MISC_REGISTERS_RESET_REG_2_XMAC) { | 9610 | if (reset_reg & MISC_REGISTERS_RESET_REG_2_XMAC) { |
@@ -9593,14 +9615,18 @@ static void bnx2x_prev_unload_close_mac(struct bnx2x *bp) | |||
9593 | val & ~(1 << 1)); | 9615 | val & ~(1 << 1)); |
9594 | REG_WR(bp, base_addr + XMAC_REG_PFC_CTRL_HI, | 9616 | REG_WR(bp, base_addr + XMAC_REG_PFC_CTRL_HI, |
9595 | val | (1 << 1)); | 9617 | val | (1 << 1)); |
9596 | REG_WR(bp, base_addr + XMAC_REG_CTRL, 0); | 9618 | vals->xmac_addr = base_addr + XMAC_REG_CTRL; |
9619 | vals->xmac_val = REG_RD(bp, vals->xmac_addr); | ||
9620 | REG_WR(bp, vals->xmac_addr, 0); | ||
9597 | mac_stopped = true; | 9621 | mac_stopped = true; |
9598 | } | 9622 | } |
9599 | mask = MISC_REGISTERS_RESET_REG_2_UMAC0 << port; | 9623 | mask = MISC_REGISTERS_RESET_REG_2_UMAC0 << port; |
9600 | if (mask & reset_reg) { | 9624 | if (mask & reset_reg) { |
9601 | BNX2X_DEV_INFO("Disable umac Rx\n"); | 9625 | BNX2X_DEV_INFO("Disable umac Rx\n"); |
9602 | base_addr = BP_PORT(bp) ? GRCBASE_UMAC1 : GRCBASE_UMAC0; | 9626 | base_addr = BP_PORT(bp) ? GRCBASE_UMAC1 : GRCBASE_UMAC0; |
9603 | REG_WR(bp, base_addr + UMAC_REG_COMMAND_CONFIG, 0); | 9627 | vals->umac_addr = base_addr + UMAC_REG_COMMAND_CONFIG; |
9628 | vals->umac_val = REG_RD(bp, vals->umac_addr); | ||
9629 | REG_WR(bp, vals->umac_addr, 0); | ||
9604 | mac_stopped = true; | 9630 | mac_stopped = true; |
9605 | } | 9631 | } |
9606 | } | 9632 | } |
@@ -9792,12 +9818,16 @@ static int bnx2x_prev_unload_common(struct bnx2x *bp) | |||
9792 | { | 9818 | { |
9793 | u32 reset_reg, tmp_reg = 0, rc; | 9819 | u32 reset_reg, tmp_reg = 0, rc; |
9794 | bool prev_undi = false; | 9820 | bool prev_undi = false; |
9821 | struct bnx2x_mac_vals mac_vals; | ||
9822 | |||
9795 | /* It is possible a previous function received 'common' answer, | 9823 | /* It is possible a previous function received 'common' answer, |
9796 | * but hasn't loaded yet, therefore creating a scenario of | 9824 | * but hasn't loaded yet, therefore creating a scenario of |
9797 | * multiple functions receiving 'common' on the same path. | 9825 | * multiple functions receiving 'common' on the same path. |
9798 | */ | 9826 | */ |
9799 | BNX2X_DEV_INFO("Common unload Flow\n"); | 9827 | BNX2X_DEV_INFO("Common unload Flow\n"); |
9800 | 9828 | ||
9829 | memset(&mac_vals, 0, sizeof(mac_vals)); | ||
9830 | |||
9801 | if (bnx2x_prev_is_path_marked(bp)) | 9831 | if (bnx2x_prev_is_path_marked(bp)) |
9802 | return bnx2x_prev_mcp_done(bp); | 9832 | return bnx2x_prev_mcp_done(bp); |
9803 | 9833 | ||
@@ -9808,7 +9838,10 @@ static int bnx2x_prev_unload_common(struct bnx2x *bp) | |||
9808 | u32 timer_count = 1000; | 9838 | u32 timer_count = 1000; |
9809 | 9839 | ||
9810 | /* Close the MAC Rx to prevent BRB from filling up */ | 9840 | /* Close the MAC Rx to prevent BRB from filling up */ |
9811 | bnx2x_prev_unload_close_mac(bp); | 9841 | bnx2x_prev_unload_close_mac(bp, &mac_vals); |
9842 | |||
9843 | /* close LLH filters towards the BRB */ | ||
9844 | bnx2x_set_rx_filter(&bp->link_params, 0); | ||
9812 | 9845 | ||
9813 | /* Check if the UNDI driver was previously loaded | 9846 | /* Check if the UNDI driver was previously loaded |
9814 | * UNDI driver initializes CID offset for normal bell to 0x7 | 9847 | * UNDI driver initializes CID offset for normal bell to 0x7 |
@@ -9855,6 +9888,17 @@ static int bnx2x_prev_unload_common(struct bnx2x *bp) | |||
9855 | /* No packets are in the pipeline, path is ready for reset */ | 9888 | /* No packets are in the pipeline, path is ready for reset */ |
9856 | bnx2x_reset_common(bp); | 9889 | bnx2x_reset_common(bp); |
9857 | 9890 | ||
9891 | if (mac_vals.xmac_addr) | ||
9892 | REG_WR(bp, mac_vals.xmac_addr, mac_vals.xmac_val); | ||
9893 | if (mac_vals.umac_addr) | ||
9894 | REG_WR(bp, mac_vals.umac_addr, mac_vals.umac_val); | ||
9895 | if (mac_vals.emac_addr) | ||
9896 | REG_WR(bp, mac_vals.emac_addr, mac_vals.emac_val); | ||
9897 | if (mac_vals.bmac_addr) { | ||
9898 | REG_WR(bp, mac_vals.bmac_addr, mac_vals.bmac_val[0]); | ||
9899 | REG_WR(bp, mac_vals.bmac_addr + 4, mac_vals.bmac_val[1]); | ||
9900 | } | ||
9901 | |||
9858 | rc = bnx2x_prev_mark_path(bp, prev_undi); | 9902 | rc = bnx2x_prev_mark_path(bp, prev_undi); |
9859 | if (rc) { | 9903 | if (rc) { |
9860 | bnx2x_prev_mcp_done(bp); | 9904 | bnx2x_prev_mcp_done(bp); |
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index 227749107789..ab07026a36e3 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c | |||
@@ -1286,14 +1286,26 @@ static int tg3_phy_auxctl_write(struct tg3 *tp, int reg, u32 set) | |||
1286 | return tg3_writephy(tp, MII_TG3_AUX_CTRL, set | reg); | 1286 | return tg3_writephy(tp, MII_TG3_AUX_CTRL, set | reg); |
1287 | } | 1287 | } |
1288 | 1288 | ||
1289 | #define TG3_PHY_AUXCTL_SMDSP_ENABLE(tp) \ | 1289 | static int tg3_phy_toggle_auxctl_smdsp(struct tg3 *tp, bool enable) |
1290 | tg3_phy_auxctl_write((tp), MII_TG3_AUXCTL_SHDWSEL_AUXCTL, \ | 1290 | { |
1291 | MII_TG3_AUXCTL_ACTL_SMDSP_ENA | \ | 1291 | u32 val; |
1292 | MII_TG3_AUXCTL_ACTL_TX_6DB) | 1292 | int err; |
1293 | 1293 | ||
1294 | #define TG3_PHY_AUXCTL_SMDSP_DISABLE(tp) \ | 1294 | err = tg3_phy_auxctl_read(tp, MII_TG3_AUXCTL_SHDWSEL_AUXCTL, &val); |
1295 | tg3_phy_auxctl_write((tp), MII_TG3_AUXCTL_SHDWSEL_AUXCTL, \ | 1295 | |
1296 | MII_TG3_AUXCTL_ACTL_TX_6DB); | 1296 | if (err) |
1297 | return err; | ||
1298 | if (enable) | ||
1299 | |||
1300 | val |= MII_TG3_AUXCTL_ACTL_SMDSP_ENA; | ||
1301 | else | ||
1302 | val &= ~MII_TG3_AUXCTL_ACTL_SMDSP_ENA; | ||
1303 | |||
1304 | err = tg3_phy_auxctl_write((tp), MII_TG3_AUXCTL_SHDWSEL_AUXCTL, | ||
1305 | val | MII_TG3_AUXCTL_ACTL_TX_6DB); | ||
1306 | |||
1307 | return err; | ||
1308 | } | ||
1297 | 1309 | ||
1298 | static int tg3_bmcr_reset(struct tg3 *tp) | 1310 | static int tg3_bmcr_reset(struct tg3 *tp) |
1299 | { | 1311 | { |
@@ -2226,7 +2238,7 @@ static void tg3_phy_apply_otp(struct tg3 *tp) | |||
2226 | 2238 | ||
2227 | otp = tp->phy_otp; | 2239 | otp = tp->phy_otp; |
2228 | 2240 | ||
2229 | if (TG3_PHY_AUXCTL_SMDSP_ENABLE(tp)) | 2241 | if (tg3_phy_toggle_auxctl_smdsp(tp, true)) |
2230 | return; | 2242 | return; |
2231 | 2243 | ||
2232 | phy = ((otp & TG3_OTP_AGCTGT_MASK) >> TG3_OTP_AGCTGT_SHIFT); | 2244 | phy = ((otp & TG3_OTP_AGCTGT_MASK) >> TG3_OTP_AGCTGT_SHIFT); |
@@ -2251,7 +2263,7 @@ static void tg3_phy_apply_otp(struct tg3 *tp) | |||
2251 | ((otp & TG3_OTP_RCOFF_MASK) >> TG3_OTP_RCOFF_SHIFT); | 2263 | ((otp & TG3_OTP_RCOFF_MASK) >> TG3_OTP_RCOFF_SHIFT); |
2252 | tg3_phydsp_write(tp, MII_TG3_DSP_EXP97, phy); | 2264 | tg3_phydsp_write(tp, MII_TG3_DSP_EXP97, phy); |
2253 | 2265 | ||
2254 | TG3_PHY_AUXCTL_SMDSP_DISABLE(tp); | 2266 | tg3_phy_toggle_auxctl_smdsp(tp, false); |
2255 | } | 2267 | } |
2256 | 2268 | ||
2257 | static void tg3_phy_eee_adjust(struct tg3 *tp, u32 current_link_up) | 2269 | static void tg3_phy_eee_adjust(struct tg3 *tp, u32 current_link_up) |
@@ -2287,9 +2299,9 @@ static void tg3_phy_eee_adjust(struct tg3 *tp, u32 current_link_up) | |||
2287 | 2299 | ||
2288 | if (!tp->setlpicnt) { | 2300 | if (!tp->setlpicnt) { |
2289 | if (current_link_up == 1 && | 2301 | if (current_link_up == 1 && |
2290 | !TG3_PHY_AUXCTL_SMDSP_ENABLE(tp)) { | 2302 | !tg3_phy_toggle_auxctl_smdsp(tp, true)) { |
2291 | tg3_phydsp_write(tp, MII_TG3_DSP_TAP26, 0x0000); | 2303 | tg3_phydsp_write(tp, MII_TG3_DSP_TAP26, 0x0000); |
2292 | TG3_PHY_AUXCTL_SMDSP_DISABLE(tp); | 2304 | tg3_phy_toggle_auxctl_smdsp(tp, false); |
2293 | } | 2305 | } |
2294 | 2306 | ||
2295 | val = tr32(TG3_CPMU_EEE_MODE); | 2307 | val = tr32(TG3_CPMU_EEE_MODE); |
@@ -2305,11 +2317,11 @@ static void tg3_phy_eee_enable(struct tg3 *tp) | |||
2305 | (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 || | 2317 | (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 || |
2306 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 || | 2318 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 || |
2307 | tg3_flag(tp, 57765_CLASS)) && | 2319 | tg3_flag(tp, 57765_CLASS)) && |
2308 | !TG3_PHY_AUXCTL_SMDSP_ENABLE(tp)) { | 2320 | !tg3_phy_toggle_auxctl_smdsp(tp, true)) { |
2309 | val = MII_TG3_DSP_TAP26_ALNOKO | | 2321 | val = MII_TG3_DSP_TAP26_ALNOKO | |
2310 | MII_TG3_DSP_TAP26_RMRXSTO; | 2322 | MII_TG3_DSP_TAP26_RMRXSTO; |
2311 | tg3_phydsp_write(tp, MII_TG3_DSP_TAP26, val); | 2323 | tg3_phydsp_write(tp, MII_TG3_DSP_TAP26, val); |
2312 | TG3_PHY_AUXCTL_SMDSP_DISABLE(tp); | 2324 | tg3_phy_toggle_auxctl_smdsp(tp, false); |
2313 | } | 2325 | } |
2314 | 2326 | ||
2315 | val = tr32(TG3_CPMU_EEE_MODE); | 2327 | val = tr32(TG3_CPMU_EEE_MODE); |
@@ -2453,7 +2465,7 @@ static int tg3_phy_reset_5703_4_5(struct tg3 *tp) | |||
2453 | tg3_writephy(tp, MII_CTRL1000, | 2465 | tg3_writephy(tp, MII_CTRL1000, |
2454 | CTL1000_AS_MASTER | CTL1000_ENABLE_MASTER); | 2466 | CTL1000_AS_MASTER | CTL1000_ENABLE_MASTER); |
2455 | 2467 | ||
2456 | err = TG3_PHY_AUXCTL_SMDSP_ENABLE(tp); | 2468 | err = tg3_phy_toggle_auxctl_smdsp(tp, true); |
2457 | if (err) | 2469 | if (err) |
2458 | return err; | 2470 | return err; |
2459 | 2471 | ||
@@ -2474,7 +2486,7 @@ static int tg3_phy_reset_5703_4_5(struct tg3 *tp) | |||
2474 | tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x8200); | 2486 | tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x8200); |
2475 | tg3_writephy(tp, MII_TG3_DSP_CONTROL, 0x0000); | 2487 | tg3_writephy(tp, MII_TG3_DSP_CONTROL, 0x0000); |
2476 | 2488 | ||
2477 | TG3_PHY_AUXCTL_SMDSP_DISABLE(tp); | 2489 | tg3_phy_toggle_auxctl_smdsp(tp, false); |
2478 | 2490 | ||
2479 | tg3_writephy(tp, MII_CTRL1000, phy9_orig); | 2491 | tg3_writephy(tp, MII_CTRL1000, phy9_orig); |
2480 | 2492 | ||
@@ -2575,10 +2587,10 @@ static int tg3_phy_reset(struct tg3 *tp) | |||
2575 | 2587 | ||
2576 | out: | 2588 | out: |
2577 | if ((tp->phy_flags & TG3_PHYFLG_ADC_BUG) && | 2589 | if ((tp->phy_flags & TG3_PHYFLG_ADC_BUG) && |
2578 | !TG3_PHY_AUXCTL_SMDSP_ENABLE(tp)) { | 2590 | !tg3_phy_toggle_auxctl_smdsp(tp, true)) { |
2579 | tg3_phydsp_write(tp, 0x201f, 0x2aaa); | 2591 | tg3_phydsp_write(tp, 0x201f, 0x2aaa); |
2580 | tg3_phydsp_write(tp, 0x000a, 0x0323); | 2592 | tg3_phydsp_write(tp, 0x000a, 0x0323); |
2581 | TG3_PHY_AUXCTL_SMDSP_DISABLE(tp); | 2593 | tg3_phy_toggle_auxctl_smdsp(tp, false); |
2582 | } | 2594 | } |
2583 | 2595 | ||
2584 | if (tp->phy_flags & TG3_PHYFLG_5704_A0_BUG) { | 2596 | if (tp->phy_flags & TG3_PHYFLG_5704_A0_BUG) { |
@@ -2587,14 +2599,14 @@ out: | |||
2587 | } | 2599 | } |
2588 | 2600 | ||
2589 | if (tp->phy_flags & TG3_PHYFLG_BER_BUG) { | 2601 | if (tp->phy_flags & TG3_PHYFLG_BER_BUG) { |
2590 | if (!TG3_PHY_AUXCTL_SMDSP_ENABLE(tp)) { | 2602 | if (!tg3_phy_toggle_auxctl_smdsp(tp, true)) { |
2591 | tg3_phydsp_write(tp, 0x000a, 0x310b); | 2603 | tg3_phydsp_write(tp, 0x000a, 0x310b); |
2592 | tg3_phydsp_write(tp, 0x201f, 0x9506); | 2604 | tg3_phydsp_write(tp, 0x201f, 0x9506); |
2593 | tg3_phydsp_write(tp, 0x401f, 0x14e2); | 2605 | tg3_phydsp_write(tp, 0x401f, 0x14e2); |
2594 | TG3_PHY_AUXCTL_SMDSP_DISABLE(tp); | 2606 | tg3_phy_toggle_auxctl_smdsp(tp, false); |
2595 | } | 2607 | } |
2596 | } else if (tp->phy_flags & TG3_PHYFLG_JITTER_BUG) { | 2608 | } else if (tp->phy_flags & TG3_PHYFLG_JITTER_BUG) { |
2597 | if (!TG3_PHY_AUXCTL_SMDSP_ENABLE(tp)) { | 2609 | if (!tg3_phy_toggle_auxctl_smdsp(tp, true)) { |
2598 | tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x000a); | 2610 | tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x000a); |
2599 | if (tp->phy_flags & TG3_PHYFLG_ADJUST_TRIM) { | 2611 | if (tp->phy_flags & TG3_PHYFLG_ADJUST_TRIM) { |
2600 | tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x110b); | 2612 | tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x110b); |
@@ -2603,7 +2615,7 @@ out: | |||
2603 | } else | 2615 | } else |
2604 | tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x010b); | 2616 | tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x010b); |
2605 | 2617 | ||
2606 | TG3_PHY_AUXCTL_SMDSP_DISABLE(tp); | 2618 | tg3_phy_toggle_auxctl_smdsp(tp, false); |
2607 | } | 2619 | } |
2608 | } | 2620 | } |
2609 | 2621 | ||
@@ -4015,7 +4027,7 @@ static int tg3_phy_autoneg_cfg(struct tg3 *tp, u32 advertise, u32 flowctrl) | |||
4015 | tw32(TG3_CPMU_EEE_MODE, | 4027 | tw32(TG3_CPMU_EEE_MODE, |
4016 | tr32(TG3_CPMU_EEE_MODE) & ~TG3_CPMU_EEEMD_LPI_ENABLE); | 4028 | tr32(TG3_CPMU_EEE_MODE) & ~TG3_CPMU_EEEMD_LPI_ENABLE); |
4017 | 4029 | ||
4018 | err = TG3_PHY_AUXCTL_SMDSP_ENABLE(tp); | 4030 | err = tg3_phy_toggle_auxctl_smdsp(tp, true); |
4019 | if (!err) { | 4031 | if (!err) { |
4020 | u32 err2; | 4032 | u32 err2; |
4021 | 4033 | ||
@@ -4049,7 +4061,7 @@ static int tg3_phy_autoneg_cfg(struct tg3 *tp, u32 advertise, u32 flowctrl) | |||
4049 | MII_TG3_DSP_CH34TP2_HIBW01); | 4061 | MII_TG3_DSP_CH34TP2_HIBW01); |
4050 | } | 4062 | } |
4051 | 4063 | ||
4052 | err2 = TG3_PHY_AUXCTL_SMDSP_DISABLE(tp); | 4064 | err2 = tg3_phy_toggle_auxctl_smdsp(tp, false); |
4053 | if (!err) | 4065 | if (!err) |
4054 | err = err2; | 4066 | err = err2; |
4055 | } | 4067 | } |
@@ -6958,6 +6970,9 @@ static void tg3_poll_controller(struct net_device *dev) | |||
6958 | int i; | 6970 | int i; |
6959 | struct tg3 *tp = netdev_priv(dev); | 6971 | struct tg3 *tp = netdev_priv(dev); |
6960 | 6972 | ||
6973 | if (tg3_irq_sync(tp)) | ||
6974 | return; | ||
6975 | |||
6961 | for (i = 0; i < tp->irq_cnt; i++) | 6976 | for (i = 0; i < tp->irq_cnt; i++) |
6962 | tg3_interrupt(tp->napi[i].irq_vec, &tp->napi[i]); | 6977 | tg3_interrupt(tp->napi[i].irq_vec, &tp->napi[i]); |
6963 | } | 6978 | } |
@@ -16496,6 +16511,7 @@ static int tg3_init_one(struct pci_dev *pdev, | |||
16496 | tp->pm_cap = pm_cap; | 16511 | tp->pm_cap = pm_cap; |
16497 | tp->rx_mode = TG3_DEF_RX_MODE; | 16512 | tp->rx_mode = TG3_DEF_RX_MODE; |
16498 | tp->tx_mode = TG3_DEF_TX_MODE; | 16513 | tp->tx_mode = TG3_DEF_TX_MODE; |
16514 | tp->irq_sync = 1; | ||
16499 | 16515 | ||
16500 | if (tg3_debug > 0) | 16516 | if (tg3_debug > 0) |
16501 | tp->msg_enable = tg3_debug; | 16517 | tp->msg_enable = tg3_debug; |