From: Matthew Vick Date: Wed, 18 Apr 2012 02:57:44 +0000 (+0000) Subject: igb: Force flow control off during reset when forcing speed. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a27416bbcada50173c2cf8c71d195380b9f06be2;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git igb: Force flow control off during reset when forcing speed. During igb_reset(), we initiate a hardware reset which will clear our flow control settings. For auto-negotiation, we re-negotiate them when linking up again, but we need to force them off properly for the forced speed case. Signed-off-by: Matthew Vick Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 28a37bb00c90..f40f3886eb26 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -1715,6 +1715,13 @@ void igb_reset(struct igb_adapter *adapter) if (hw->mac.ops.init_hw(hw)) dev_err(&pdev->dev, "Hardware Error\n"); + /* + * Flow control settings reset on hardware reset, so guarantee flow + * control is off when forcing speed. + */ + if (!hw->mac.autoneg) + igb_force_mac_fc(hw); + igb_init_dmac(adapter, pba); if (!netif_running(adapter->netdev)) igb_power_down_link(adapter);