Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tg3: Fix poor tx performance on 57766 after MTU change

GRC reset causes the read DMA engine to go into a mode that breaks up
requests into 256 bytes. A PHY reset is required to bring it back to
the normal mode.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Michael Chan and committed by
David S. Miller
2fae5e36 6541b806

+8 -2
+8 -2
drivers/net/ethernet/broadcom/tg3.c
··· 12267 12267 static int tg3_change_mtu(struct net_device *dev, int new_mtu) 12268 12268 { 12269 12269 struct tg3 *tp = netdev_priv(dev); 12270 - int err; 12270 + int err, reset_phy = 0; 12271 12271 12272 12272 if (new_mtu < TG3_MIN_MTU || new_mtu > TG3_MAX_MTU(tp)) 12273 12273 return -EINVAL; ··· 12290 12290 12291 12291 tg3_set_mtu(dev, tp, new_mtu); 12292 12292 12293 - err = tg3_restart_hw(tp, 0); 12293 + /* Reset PHY, otherwise the read DMA engine will be in a mode that 12294 + * breaks all requests to 256 bytes. 12295 + */ 12296 + if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57766) 12297 + reset_phy = 1; 12298 + 12299 + err = tg3_restart_hw(tp, reset_phy); 12294 12300 12295 12301 if (!err) 12296 12302 tg3_netif_start(tp);