Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Mar 2011 13:07:07 +0000 (UTC)
From:      Marius Strobl <marius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r220036 - stable/8/sys/dev/aic7xxx
Message-ID:  <201103261307.p2QD77v4022755@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marius
Date: Sat Mar 26 13:07:07 2011
New Revision: 220036
URL: http://svn.freebsd.org/changeset/base/220036

Log:
  MFC: r219577
  
  Allocate the DMA memory shared between the host and the controller as
  coherent.
  
  Approved by:	gibbs

Modified:
  stable/8/sys/dev/aic7xxx/aic79xx.c
  stable/8/sys/dev/aic7xxx/aic7xxx.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/aic7xxx/aic79xx.c
==============================================================================
--- stable/8/sys/dev/aic7xxx/aic79xx.c	Sat Mar 26 13:06:43 2011	(r220035)
+++ stable/8/sys/dev/aic7xxx/aic79xx.c	Sat Mar 26 13:07:07 2011	(r220036)
@@ -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: stable/8/sys/dev/aic7xxx/aic7xxx.c
==============================================================================
--- stable/8/sys/dev/aic7xxx/aic7xxx.c	Sat Mar 26 13:06:43 2011	(r220035)
+++ stable/8/sys/dev/aic7xxx/aic7xxx.c	Sat Mar 26 13:07:07 2011	(r220036)
@@ -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);
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103261307.p2QD77v4022755>