Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Dec 2010 15:45:10 +0000 (UTC)
From:      Bernhard Schmidt <bschmidt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r216523 - head/sys/dev/wpi
Message-ID:  <201012181545.oBIFjAXq001415@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bschmidt
Date: Sat Dec 18 15:45:10 2010
New Revision: 216523
URL: http://svn.freebsd.org/changeset/base/216523

Log:
  Add 2 missing bus_dmamap_sync() calls. Those fix random 'scan timeout',
  'could not set power mode', 'device config failed' and other errors due
  reading invalid memory.
  
  Obtained from:	OpenBSD
  MFC after:	3 days

Modified:
  head/sys/dev/wpi/if_wpi.c

Modified: head/sys/dev/wpi/if_wpi.c
==============================================================================
--- head/sys/dev/wpi/if_wpi.c	Sat Dec 18 15:35:10 2010	(r216522)
+++ head/sys/dev/wpi/if_wpi.c	Sat Dec 18 15:45:10 2010	(r216523)
@@ -1645,9 +1645,15 @@ wpi_notif_intr(struct wpi_softc *sc)
 	struct wpi_rx_data *data;
 	uint32_t hw;
 
+	bus_dmamap_sync(sc->shared_dma.tag, sc->shared_dma.map,
+	    BUS_DMASYNC_POSTREAD);
+
 	hw = le32toh(sc->shared->next);
 	while (sc->rxq.cur != hw) {
 		data = &sc->rxq.data[sc->rxq.cur];
+
+		bus_dmamap_sync(sc->rxq.data_dmat, data->map,
+		    BUS_DMASYNC_POSTREAD);
 		desc = (void *)data->m->m_ext.ext_buf;
 
 		DPRINTFN(WPI_DEBUG_NOTIFY,



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