From owner-svn-src-stable@FreeBSD.ORG Tue Oct 12 17:12:35 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B11C1065698; Tue, 12 Oct 2010 17:12:35 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 88C938FC4D; Tue, 12 Oct 2010 17:12:35 +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 o9CHCZx2054715; Tue, 12 Oct 2010 17:12:35 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9CHCZKK054713; Tue, 12 Oct 2010 17:12:35 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201010121712.o9CHCZKK054713@svn.freebsd.org> From: Bernhard Schmidt Date: Tue, 12 Oct 2010 17:12:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213734 - stable/7/sys/dev/iwi X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Oct 2010 17:12:35 -0000 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;