diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-06-08 08:49:26 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-06-08 08:51:24 -0400 |
commit | 4836ac655410e7f126d316b0be062b38746f7529 (patch) | |
tree | 3203938b4a4c718c8da64fef2a84fbc48bccfde9 | |
parent | d436dd063be605dc29f17b2cb0b99a852db89bed (diff) |
ALSA: ctxfi - Fix DMA mask for emu20k2 chip
Allow 64bit DMA mask for emu20k2 chip, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/ctxfi/cthw20k2.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/pci/ctxfi/cthw20k2.c b/sound/pci/ctxfi/cthw20k2.c index 041199fbae1..edbfb482746 100644 --- a/sound/pci/ctxfi/cthw20k2.c +++ b/sound/pci/ctxfi/cthw20k2.c | |||
@@ -26,7 +26,11 @@ | |||
26 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
27 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
28 | 28 | ||
29 | #define CT_XFI_DMA_MASK DMA_BIT_MASK(32) /* 32 bits */ | 29 | #if BITS_PER_LONG == 32 |
30 | #define CT_XFI_DMA_MASK DMA_BIT_MASK(32) /* 32 bit PTE */ | ||
31 | #else | ||
32 | #define CT_XFI_DMA_MASK DMA_BIT_MASK(64) /* 64 bit PTE */ | ||
33 | #endif | ||
30 | 34 | ||
31 | static u32 hw_read_20kx(struct hw *hw, u32 reg); | 35 | static u32 hw_read_20kx(struct hw *hw, u32 reg); |
32 | static void hw_write_20kx(struct hw *hw, u32 reg, u32 data); | 36 | static void hw_write_20kx(struct hw *hw, u32 reg, u32 data); |
@@ -1834,18 +1838,16 @@ static int hw_card_start(struct hw *hw) | |||
1834 | int err = 0; | 1838 | int err = 0; |
1835 | struct pci_dev *pci = hw->pci; | 1839 | struct pci_dev *pci = hw->pci; |
1836 | unsigned int gctl; | 1840 | unsigned int gctl; |
1837 | unsigned int dma_mask = 0; | ||
1838 | 1841 | ||
1839 | err = pci_enable_device(pci); | 1842 | err = pci_enable_device(pci); |
1840 | if (err < 0) | 1843 | if (err < 0) |
1841 | return err; | 1844 | return err; |
1842 | 1845 | ||
1843 | /* Set DMA transfer mask */ | 1846 | /* Set DMA transfer mask */ |
1844 | dma_mask = CT_XFI_DMA_MASK; | 1847 | if (pci_set_dma_mask(pci, CT_XFI_DMA_MASK) < 0 || |
1845 | if (pci_set_dma_mask(pci, dma_mask) < 0 || | 1848 | pci_set_consistent_dma_mask(pci, CT_XFI_DMA_MASK) < 0) { |
1846 | pci_set_consistent_dma_mask(pci, dma_mask) < 0) { | ||
1847 | printk(KERN_ERR "ctxfi: architecture does not support PCI " | 1849 | printk(KERN_ERR "ctxfi: architecture does not support PCI " |
1848 | "busmaster DMA with mask 0x%x\n", dma_mask); | 1850 | "busmaster DMA with mask 0x%llx\n", CT_XFI_DMA_MASK); |
1849 | err = -ENXIO; | 1851 | err = -ENXIO; |
1850 | goto error1; | 1852 | goto error1; |
1851 | } | 1853 | } |