From 7beb0146fc965ffee928eff53525aac0173b0b07 Mon Sep 17 00:00:00 2001 From: Alexander Duyck Date: Wed, 6 May 2009 10:25:23 +0000 Subject: 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 Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller --- drivers/net/igb/igb_ethtool.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'drivers/net/igb/igb_ethtool.c') 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; } -- cgit v1.2.3