[PATCH] Intruduce DMA_28BIT_MASK
This patch introduces the DMA_28BIT_MASK constant in dma-mapping.h ALSA drivers using this mask are changed to use the new constant. Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: Jaroslav Kysela <perex@suse.cz>
This commit is contained in:
Родитель
84f3430c72
Коммит
9d2f928ddf
|
@ -20,6 +20,7 @@ enum dma_data_direction {
|
|||
#define DMA_31BIT_MASK 0x000000007fffffffULL
|
||||
#define DMA_30BIT_MASK 0x000000003fffffffULL
|
||||
#define DMA_29BIT_MASK 0x000000001fffffffULL
|
||||
#define DMA_28BIT_MASK 0x000000000fffffffULL
|
||||
|
||||
#include <asm/dma-mapping.h>
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
#include <linux/init.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/compiler.h>
|
||||
|
@ -909,10 +910,10 @@ snd_ad1889_create(struct snd_card *card,
|
|||
|
||||
if ((err = pci_enable_device(pci)) < 0)
|
||||
return err;
|
||||
|
||||
|
||||
/* check PCI availability (32bit DMA) */
|
||||
if (pci_set_dma_mask(pci, 0xffffffff) < 0 ||
|
||||
pci_set_consistent_dma_mask(pci, 0xffffffff) < 0) {
|
||||
if (pci_set_dma_mask(pci, DMA_32BIT_MASK) < 0 ||
|
||||
pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK) < 0) {
|
||||
printk(KERN_ERR PFX "error setting 32-bit DMA mask.\n");
|
||||
pci_disable_device(pci);
|
||||
return -ENXIO;
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <linux/init.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/moduleparam.h>
|
||||
#include <sound/core.h>
|
||||
|
@ -893,24 +894,24 @@ static int __devinit snd_emu10k1x_create(struct snd_card *card,
|
|||
static struct snd_device_ops ops = {
|
||||
.dev_free = snd_emu10k1x_dev_free,
|
||||
};
|
||||
|
||||
|
||||
*rchip = NULL;
|
||||
|
||||
|
||||
if ((err = pci_enable_device(pci)) < 0)
|
||||
return err;
|
||||
if (pci_set_dma_mask(pci, 0x0fffffff) < 0 ||
|
||||
pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) {
|
||||
if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 ||
|
||||
pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) {
|
||||
snd_printk(KERN_ERR "error to set 28bit mask DMA\n");
|
||||
pci_disable_device(pci);
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
|
||||
chip = kzalloc(sizeof(*chip), GFP_KERNEL);
|
||||
if (chip == NULL) {
|
||||
pci_disable_device(pci);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
||||
chip->card = card;
|
||||
chip->pci = pci;
|
||||
chip->irq = -1;
|
||||
|
|
|
@ -100,6 +100,7 @@
|
|||
#include <linux/interrupt.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/gameport.h>
|
||||
#include <linux/moduleparam.h>
|
||||
|
@ -2561,8 +2562,8 @@ static int __devinit snd_es1968_create(struct snd_card *card,
|
|||
if ((err = pci_enable_device(pci)) < 0)
|
||||
return err;
|
||||
/* check, if we can restrict PCI DMA transfers to 28 bits */
|
||||
if (pci_set_dma_mask(pci, 0x0fffffff) < 0 ||
|
||||
pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) {
|
||||
if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 ||
|
||||
pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) {
|
||||
snd_printk(KERN_ERR "architecture does not support 28bit PCI busmaster DMA\n");
|
||||
pci_disable_device(pci);
|
||||
return -ENXIO;
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
#include <linux/interrupt.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/moduleparam.h>
|
||||
#include <linux/mutex.h>
|
||||
|
@ -2553,8 +2554,8 @@ static int __devinit snd_ice1712_create(struct snd_card *card,
|
|||
if ((err = pci_enable_device(pci)) < 0)
|
||||
return err;
|
||||
/* check, if we can restrict PCI DMA transfers to 28 bits */
|
||||
if (pci_set_dma_mask(pci, 0x0fffffff) < 0 ||
|
||||
pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) {
|
||||
if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 ||
|
||||
pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) {
|
||||
snd_printk(KERN_ERR "architecture does not support 28bit PCI busmaster DMA\n");
|
||||
pci_disable_device(pci);
|
||||
return -ENXIO;
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#include <linux/interrupt.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/moduleparam.h>
|
||||
|
@ -2657,8 +2658,8 @@ snd_m3_create(struct snd_card *card, struct pci_dev *pci,
|
|||
return -EIO;
|
||||
|
||||
/* check, if we can restrict PCI DMA transfers to 28 bits */
|
||||
if (pci_set_dma_mask(pci, 0x0fffffff) < 0 ||
|
||||
pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) {
|
||||
if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 ||
|
||||
pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) {
|
||||
snd_printk(KERN_ERR "architecture does not support 28bit PCI busmaster DMA\n");
|
||||
pci_disable_device(pci);
|
||||
return -ENXIO;
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <linux/init.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/moduleparam.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <sound/core.h>
|
||||
|
@ -1289,7 +1290,7 @@ static int __devinit snd_mixart_probe(struct pci_dev *pci,
|
|||
pci_set_master(pci);
|
||||
|
||||
/* check if we can restrict PCI DMA transfers to 32 bits */
|
||||
if (pci_set_dma_mask(pci, 0xffffffff) < 0) {
|
||||
if (pci_set_dma_mask(pci, DMA_32BIT_MASK) < 0) {
|
||||
snd_printk(KERN_ERR "architecture does not support 32bit PCI busmaster DMA\n");
|
||||
pci_disable_device(pci);
|
||||
return -ENXIO;
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <linux/interrupt.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/moduleparam.h>
|
||||
#include <linux/mutex.h>
|
||||
|
@ -1217,7 +1218,7 @@ static int __devinit pcxhr_probe(struct pci_dev *pci, const struct pci_device_id
|
|||
pci_set_master(pci);
|
||||
|
||||
/* check if we can restrict PCI DMA transfers to 32 bits */
|
||||
if (pci_set_dma_mask(pci, 0xffffffff) < 0) {
|
||||
if (pci_set_dma_mask(pci, DMA_32BIT_MASK) < 0) {
|
||||
snd_printk(KERN_ERR "architecture does not support 32bit PCI busmaster DMA\n");
|
||||
pci_disable_device(pci);
|
||||
return -ENXIO;
|
||||
|
|
Загрузка…
Ссылка в новой задаче