diff options
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r-- | drivers/net/tg3.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index e7a2ba8b20a2..fdb438dca9b3 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -5389,8 +5389,7 @@ static inline int tg3_4g_overflow_test(dma_addr_t mapping, int len) | |||
5389 | { | 5389 | { |
5390 | u32 base = (u32) mapping & 0xffffffff; | 5390 | u32 base = (u32) mapping & 0xffffffff; |
5391 | 5391 | ||
5392 | return ((base > 0xffffdcc0) && | 5392 | return (base > 0xffffdcc0) && (base + len + 8 < base); |
5393 | (base + len + 8 < base)); | ||
5394 | } | 5393 | } |
5395 | 5394 | ||
5396 | /* Test for DMA addresses > 40-bit */ | 5395 | /* Test for DMA addresses > 40-bit */ |
@@ -5399,7 +5398,7 @@ static inline int tg3_40bit_overflow_test(struct tg3 *tp, dma_addr_t mapping, | |||
5399 | { | 5398 | { |
5400 | #if defined(CONFIG_HIGHMEM) && (BITS_PER_LONG == 64) | 5399 | #if defined(CONFIG_HIGHMEM) && (BITS_PER_LONG == 64) |
5401 | if (tp->tg3_flags & TG3_FLAG_40BIT_DMA_BUG) | 5400 | if (tp->tg3_flags & TG3_FLAG_40BIT_DMA_BUG) |
5402 | return (((u64) mapping + len) > DMA_BIT_MASK(40)); | 5401 | return ((u64) mapping + len) > DMA_BIT_MASK(40); |
5403 | return 0; | 5402 | return 0; |
5404 | #else | 5403 | #else |
5405 | return 0; | 5404 | return 0; |