Skip to content

Commit

Permalink
[tg3] Fix address truncation bug on 64-bit machines
Browse files Browse the repository at this point in the history
Signed-off-by: Leendert van Doorn <leendert@paramecium.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
leendert1966 authored and mcb30 committed Jun 10, 2016
1 parent b42e719 commit 5c2a959
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/drivers/net/tg3/tg3.c
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/tg3/tg3.h
Expand Up @@ -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.
Expand Down

0 comments on commit 5c2a959

Please sign in to comment.