Allocate the DMA memory shared between the host and the controller as

coherent.

MFC after:	2 weeks
This commit is contained in:
Marius Strobl 2011-03-11 22:19:49 +00:00
parent 77ccab511d
commit 0752b99d69
2 changed files with 4 additions and 3 deletions

View File

@ -686,7 +686,7 @@ fwohci_init(struct fwohci_softc *sc, device_t dev)
sc->fc.dev = dev;
sc->fc.config_rom = fwdma_malloc(&sc->fc, CROMSIZE, CROMSIZE,
&sc->crom_dma, BUS_DMA_WAITOK);
&sc->crom_dma, BUS_DMA_WAITOK | BUS_DMA_COHERENT);
if(sc->fc.config_rom == NULL){
device_printf(dev, "config_rom alloc failed.");
return ENOMEM;
@ -708,7 +708,7 @@ fwohci_init(struct fwohci_softc *sc, device_t dev)
/* SID recieve buffer must align 2^11 */
#define OHCI_SIDSIZE (1 << 11)
sc->sid_buf = fwdma_malloc(&sc->fc, OHCI_SIDSIZE, OHCI_SIDSIZE,
&sc->sid_dma, BUS_DMA_WAITOK);
&sc->sid_dma, BUS_DMA_WAITOK | BUS_DMA_COHERENT);
if (sc->sid_buf == NULL) {
device_printf(dev, "sid_buf alloc failed.");
return ENOMEM;

View File

@ -562,7 +562,8 @@ END_DEBUG
fwdma_malloc(sbp->fd.fc,
/* alignment */ sizeof(uint32_t),
SBP_DMA_SIZE, &sdev->dma, BUS_DMA_NOWAIT);
SBP_DMA_SIZE, &sdev->dma, BUS_DMA_NOWAIT |
BUS_DMA_COHERENT);
if (sdev->dma.v_addr == NULL) {
printf("%s: dma space allocation failed\n",
__func__);