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

coherent.

Approved by:	gibbs
MFC after:	2 weeks
This commit is contained in:
Marius Strobl 2011-03-12 20:36:52 +00:00
parent 1cd0ec03d6
commit e320a9ff1e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=219577
2 changed files with 11 additions and 6 deletions

View File

@ -6099,7 +6099,8 @@ ahd_alloc_scbs(struct ahd_softc *ahd)
/* Allocate the next batch of hardware SCBs */
if (aic_dmamem_alloc(ahd, scb_data->hscb_dmat,
(void **)&hscb_map->vaddr,
BUS_DMA_NOWAIT, &hscb_map->dmamap) != 0) {
BUS_DMA_NOWAIT | BUS_DMA_COHERENT,
&hscb_map->dmamap) != 0) {
free(hscb_map, M_DEVBUF);
return (0);
}
@ -6132,7 +6133,8 @@ ahd_alloc_scbs(struct ahd_softc *ahd)
/* Allocate the next batch of S/G lists */
if (aic_dmamem_alloc(ahd, scb_data->sg_dmat,
(void **)&sg_map->vaddr,
BUS_DMA_NOWAIT, &sg_map->dmamap) != 0) {
BUS_DMA_NOWAIT | BUS_DMA_COHERENT,
&sg_map->dmamap) != 0) {
free(sg_map, M_DEVBUF);
return (0);
}
@ -6397,7 +6399,7 @@ ahd_init(struct ahd_softc *ahd)
/* Allocation of driver data */
if (aic_dmamem_alloc(ahd, ahd->shared_data_dmat,
(void **)&ahd->shared_data_map.vaddr,
BUS_DMA_NOWAIT,
BUS_DMA_NOWAIT | BUS_DMA_COHERENT,
&ahd->shared_data_map.dmamap) != 0) {
return (ENOMEM);
}

View File

@ -4381,7 +4381,8 @@ ahc_init_scbdata(struct ahc_softc *ahc)
/* Allocation for our hscbs */
if (aic_dmamem_alloc(ahc, scb_data->hscb_dmat,
(void **)&scb_data->hscbs,
BUS_DMA_NOWAIT, &scb_data->hscb_dmamap) != 0) {
BUS_DMA_NOWAIT | BUS_DMA_COHERENT,
&scb_data->hscb_dmamap) != 0) {
goto error_exit;
}
@ -4549,7 +4550,8 @@ ahc_alloc_scbs(struct ahc_softc *ahc)
/* Allocate S/G space for the next batch of SCBS */
if (aic_dmamem_alloc(ahc, scb_data->sg_dmat,
(void **)&sg_map->sg_vaddr,
BUS_DMA_NOWAIT, &sg_map->sg_dmamap) != 0) {
BUS_DMA_NOWAIT | BUS_DMA_COHERENT,
&sg_map->sg_dmamap) != 0) {
free(sg_map, M_DEVBUF);
return (0);
}
@ -4941,7 +4943,8 @@ ahc_init(struct ahc_softc *ahc)
/* Allocation of driver data */
if (aic_dmamem_alloc(ahc, ahc->shared_data_dmat,
(void **)&ahc->qoutfifo,
BUS_DMA_NOWAIT, &ahc->shared_data_dmamap) != 0) {
BUS_DMA_NOWAIT | BUS_DMA_COHERENT,
&ahc->shared_data_dmamap) != 0) {
return (ENOMEM);
}