lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1256187047.3184.2.camel@ht.satnam>
Date:	Thu, 22 Oct 2009 10:20:47 +0530
From:	Jaswinder Singh Rajput <jaswinder@...nel.org>
To:	Willy Tarreau <w@....eu>, David Miller <davem@...emloft.net>,
	Francois Romieu <romieu@...zoreil.com>,
	Edward Hsu <edward_hsu@...ltek.com.tw>,
	LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH 2.4] 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 <jaswinderrajput@...il.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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ