From: Jaswinder Singh Rajput on

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

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput(a)gmail.com>
---
drivers/net/8139cp.c | 2 +-
drivers/net/r8169.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
index 9b427e4..dbc9ba2 100644
--- a/drivers/net/8139cp.c
+++ b/drivers/net/8139cp.c
@@ -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 {
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 8c7c202..8f37969 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -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 {
--
1.6.0.6


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/