From: James Bottomley Date: Tue, 16 Oct 2007 08:23:58 +0000 (-0700) Subject: pcmcia: use DMA_MASK_NONE for the default for all pcmcia devices X-Git-Tag: v2.6.24-rc1~1259 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43d9f7fda11a3413c99fbbde35005ec3138eb865;p=linux-2.6 pcmcia: use DMA_MASK_NONE for the default for all pcmcia devices Most non cardbus devices can't do dma, so flag them as such in the device creation routine. Signed-off-by: James Bottomley Cc: Andi Kleen Cc: Alan Cox Cc: Tejun Heo Cc: Natalie Protasevich Cc: Jeff Garzik Cc: Dominik Brodowski Cc: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 55baa1f0fc..7bf78c1278 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c @@ -23,6 +23,7 @@ #include #include #include +#include #define IN_CARD_SERVICES #include @@ -670,6 +671,9 @@ struct pcmcia_device * pcmcia_device_add(struct pcmcia_socket *s, unsigned int f p_dev->dev.bus = &pcmcia_bus_type; p_dev->dev.parent = s->dev.parent; p_dev->dev.release = pcmcia_release_dev; + /* by default don't allow DMA */ + p_dev->dma_mask = DMA_MASK_NONE; + p_dev->dev.dma_mask = &p_dev->dma_mask; bus_id_len = sprintf (p_dev->dev.bus_id, "%d.%d", p_dev->socket->sock, p_dev->device_no); p_dev->devname = kmalloc(6 + bus_id_len + 1, GFP_KERNEL); diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h index 90ef552c42..f047a1fd64 100644 --- a/include/pcmcia/ds.h +++ b/include/pcmcia/ds.h @@ -184,6 +184,7 @@ struct pcmcia_device { char * prod_id[4]; + u64 dma_mask; struct device dev; #ifdef CONFIG_PCMCIA_IOCTL