From owner-svn-src-head@freebsd.org Sun Apr 3 23:40:00 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E3EAB02C26; Sun, 3 Apr 2016 23:40:00 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E46BD19FB; Sun, 3 Apr 2016 23:39:59 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u33Ndxop020219; Sun, 3 Apr 2016 23:39:59 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u33NdxjM020218; Sun, 3 Apr 2016 23:39:59 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201604032339.u33NdxjM020218@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 3 Apr 2016 23:39:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297531 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Apr 2016 23:40:00 -0000 Author: adrian Date: Sun Apr 3 23:39:58 2016 New Revision: 297531 URL: https://svnweb.freebsd.org/changeset/base/297531 Log: [iwn] Don't try to seamlessly recover from a firmware panic; just restart the interface. I know this may be unpopular, but iwn is not yet completely ready for a transparent firmware restart. I have this thing panic my laptop reliably because 11n state isn't kept in sync and the TX completion path ends up trying to free a null node reference. Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Sun Apr 3 23:03:54 2016 (r297530) +++ head/sys/dev/iwn/if_iwn.c Sun Apr 3 23:39:58 2016 (r297531) @@ -8701,7 +8701,9 @@ iwn_panicked(void *arg0, int pending) struct iwn_softc *sc = arg0; struct ieee80211com *ic = &sc->sc_ic; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); +#if 0 int error; +#endif if (vap == NULL) { printf("%s: null vap\n", __func__); @@ -8709,8 +8711,18 @@ iwn_panicked(void *arg0, int pending) } device_printf(sc->sc_dev, "%s: controller panicked, iv_state = %d; " - "resetting...\n", __func__, vap->iv_state); + "restarting\n", __func__, vap->iv_state); + /* + * This is not enough work. We need to also reinitialise + * the correct transmit state for aggregation enabled queues, + * which has a very specific requirement of + * ring index = 802.11 seqno % 256. If we don't do this (which + * we definitely don't!) then the firmware will just panic again. + */ +#if 1 + ieee80211_restart_all(ic); +#else IWN_LOCK(sc); iwn_stop_locked(sc); @@ -8727,6 +8739,7 @@ iwn_panicked(void *arg0, int pending) } IWN_UNLOCK(sc); +#endif } static void