Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Oct 2010 17:12:35 +0000 (UTC)
From:      Bernhard Schmidt <bschmidt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r213734 - stable/7/sys/dev/iwi
Message-ID:  <201010121712.o9CHCZKK054713@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bschmidt
Date: Tue Oct 12 17:12:35 2010
New Revision: 213734
URL: http://svn.freebsd.org/changeset/base/213734

Log:
  When bringing the interface down we clear the command queue but do
  not reset the sc_cmd_cur and sc_cmd_next indices. If there are
  still pending commands while clearing the queue those two indices
  are off by at least one. This leads to no commands being sent
  to the firmware until the queue overruns. Fix this by also resetting
  the indices.
  
  This is a direct commit as the code does not exist in head.

Modified:
  stable/7/sys/dev/iwi/if_iwi.c

Modified: stable/7/sys/dev/iwi/if_iwi.c
==============================================================================
--- stable/7/sys/dev/iwi/if_iwi.c	Tue Oct 12 17:12:22 2010	(r213733)
+++ stable/7/sys/dev/iwi/if_iwi.c	Tue Oct 12 17:12:35 2010	(r213734)
@@ -3267,6 +3267,7 @@ iwi_stop(void *priv)
 	ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
 
 	memset(sc->sc_cmd, 0, sizeof(sc->sc_cmd));
+	sc->sc_cmd_cur = sc->sc_cmd_next = 0;
 	sc->sc_tx_timer = 0;
 	sc->sc_rfkill_timer = 0;
 	sc->sc_state_timer = 0;



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