Update of /cvsroot/alsa/alsa-kernel/core In directory sc8-pr-cvs1:/tmp/cvs-serv12541/core
Modified Files: memalloc.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: memalloc.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/core/memalloc.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- memalloc.c 16 Jan 2004 18:05:52 -0000 1.20 +++ memalloc.c 19 Jan 2004 18:37:35 -0000 1.21 @@ -94,16 +94,19 @@ dma_addr_t *dma_handle) { void *ret; - u64 dma_mask; + u64 dma_mask, cdma_mask; unsigned long mask; if (hwdev == NULL) return pci_alloc_consistent(hwdev, size, dma_handle); - dma_mask = hwdev->consistent_dma_mask; - mask = (unsigned long)dma_mask; + dma_mask = hwdev->dma_mask; + cdma_mask = hwdev->consistent_dma_mask; + mask = (unsigned long)dma_mask && (unsigned long)cdma_mask; + hwdev->dma_mask = 0xffffffff; /* do without masking */ hwdev->consistent_dma_mask = 0xffffffff; /* do without masking */ ret = pci_alloc_consistent(hwdev, size, dma_handle); - hwdev->consistent_dma_mask = dma_mask; /* restore */ + hwdev->dma_mask = dma_mask; /* restore */ + hwdev->consistent_dma_mask = cdma_mask; /* restore */ if (ret) { /* obtained address is out of range? */ if (((unsigned long)*dma_handle + size - 1) & ~mask) { @@ -841,7 +844,8 @@ continue; } - if (pci_set_consistent_dma_mask(pci, dev->dma_mask) < 0) { + if (pci_set_dma_mask(pci, dev->dma_mask) < 0 || + pci_set_consistent_dma_mask(pci, dev->dma_mask) < 0) { printk(KERN_ERR "snd-page-alloc: cannot set DMA mask %lx for pci %04x:%04x\n", dev->dma_mask, dev->vendor, dev->device); continue; } ------------------------------------------------------- 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