From owner-svn-src-head@FreeBSD.ORG Sat Mar 12 20:36:52 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DA78106566C; Sat, 12 Mar 2011 20:36:52 +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 522CC8FC16; Sat, 12 Mar 2011 20:36:52 +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 p2CKaqHF029358; Sat, 12 Mar 2011 20:36:52 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2CKaq7W029355; Sat, 12 Mar 2011 20:36:52 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201103122036.p2CKaq7W029355@svn.freebsd.org> From: Marius Strobl Date: Sat, 12 Mar 2011 20:36:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219577 - head/sys/dev/aic7xxx X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Mar 2011 20:36:52 -0000 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); }