Skip to content

Commit 3756791

Browse files
Nithin Sujirdavem330
authored andcommitted
tg3: Expand 4g_overflow_test workaround to skb fragments of any size.
The current driver assumes that an skb fragment can only be upto jumbo size. Presumably this was a fast-path optimization. This assumption is no longer true as fragments can be upto 32k. v2: Remove unnecessary parantheses per Eric Dumazet. Cc: stable@vger.kernel.org Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 1a29321 commit 3756791

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • drivers/net/ethernet/broadcom

‎drivers/net/ethernet/broadcom/tg3.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7622,7 +7622,7 @@ static inline int tg3_4g_overflow_test(dma_addr_t mapping, int len)
76227622
{
76237623
u32 base = (u32) mapping & 0xffffffff;
76247624

7625-
return (base > 0xffffdcc0) && (base + len + 8 < base);
7625+
return base + len + 8 < base;
76267626
}
76277627

76287628
/* Test for TSO DMA buffers that cross into regions which are within MSS bytes

0 commit comments

Comments
 (0)