Browse Source

[tg3] Fix address truncation bug on 64-bit machines

Signed-off-by: Leendert van Doorn <leendert@paramecium.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Leendert van Doorn 8 years ago
parent
commit
5c2a959a72
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      src/drivers/net/tg3/tg3.c
  2. 1
    1
      src/drivers/net/tg3/tg3.h

+ 1
- 1
src/drivers/net/tg3/tg3.c View File

545
 		goto out_nofree;
545
 		goto out_nofree;
546
 	}
546
 	}
547
 	buf_dma = virt_to_bus(buf);
547
 	buf_dma = virt_to_bus(buf);
548
-	DBGC2(tp->dev, "dma test buffer, virt: %p phys: %#08x\n", buf, buf_dma);
548
+	DBGC2(tp->dev, "dma test buffer, virt: %p phys: %#016lx\n", buf, buf_dma);
549
 
549
 
550
 	if (tg3_flag(tp, 57765_PLUS)) {
550
 	if (tg3_flag(tp, 57765_PLUS)) {
551
 		tp->dma_rwctrl = DMA_RWCTRL_DIS_CACHE_ALIGNMENT;
551
 		tp->dma_rwctrl = DMA_RWCTRL_DIS_CACHE_ALIGNMENT;

+ 1
- 1
src/drivers/net/tg3/tg3.h View File

2788
 	u8				__reserved4[0xb00-0x9c8];
2788
 	u8				__reserved4[0xb00-0x9c8];
2789
 };
2789
 };
2790
 
2790
 
2791
-typedef u32 dma_addr_t;
2791
+typedef unsigned long dma_addr_t;
2792
 
2792
 
2793
 /* 'mapping' is superfluous as the chip does not write into
2793
 /* 'mapping' is superfluous as the chip does not write into
2794
  * the tx/rx post rings so we could just fetch it from there.
2794
  * the tx/rx post rings so we could just fetch it from there.

Loading…
Cancel
Save