From owner-svn-src-stable-8@FreeBSD.ORG Wed Mar 23 20:59:21 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 2DF381065670; Wed, 23 Mar 2011 20:59:21 +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 032808FC16; Wed, 23 Mar 2011 20:59:21 +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 p2NKxKc6007053; Wed, 23 Mar 2011 20:59:20 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2NKxKpX007051; Wed, 23 Mar 2011 20:59:20 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201103232059.p2NKxKpX007051@svn.freebsd.org> From: Marius Strobl Date: Wed, 23 Mar 2011 20:59:20 +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: r219934 - stable/8/sys/dev/ata/chipsets 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:59:21 -0000 Author: marius Date: Wed Mar 23 20:59:20 2011 New Revision: 219934 URL: http://svn.freebsd.org/changeset/base/219934 Log: MFC: r219338 Add missing bus_dmamap_sync() calls for the work DMA map. Modified: stable/8/sys/dev/ata/chipsets/ata-siliconimage.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/chipsets/ata-siliconimage.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Wed Mar 23 20:58:12 2011 (r219933) +++ stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Wed Mar 23 20:59:20 2011 (r219934) @@ -494,7 +494,11 @@ ata_siiprb_ch_attach(device_t dev) static int ata_siiprb_ch_detach(device_t dev) { + struct ata_channel *ch = device_get_softc(dev); + if (ch->dma.work_tag && ch->dma.work_map) + bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, + BUS_DMASYNC_POSTWRITE); ata_dmafini(dev); return 0; } @@ -576,6 +580,8 @@ ata_siiprb_begin_transaction(struct ata_ } } + bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, BUS_DMASYNC_PREWRITE); + /* activate the prb */ prb_bus = ch->dma.work_bus; ATA_OUTL(ctlr->r_res2, 0x1c00 + offset, prb_bus); @@ -598,7 +604,9 @@ ata_siiprb_end_transaction(struct ata_re /* kill the timeout */ callout_stop(&request->callout); - + + bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, BUS_DMASYNC_POSTWRITE); + prb = (struct ata_siiprb_command *) ((u_int8_t *)rman_get_virtual(ctlr->r_res2) + offset); @@ -671,6 +679,8 @@ ata_siiprb_issue_cmd(device_t dev) int offset = ch->unit * 0x2000; int timeout; + bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, BUS_DMASYNC_PREWRITE); + /* issue command to chip */ ATA_OUTL(ctlr->r_res2, 0x1c00 + offset, prb_bus); ATA_OUTL(ctlr->r_res2, 0x1c04 + offset, prb_bus >> 32); @@ -681,6 +691,9 @@ ata_siiprb_issue_cmd(device_t dev) if ((status = ATA_INL(ctlr->r_res2, 0x1008 + offset)) & 0x00010000) break; } + + bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, BUS_DMASYNC_POSTWRITE); + // SOS XXX ATA_OUTL(ctlr->r_res2, 0x1008 + offset, 0x00010000); ATA_OUTL(ctlr->r_res2, 0x1008 + offset, 0x08ff08ff);