From owner-svn-src-stable@FreeBSD.ORG Sat Mar 26 13:07:07 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB11A106566B; Sat, 26 Mar 2011 13:07:07 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 90F428FC2A; Sat, 26 Mar 2011 13:07:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2QD77Ot022758; Sat, 26 Mar 2011 13:07:07 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2QD77v4022755; Sat, 26 Mar 2011 13:07:07 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201103261307.p2QD77v4022755@svn.freebsd.org> From: Marius Strobl Date: Sat, 26 Mar 2011 13:07:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220036 - stable/8/sys/dev/aic7xxx X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 13:07:07 -0000 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); }