* [KJ] [PATCH -mm] drivers/net/chelsio/cxgb2: Use the DMA_{32,
@ 2005-06-04 14:56 Tobias Klauser
0 siblings, 0 replies; only message in thread
From: Tobias Klauser @ 2005-06-04 14:56 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1938 bytes --]
Use the DMA_{32,64}BIT_MASK constants from dma-mapping.h when calling
pci_set_dma_mask() or pci_set_consistent_dma_mask() instead of custom
macros.
This patch includes dma-mapping.h explicitly because it 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 -X dontdiff linux-2.6.12-rc5-mm2/drivers/net/chelsio/cxgb2.c linux-2.6.12-rc5-mm2~dma_mask/drivers/net/chelsio/cxgb2.c
--- linux-2.6.12-rc5-mm2/drivers/net/chelsio/cxgb2.c 2005-06-02 21:04:29.000000000 +0200
+++ linux-2.6.12-rc5-mm2~dma_mask/drivers/net/chelsio/cxgb2.c 2005-06-02 21:13:10.000000000 +0200
@@ -50,6 +50,7 @@
#include <linux/proc_fs.h>
#include <linux/version.h>
#include <linux/workqueue.h>
+#include <linux/dma-mapping.h>
#include <asm/uaccess.h>
#include "ch_ethtool.h"
@@ -84,9 +85,6 @@ static char driver_name[] = DRV_NAME;
static char driver_string[] = "Chelsio " DRV_TYPE "Network Driver";
static char driver_version[] = "2.1.0";
-#define PCI_DMA_64BIT ~0ULL
-#define PCI_DMA_32BIT 0xffffffffULL
-
#define MAX_CMDQ_ENTRIES 16384
#define MAX_CMDQ1_ENTRIES 1024
#define MAX_RX_BUFFERS 16384
@@ -1006,15 +1004,15 @@ static int __devinit init_one(struct pci
goto out_disable_pdev;
}
- if (!pci_set_dma_mask(pdev, PCI_DMA_64BIT)) {
+ if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
pci_using_dac = 1;
- if (pci_set_consistent_dma_mask(pdev, PCI_DMA_64BIT)) {
+ if (pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK)) {
CH_ERR("%s: unable to obtain 64-bit DMA for"
"consistent allocations\n", pci_name(pdev));
err = -ENODEV;
goto out_disable_pdev;
}
- } else if ((err = pci_set_dma_mask(pdev, PCI_DMA_32BIT)) != 0) {
+ } else if ((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK)) != 0) {
CH_ERR("%s: no usable DMA configuration\n", pci_name(pdev));
goto out_disable_pdev;
}
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-06-04 14:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-04 14:56 [KJ] [PATCH -mm] drivers/net/chelsio/cxgb2: Use the DMA_{32, Tobias Klauser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).