aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/tg3.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/broadcom/tg3.c')
-rw-r--r--drivers/net/ethernet/broadcom/tg3.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index e2ca03e23dc1..3b6d0ba86c71 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -2609,13 +2609,14 @@ static int tg3_phy_reset_5703_4_5(struct tg3 *tp)
2609 2609
2610 tg3_writephy(tp, MII_CTRL1000, phy9_orig); 2610 tg3_writephy(tp, MII_CTRL1000, phy9_orig);
2611 2611
2612 if (!tg3_readphy(tp, MII_TG3_EXT_CTRL, &reg32)) { 2612 err = tg3_readphy(tp, MII_TG3_EXT_CTRL, &reg32);
2613 reg32 &= ~0x3000; 2613 if (err)
2614 tg3_writephy(tp, MII_TG3_EXT_CTRL, reg32); 2614 return err;
2615 } else if (!err)
2616 err = -EBUSY;
2617 2615
2618 return err; 2616 reg32 &= ~0x3000;
2617 tg3_writephy(tp, MII_TG3_EXT_CTRL, reg32);
2618
2619 return 0;
2619} 2620}
2620 2621
2621static void tg3_carrier_off(struct tg3 *tp) 2622static void tg3_carrier_off(struct tg3 *tp)
@@ -6842,8 +6843,7 @@ static int tg3_rx(struct tg3_napi *tnapi, int budget)
6842 6843
6843 work_mask |= opaque_key; 6844 work_mask |= opaque_key;
6844 6845
6845 if ((desc->err_vlan & RXD_ERR_MASK) != 0 && 6846 if (desc->err_vlan & RXD_ERR_MASK) {
6846 (desc->err_vlan != RXD_ERR_ODD_NIBBLE_RCVD_MII)) {
6847 drop_it: 6847 drop_it:
6848 tg3_recycle_rx(tnapi, tpr, opaque_key, 6848 tg3_recycle_rx(tnapi, tpr, opaque_key,
6849 desc_idx, *post_ptr); 6849 desc_idx, *post_ptr);
@@ -14113,12 +14113,12 @@ static int tg3_change_mtu(struct net_device *dev, int new_mtu)
14113 14113
14114 tg3_netif_stop(tp); 14114 tg3_netif_stop(tp);
14115 14115
14116 tg3_set_mtu(dev, tp, new_mtu);
14117
14116 tg3_full_lock(tp, 1); 14118 tg3_full_lock(tp, 1);
14117 14119
14118 tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); 14120 tg3_halt(tp, RESET_KIND_SHUTDOWN, 1);
14119 14121
14120 tg3_set_mtu(dev, tp, new_mtu);
14121
14122 /* Reset PHY, otherwise the read DMA engine will be in a mode that 14122 /* Reset PHY, otherwise the read DMA engine will be in a mode that
14123 * breaks all requests to 256 bytes. 14123 * breaks all requests to 256 bytes.
14124 */ 14124 */