![]() | ||||||||||
Messages in this thread |
Martin Dalecki wrote: sg->busaddr=virt_to_bus(dmabuf->rawbuf+dmabuf->fragsize*i); > + sg->busaddr=virt_to_phys(dmabuf->rawbuf+dmabuf->fragsize*i); > // the card will always be doing 16bit stereo > sg->control=dmabuf->fragsamples; > if(state->card->pci_id == PCI_DEVICE_ID_SI_7012) > @@ -954,7 +954,7 @@ > } > spin_lock_irqsave(&state->card->lock, flags); > outb(2, state->card->iobase+c->port+OFF_CR); /* reset DMA machine */ > - outl(virt_to_bus(&c->sg[0]), state->card->iobase+c->port+OFF_BDBAR); > + outl(virt_to_phys(&c->sg[0]), state->card->iobase+c->port+OFF_BDBAR); These changes are wrong. The addresses desired need to be obtained from the pci_alloc_consistent return values. > outb(2, state->card->iobase+c->port+OFF_CR); /* reset DMA machine */ > - outl(virt_to_bus(&c->sg[0]), state->card->iobase+c->port+OFF_BDBAR); > + outl(virt_to_phys(&c->sg[0]), state->card->iobase+c->port+OFF_BDBAR); likewise > - ret = virt_to_bus((void *)kva); > + ret = virt_to_phys((void *)kva); > va = VMALLOC_VMADDR(adr); > kva = uvirt_to_kva(pgd_offset_k(va), va); > - ret = virt_to_bus((void *)kva); > + ret = virt_to_phys((void *)kva); > - btv->nr,virt_to_bus(po), virt_to_bus(pe)); > + btv->nr,virt_to_phys(po), virt_to_phys(pe)); ...likewise, etc. This works on silly x86 but is not portable at all... definitely not for application. -- Jeff Garzik | "I went through my candy like hot oatmeal Building 1024 | through an internally-buttered weasel." MandrakeSoft | - goats.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ | |||||||||
| Last update: 2005-03-22 12:18 [from the cache] ©2003-2008 | ||||||||||