From owner-svn-src-stable-8@FreeBSD.ORG Wed Mar 23 20:56:56 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7DE61065670; Wed, 23 Mar 2011 20:56:56 +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 A7AD78FC15; Wed, 23 Mar 2011 20:56:56 +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 p2NKuuNv006897; Wed, 23 Mar 2011 20:56:56 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2NKuu1i006895; Wed, 23 Mar 2011 20:56:56 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201103232056.p2NKuu1i006895@svn.freebsd.org> From: Marius Strobl Date: Wed, 23 Mar 2011 20:56:56 +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: r219932 - stable/8/sys/dev/ata X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 20:56:56 -0000 Author: marius Date: Wed Mar 23 20:56:56 2011 New Revision: 219932 URL: http://svn.freebsd.org/changeset/base/219932 Log: MFC: r219336 - Allocate the DMA memory used for the work area as coherent as at least the ataahci(4) and atamarvell(4) drivers share it between the host and the controller. - Spell some zeros as BUS_DMA_WAITOK when used as bus_dmamem_alloc() flags. Modified: stable/8/sys/dev/ata/ata-dma.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/ata/ata-dma.c ============================================================================== --- stable/8/sys/dev/ata/ata-dma.c Wed Mar 23 20:55:29 2011 (r219931) +++ stable/8/sys/dev/ata/ata-dma.c Wed Mar 23 20:56:56 2011 (r219932) @@ -104,7 +104,8 @@ ata_dmainit(device_t dev) 0, NULL, NULL, &ch->dma.work_tag)) goto error; - if (bus_dmamem_alloc(ch->dma.work_tag, (void **)&ch->dma.work, 0, + if (bus_dmamem_alloc(ch->dma.work_tag, (void **)&ch->dma.work, + BUS_DMA_WAITOK | BUS_DMA_COHERENT, &ch->dma.work_map)) goto error; @@ -173,8 +174,8 @@ ata_dmaalloc(device_t dev) goto error; } - if (bus_dmamem_alloc(slot->sg_tag, (void **)&slot->sg, - 0, &slot->sg_map)) { + if (bus_dmamem_alloc(slot->sg_tag, (void **)&slot->sg, BUS_DMA_WAITOK, + &slot->sg_map)) { device_printf(ch->dev, "FAILURE - alloc sg_map\n"); goto error; }