From: Joe Jin Date: Mon, 21 May 2012 01:30:57 +0000 (+0800) Subject: ixgbe: Don't set ip checksum if did not enable tso. X-Git-Tag: v2.6.39-400.9.0~423^2~19^2~10 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=aa588ed464747c3a476afacf5adb8a03a529c9ee;p=users%2Fjedix%2Flinux-maple.git ixgbe: Don't set ip checksum if did not enable tso. After apply commit c108d12 - "ixgbe: Modify setup of descriptor flags to avoid conditional jumps", X540-AT2 did not worked properly, it caused by inconsistent olinfo_status, when enable ip checksum, make sure tso be supported. Signed-off-by: Joe Jin --- diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 8cd3a07ce1e2b..b03a8ece97f73 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -6662,7 +6662,7 @@ static __le32 ixgbe_tx_olinfo_status(u32 tx_flags, unsigned int paylen) olinfo_status |= cpu_to_le32(IXGBE_ADVTXD_POPTS_TXSM); /* enble IPv4 checksum for TSO */ - if (tx_flags & IXGBE_TX_FLAGS_IPV4) + if ((tx_flags & IXGBE_TX_FLAGS_TSO) && (tx_flags & IXGBE_TX_FLAGS_IPV4)) olinfo_status |= cpu_to_le32(IXGBE_ADVTXD_POPTS_IXSM); /* use index 1 context for TSO/FSO/FCOE */