Author: marius Date: Sat Mar 12 20:36:52 2011 New Revision: 219577 URL: http://svn.freebsd.org/changeset/base/219577
Log: Allocate the DMA memory shared between the host and the controller as coherent. Approved by: gibbs MFC after: 2 weeks Modified: head/sys/dev/aic7xxx/aic79xx.c head/sys/dev/aic7xxx/aic7xxx.c Modified: head/sys/dev/aic7xxx/aic79xx.c ============================================================================== --- head/sys/dev/aic7xxx/aic79xx.c Sat Mar 12 19:37:35 2011 (r219576) +++ head/sys/dev/aic7xxx/aic79xx.c Sat Mar 12 20:36:52 2011 (r219577) @@ -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); } Modified: head/sys/dev/aic7xxx/aic7xxx.c ============================================================================== --- head/sys/dev/aic7xxx/aic7xxx.c Sat Mar 12 19:37:35 2011 (r219576) +++ head/sys/dev/aic7xxx/aic7xxx.c Sat Mar 12 20:36:52 2011 (r219577) @@ -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); } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"