Skip to content

Commit

Permalink
ehea: Dont check NETIF_F_TSO in TX path
Browse files Browse the repository at this point in the history
It seems like the ehea xmit routine and an ethtool change of TSO
mode could race, resulting in corrupt packets. Checking gso_size
is enough and we can use the helper function.

Signed-off-by: Anton Blanchard <[email protected]>
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
antonblanchard authored and davem330 committed Oct 17, 2011
1 parent 723f28e commit 921ddc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/ibm/ehea/ehea_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1787,7 +1787,7 @@ static inline void write_swqe2_data(struct sk_buff *skb, struct net_device *dev,
swqe->descriptors = 0;
sg1entry_contains_frag_data = 0;

if ((dev->features & NETIF_F_TSO) && skb_shinfo(skb)->gso_size)
if (skb_is_gso(skb))
write_swqe2_TSO(skb, swqe, lkey);
else
write_swqe2_nonTSO(skb, swqe, lkey);
Expand Down

0 comments on commit 921ddc1

Please sign in to comment.