net: Fix 64 bit DMA addressing for 8139cp and r8169
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)
Signed-off-by Jaswinder Singh Rajput <[email protected]>
--- drivers/net/8139cp.c | 2 +- drivers/net/r8169.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/8139cp.c +1 -1
@@ -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
@@ -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
Willy Tarreau
AppliedQuoted 2 lines · Jaswinder Singh Rajput
sizeof(dma_addr_t)will be either 4(32 bit) or 8(64 bit)
Merged, thanks Jaswinder.
Willy