Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH] net/ioc3-eth: Use the DMA_{32,64}BIT_MASK constants
@ 2005-04-13 13:31 Tobias Klauser
  2005-04-13 13:36 ` Ralf Baechle
  0 siblings, 1 reply; 2+ messages in thread
From: Tobias Klauser @ 2005-04-13 13:31 UTC (permalink / raw)
  To: kernel-janitors; +Cc: ralf, linux-mips

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));

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] net/ioc3-eth: Use the DMA_{32,64}BIT_MASK constants
  2005-04-13 13:31 [PATCH] net/ioc3-eth: Use the DMA_{32,64}BIT_MASK constants Tobias Klauser
@ 2005-04-13 13:36 ` Ralf Baechle
  0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2005-04-13 13:36 UTC (permalink / raw)
  To: Tobias Klauser; +Cc: kernel-janitors, linux-mips

On Wed, Apr 13, 2005 at 03:31:52PM +0200, Tobias Klauser wrote:

> 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>

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Looks good,

  Ralf

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-04-13 13:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-13 13:31 [PATCH] net/ioc3-eth: Use the DMA_{32,64}BIT_MASK constants Tobias Klauser
2005-04-13 13:36 ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox