mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-18 18:23:53 +08:00
qlcnic: fix TSO race condition
When driver receives a packet with gso size > 0 and when TSO is disabled, it should be transmitted as a TSO packet to prevent Tx timeout and subsequent firmware reset. Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com> Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a4325ea242
commit
3eead213fe
@ -358,8 +358,7 @@ set_flags:
|
||||
memcpy(&first_desc->eth_addr, skb->data, ETH_ALEN);
|
||||
}
|
||||
opcode = TX_ETHER_PKT;
|
||||
if ((adapter->netdev->features & (NETIF_F_TSO | NETIF_F_TSO6)) &&
|
||||
skb_shinfo(skb)->gso_size > 0) {
|
||||
if (skb_is_gso(skb)) {
|
||||
hdr_len = skb_transport_offset(skb) + tcp_hdrlen(skb);
|
||||
first_desc->mss = cpu_to_le16(skb_shinfo(skb)->gso_size);
|
||||
first_desc->total_hdr_length = hdr_len;
|
||||
|
Loading…
Reference in New Issue
Block a user