Bladeren bron

[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 jaren geleden
bovenliggende
commit
5c2a959a72
2 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  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 Bestand weergeven

@@ -545,7 +545,7 @@ static int tg3_test_dma(struct tg3 *tp)
545 545
 		goto out_nofree;
546 546
 	}
547 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 550
 	if (tg3_flag(tp, 57765_PLUS)) {
551 551
 		tp->dma_rwctrl = DMA_RWCTRL_DIS_CACHE_ALIGNMENT;

+ 1
- 1
src/drivers/net/tg3/tg3.h Bestand weergeven

@@ -2788,7 +2788,7 @@ struct tg3_hw_stats {
2788 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 2793
 /* 'mapping' is superfluous as the chip does not write into
2794 2794
  * the tx/rx post rings so we could just fetch it from there.

Laden…
Annuleren
Opslaan