Skip to contentSkip to conversation

net: Fix 64 bit DMA addressing for 8139cp and r8169

PATCH Applied Jaswinder Singh Rajput 2 participants 2 messages Oct 22, 2009 – Oct 25, 2009 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: Fix 64 bit DMA addressing for 8139cp and r8169

sizeof(dma_addr_t) will be either 4(32 bit) or 8(64 bit)

---
 drivers/net/8139cp.c |    2 +-
 drivers/net/r8169.c  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/8139cp.c +1 -1
index 9b427e4..dbc9ba2 100644
@@ -1701,7 +1701,7 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
 	}
 
 	/* Configure DMA attributes. */
-	if ((sizeof(dma_addr_t) > 32) &&
+	if ((sizeof(dma_addr_t) > 4) &&
 	    !pci_set_dma_mask(pdev, 0xffffffffffffffffULL)) {
 		pci_using_dac = 1;
 	} else {
drivers/net/r8169.c +1 -1
index 8c7c202..8f37969 100644
@@ -729,7 +729,7 @@ rtl8169_init_board(struct pci_dev *pdev, struct net_device **dev_out,
 
 	tp->cp_cmd = PCIMulRW | RxChkSum;
 
-	if ((sizeof(dma_addr_t) > 32) &&
+	if ((sizeof(dma_addr_t) > 4) &&
 	    !pci_set_dma_mask(pdev, DMA_64BIT_MASK))
 		tp->cp_cmd |= PCIDAC;
 	else {
Signature · 1 line
1.6.0.6
#1 lore raw
Quoted 2 lines · Jaswinder Singh Rajput

sizeof(dma_addr_t) will be either 4(32 bit) or 8(64 bit)

Merged, thanks Jaswinder.
Willy