Update of /cvsroot/alsa/alsa-kernel/pci/trident
In directory sc8-pr-cvs1:/tmp/cvs-serv12541/pci/trident

Modified Files:
        trident_main.c 
Log Message:
- fixed the DMA allocation.
  pci_set_dma_mask() is called together with pci_set_consistent_dma_mask().
  also clean up the double check of mask.


Index: trident_main.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/trident/trident_main.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- trident_main.c      20 Nov 2003 13:22:20 -0000      1.49
+++ trident_main.c      19 Jan 2004 18:37:35 -0000      1.50
@@ -3523,11 +3523,11 @@
        if ((err = pci_enable_device(pci)) < 0)
                return err;
        /* check, if we can restrict PCI DMA transfers to 30 bits */
-       if (!pci_dma_supported(pci, 0x3fffffff)) {
+       if (pci_set_dma_massk(pci, 0x3fffffff) < 0 ||
+           pci_set_consistent_dma_mask(pci, 0x3fffffff) < 0) {
                snd_printk("architecture does not support 30bit PCI busmaster DMA\n");
                return -ENXIO;
        }
-       pci_set_consistent_dma_mask(pci, 0x3fffffff);
        
        trident = snd_magic_kcalloc(trident_t, 0, GFP_KERNEL);
        if (trident == NULL)
@@ -3952,7 +3952,9 @@
                return;
 
        pci_enable_device(trident->pci);
-       pci_set_consistent_dma_mask(trident->pci, 0x3fffffff); /* FIXME: correct? */
+       if (pci_set_dma_mask(trident->pci, 0x3fffffff) < 0 ||
+           pci_set_consistent_dma_mask(trident->pci, 0x3fffffff) < 0)
+               snd_printk(KERN_WARNING "trident: can't set the proper DMA mask\n");
        pci_set_master(trident->pci); /* to be sure */
 
        switch (trident->device) {



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to