diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2009-05-06 12:25:23 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-07 00:33:41 +0200 |
commit | 7beb0146fc965ffee928eff53525aac0173b0b07 (patch) | |
tree | efd247f9a2cc044ac32c9e55c1820a25d06595a0 /drivers/net/igb/igb_ethtool.c | |
parent | igbvf: cleanup flags and allow for rx checksum to be disabled (diff) | |
download | linux-7beb0146fc965ffee928eff53525aac0173b0b07.tar.xz linux-7beb0146fc965ffee928eff53525aac0173b0b07.zip |
igb/igbvf: set rx csum always enabled in hw, disable via sw
An issue was found in which rx checksum could not be enabled without
resetting the interface. The issue was the hardware enable was not being
done via ethtool. To resolve this issue and prevent conflicts with VF
configuration we will leave the feature always enabled in hardware, and
then in software we will choose to ignore the results via a sw flag.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/igb/igb_ethtool.c')
-rw-r--r-- | drivers/net/igb/igb_ethtool.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c index b1367ce6586e..b8551a57dd3f 100644 --- a/drivers/net/igb/igb_ethtool.c +++ b/drivers/net/igb/igb_ethtool.c @@ -275,13 +275,17 @@ static int igb_set_pauseparam(struct net_device *netdev, static u32 igb_get_rx_csum(struct net_device *netdev) { struct igb_adapter *adapter = netdev_priv(netdev); - return adapter->rx_csum; + return !(adapter->flags & IGB_FLAG_RX_CSUM_DISABLED); } static int igb_set_rx_csum(struct net_device *netdev, u32 data) { struct igb_adapter *adapter = netdev_priv(netdev); - adapter->rx_csum = data; + + if (data) + adapter->flags &= ~IGB_FLAG_RX_CSUM_DISABLED; + else + adapter->flags |= IGB_FLAG_RX_CSUM_DISABLED; return 0; } |