Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Tobias Klauser <tklauser@nuerscht.ch>
To: kernel-janitors@lists.osdl.org
Cc: ralf@linux-mips.org, linux-mips@linux-mips.org
Subject: [PATCH] net/ioc3-eth: Use the DMA_{32,64}BIT_MASK constants
Date: Wed, 13 Apr 2005 15:31:52 +0200	[thread overview]
Message-ID: <20050413133147.GA9864@argon.tklauser.home> (raw)

Use the DMA_{32,64}BIT_MASK constants from dma-mapping.h when calling
pci_set_dma_mask() or pci_set_consistent_dma_mask()
This patch includes dma-mapping.h explicitly because patches caused
errors on some architectures otherwise.
See http://marc.theaimsgroup.com/?t=108001993000001&r=1&w=2 for details

Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>

diff -urpN linux-2.6.12-rc2-mm3/drivers/net/ioc3-eth.c linux-2.6.12-rc2-mm3-tk/drivers/net/ioc3-eth.c
--- linux-2.6.12-rc2-mm3/drivers/net/ioc3-eth.c	2005-04-12 16:56:40.000000000 +0200
+++ linux-2.6.12-rc2-mm3-tk/drivers/net/ioc3-eth.c	2005-04-12 17:28:55.470878176 +0200
@@ -38,6 +38,7 @@
 #include <linux/errno.h>
 #include <linux/module.h>
 #include <linux/pci.h>
+#include <linux/dma-mapping.h>
 #include <linux/crc32.h>
 #include <linux/mii.h>
 #include <linux/in.h>
@@ -1193,17 +1194,17 @@ static int ioc3_probe(struct pci_dev *pd
 	int err, pci_using_dac;
 
 	/* Configure DMA attributes. */
-	err = pci_set_dma_mask(pdev, 0xffffffffffffffffULL);
+	err = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
 	if (!err) {
 		pci_using_dac = 1;
-		err = pci_set_consistent_dma_mask(pdev, 0xffffffffffffffffULL);
+		err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
 		if (err < 0) {
 			printk(KERN_ERR "%s: Unable to obtain 64 bit DMA "
 			       "for consistent allocations\n", pci_name(pdev));
 			goto out;
 		}
 	} else {
-		err = pci_set_dma_mask(pdev, 0xffffffffULL);
+		err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
 		if (err) {
 			printk(KERN_ERR "%s: No usable DMA configuration, "
 			       "aborting.\n", pci_name(pdev));

             reply	other threads:[~2005-04-13 13:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-13 13:31 Tobias Klauser [this message]
2005-04-13 13:36 ` [PATCH] net/ioc3-eth: Use the DMA_{32,64}BIT_MASK constants Ralf Baechle

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=20050413133147.GA9864@argon.tklauser.home \
    --to=tklauser@nuerscht.ch \
    --cc=kernel-janitors@lists.osdl.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    /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