svn commit: r280056 - head/sys/dev/wpi
Adrian Chadd
adrian at FreeBSD.org
Sun Mar 15 20:17:26 UTC 2015
Author: adrian
Date: Sun Mar 15 20:17:25 2015
New Revision: 280056
URL: https://svnweb.freebsd.org/changeset/base/280056
Log:
Fix panics in wpi_tx_done() when powersave is enabled
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios at gmail.com>
Modified:
head/sys/dev/wpi/if_wpi.c
Modified: head/sys/dev/wpi/if_wpi.c
==============================================================================
--- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:15:10 2015 (r280055)
+++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:17:25 2015 (r280056)
@@ -1024,6 +1024,11 @@ wpi_update_rx_ring(struct wpi_softc *sc)
{
struct wpi_rx_ring *ring = &sc->rxq;
+ if (ring->update != 0) {
+ /* Wait for INT_WAKEUP event. */
+ return;
+ }
+
if (WPI_READ(sc, WPI_UCODE_GP1) & WPI_UCODE_GP1_MAC_SLEEP) {
DPRINTF(sc, WPI_DEBUG_PWRSAVE, "%s: wakeup request\n",
__func__);
@@ -1179,6 +1184,11 @@ fail: wpi_free_tx_ring(sc, ring);
static void
wpi_update_tx_ring(struct wpi_softc *sc, struct wpi_tx_ring *ring)
{
+ if (ring->update != 0) {
+ /* Wait for INT_WAKEUP event. */
+ return;
+ }
+
if (WPI_READ(sc, WPI_UCODE_GP1) & WPI_UCODE_GP1_MAC_SLEEP) {
DPRINTF(sc, WPI_DEBUG_PWRSAVE, "%s (%d): requesting wakeup\n",
__func__, ring->qid);
More information about the svn-src-all
mailing list