mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jaswinder Singh Rajput <jaswinder@kernel.org>
To: Willy Tarreau <w@1wt.eu>, David Miller <davem@davemloft.net>,
	Francois Romieu <romieu@fr.zoreil.com>,
	Edward Hsu <edward_hsu@realtek.com.tw>,
	LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 2.4] net: Fix 64 bit DMA addressing for 8139cp and r8169
Date: Thu, 22 Oct 2009 10:20:47 +0530	[thread overview]
Message-ID: <1256187047.3184.2.camel@ht.satnam> (raw)


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

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@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



             reply	other threads:[~2009-10-22  4:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-22  4:50 Jaswinder Singh Rajput [this message]
2009-10-25  9:38 ` Willy Tarreau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1256187047.3184.2.camel@ht.satnam \
    --to=jaswinder@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edward_hsu@realtek.com.tw \
    --cc=linux-kernel@vger.kernel.org \
    --cc=romieu@fr.zoreil.com \
    --cc=w@1wt.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome