]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[tg3] Fix address truncation bug on 64-bit machines
authorLeendert van Doorn <leendert@paramecium.org>
Fri, 10 Jun 2016 13:54:25 +0000 (08:54 -0500)
committerMichael Brown <mcb30@ipxe.org>
Fri, 10 Jun 2016 14:45:19 +0000 (15:45 +0100)
Signed-off-by: Leendert van Doorn <leendert@paramecium.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/tg3/tg3.c
src/drivers/net/tg3/tg3.h

index 42bfa2d990cda22d6c681c606d56a96e171c3d50..824c9b1c06468e4ff1d2dd75b9d6232608d567fd 100644 (file)
@@ -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;
index 0c3d23bb70eebfabc50445af3f0f19bbd73372d5..be02c57190b9c91a21baf97502ce0b4eb673581e 100644 (file)
@@ -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.