From 67dd41c1c443ac5e8e6005b430da16f5b38b268d Mon Sep 17 00:00:00 2001 From: Andy Gospodarek Date: Mon, 12 May 2008 13:40:25 -0400 Subject: [PATCH] ethtool: expand feature-field check when verifying tx checksum RHBZ 430997 Matt Carlson at Broadcom noticed that with the tg3-based 5755 and 5787 ethtool would report incorrect checksum settings. The bit for NETIF_F_HW_CSUM is now checked as part of the device features, so that status is reported correctly. This looks to be a problem on several other drivers as well, but I haven't seen any reports. The patch that added this upstream (it first appeared in 2.6.12) had some other bits that were added to RHEL4 during a tg3 update (in file linux-2.6.9-net-tg3-ethtool.patch), but this part of that patch was missed. This resolves BZ 430997. --- net/core/ethtool.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/core/ethtool.c b/net/core/ethtool.c index a03d695..19a29c5 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c @@ -29,7 +29,7 @@ u32 ethtool_op_get_link(struct net_device *dev) u32 ethtool_op_get_tx_csum(struct net_device *dev) { - return (dev->features & NETIF_F_IP_CSUM) != 0; + return (dev->features & (NETIF_F_IP_CSUM | NETIF_F_HW_CSUM)) != 0; } int ethtool_op_set_tx_csum(struct net_device *dev, u32 data) -- 1.5.2.1