Commit 12b279f9 authored by Tobias Klauser's avatar Tobias Klauser Committed by Jeff Garzik

[PATCH] net/sis900: Use the DMA_32BIT_MASK constant

Use the DMA_32BIT_MASK constant 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: default avatarTobias Klauser <tklauser@nuerscht.ch>
parent e8c0eee9
...@@ -66,6 +66,7 @@ ...@@ -66,6 +66,7 @@
#include <linux/ethtool.h> #include <linux/ethtool.h>
#include <linux/crc32.h> #include <linux/crc32.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/dma-mapping.h>
#include <asm/processor.h> /* Processor type for cache alignment. */ #include <asm/processor.h> /* Processor type for cache alignment. */
#include <asm/io.h> #include <asm/io.h>
...@@ -93,8 +94,6 @@ static int sis900_debug = -1; /* Use SIS900_DEF_MSG as value */ ...@@ -93,8 +94,6 @@ static int sis900_debug = -1; /* Use SIS900_DEF_MSG as value */
/* Time in jiffies before concluding the transmitter is hung. */ /* Time in jiffies before concluding the transmitter is hung. */
#define TX_TIMEOUT (4*HZ) #define TX_TIMEOUT (4*HZ)
/* SiS 900 is capable of 32 bits BM DMA */
#define SIS900_DMA_MASK 0xffffffff
enum { enum {
SIS_900 = 0, SIS_900 = 0,
...@@ -414,7 +413,7 @@ static int __devinit sis900_probe(struct pci_dev *pci_dev, ...@@ -414,7 +413,7 @@ static int __devinit sis900_probe(struct pci_dev *pci_dev,
ret = pci_enable_device(pci_dev); ret = pci_enable_device(pci_dev);
if(ret) return ret; if(ret) return ret;
i = pci_set_dma_mask(pci_dev, SIS900_DMA_MASK); i = pci_set_dma_mask(pci_dev, DMA_32BIT_MASK);
if(i){ if(i){
printk(KERN_ERR "sis900.c: architecture does not support" printk(KERN_ERR "sis900.c: architecture does not support"
"32bit PCI busmaster DMA\n"); "32bit PCI busmaster DMA\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment