Commit 6728a8e2 authored by Michael Chan's avatar Michael Chan Committed by David S. Miller

[TG3]: Fix bug in 40-bit DMA workaround code

Need to check the TG3_FLAG_40BIT_DMA_BUG flag in the workaround code
path instead of device flags.
Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 008652b3
...@@ -3600,7 +3600,7 @@ static inline int tg3_40bit_overflow_test(struct tg3 *tp, dma_addr_t mapping, ...@@ -3600,7 +3600,7 @@ static inline int tg3_40bit_overflow_test(struct tg3 *tp, dma_addr_t mapping,
int len) int len)
{ {
#if defined(CONFIG_HIGHMEM) && (BITS_PER_LONG == 64) #if defined(CONFIG_HIGHMEM) && (BITS_PER_LONG == 64)
if (tp->tg3_flags2 & TG3_FLG2_5780_CLASS) if (tp->tg3_flags & TG3_FLAG_40BIT_DMA_BUG)
return (((u64) mapping + len) > DMA_40BIT_MASK); return (((u64) mapping + len) > DMA_40BIT_MASK);
return 0; return 0;
#else #else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment