summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLeendert van Doorn2016-06-10 15:54:25 +0200
committerMichael Brown2016-06-10 16:45:19 +0200
commit5c2a959a72e999b5aedf34b416960260d272a9df (patch)
tree21dd3f39a471bc7d4725cb4088ca4a3811c19a6a /src
parent[http] Accept headers with no whitespace following the colon (diff)
downloadipxe-5c2a959a72e999b5aedf34b416960260d272a9df.tar.gz
ipxe-5c2a959a72e999b5aedf34b416960260d272a9df.tar.xz
ipxe-5c2a959a72e999b5aedf34b416960260d272a9df.zip
[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>
Diffstat (limited to 'src')
-rw-r--r--src/drivers/net/tg3/tg3.c2
-rw-r--r--src/drivers/net/tg3/tg3.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/net/tg3/tg3.c b/src/drivers/net/tg3/tg3.c
index 42bfa2d9..824c9b1c 100644
--- a/src/drivers/net/tg3/tg3.c
+++ b/src/drivers/net/tg3/tg3.c
@@ -545,7 +545,7 @@ static int tg3_test_dma(struct tg3 *tp)
goto out_nofree;
}
buf_dma = virt_to_bus(buf);
- DBGC2(tp->dev, "dma test buffer, virt: %p phys: %#08x\n", buf, buf_dma);
+ DBGC2(tp->dev, "dma test buffer, virt: %p phys: %#016lx\n", buf, buf_dma);
if (tg3_flag(tp, 57765_PLUS)) {
tp->dma_rwctrl = DMA_RWCTRL_DIS_CACHE_ALIGNMENT;
diff --git a/src/drivers/net/tg3/tg3.h b/src/drivers/net/tg3/tg3.h
index 0c3d23bb..be02c571 100644
--- a/src/drivers/net/tg3/tg3.h
+++ b/src/drivers/net/tg3/tg3.h
@@ -2788,7 +2788,7 @@ struct tg3_hw_stats {
u8 __reserved4[0xb00-0x9c8];
};
-typedef u32 dma_addr_t;
+typedef unsigned long dma_addr_t;
/* 'mapping' is superfluous as the chip does not write into
* the tx/rx post rings so we could just fetch it from there.