On Fri, Feb 12, 2016 at 11:17 AM, Stefan Sperling <s...@stsp.name> wrote:
> On Fri, Feb 12, 2016 at 10:47:16AM -0500, Donald Allen wrote: > > On Fri, Feb 12, 2016 at 10:45 AM, Chris Cappuccio <ch...@nmedia.net> > wrote: > > > > > Donald Allen [donaldcal...@gmail.com] wrote: > > > > On Feb 12, 2016 05:08, "Stefan Sperling" <s...@stsp.name> wrote: > > > > > > > > > > On Thu, Feb 11, 2016 at 08:42:21PM -0500, Donald Allen wrote: > > > > > > When attempting to install the 2/8 snapshot on my Thinkpad > x-250, I > > > > chose > > > > > > to configure the wireless network interface (iwm). This resulted > in > > > the > > > > > > following: > > > > > > > > > > > > iwm0: could not read firmware iwm-7265-9 (error 2) > > > > > > panic: attempt to execute user address 0x0 in supervisor mode > > > > > > > > > > Do you have a trace from ddb please? > > > > > > > > There was no entry to ddb. There was one additional message after the > > > above: > > > > > > > > syncing disks... done > > > > > > > > and that was all she wrote. (I took a photo of the screen.) > > > > > > > > If you have a suggestion for how to get the trace, I will certainly > try > > > to > > > > help. Or maybe build a kernel with some additional printfs to try to > > > > isolate where this is happening? > > > > > > sysctl ddb.panic=1 ?? > > > > > > > Ah .. thank you. I'll give it a try. > > > > No need. I could reproduce locally. The problem also shows up with > a GENERIC kernel when the firmware is not installed. > > For some reason, the callbacks into the wireless stack aren't hooked > up until after the firmware is loaded. There is no reason not do hook > them up ealier. This diff fixes the crash for me. > Thanks. I just used this exchange as an example to a friend who buys everything Apple and then complains when their software is buggy. This is a perfect example of how a direct negative feedback path makes software converge quickly to correctness, something you don't get with the big proprietary players like Apple, Microsoft, etc. > > Index: if_iwm.c > =================================================================== > RCS file: /cvs/src/sys/dev/pci/if_iwm.c,v > retrieving revision 1.77 > diff -u -p -r1.77 if_iwm.c > --- if_iwm.c 5 Feb 2016 16:08:44 -0000 1.77 > +++ if_iwm.c 12 Feb 2016 16:10:48 -0000 > @@ -6642,18 +6642,6 @@ iwm_preinit(struct iwm_softc *sc) > printf("%s: could not set MAC address (error %d)\n", > DEVNAME(sc), error); > > - ic->ic_node_alloc = iwm_node_alloc; > - > - /* Override 802.11 state transition machine. */ > - sc->sc_newstate = ic->ic_newstate; > - ic->ic_newstate = iwm_newstate; > - ic->ic_update_htprot = iwm_update_htprot; > - ic->ic_ampdu_rx_start = iwm_ampdu_rx_start; > - ic->ic_ampdu_rx_stop = iwm_ampdu_rx_stop; > -#ifdef notyet > - ic->ic_ampdu_tx_start = iwm_ampdu_tx_start; > - ic->ic_ampdu_tx_stop = iwm_ampdu_tx_stop; > -#endif > ieee80211_media_init(ifp, iwm_media_change, > ieee80211_media_status); > > return 0; > @@ -6886,6 +6874,18 @@ iwm_attach(struct device *parent, struct > task_set(&sc->ba_task, iwm_ba_task, sc); > task_set(&sc->htprot_task, iwm_htprot_task, sc); > > + ic->ic_node_alloc = iwm_node_alloc; > + > + /* Override 802.11 state transition machine. */ > + sc->sc_newstate = ic->ic_newstate; > + ic->ic_newstate = iwm_newstate; > + ic->ic_update_htprot = iwm_update_htprot; > + ic->ic_ampdu_rx_start = iwm_ampdu_rx_start; > + ic->ic_ampdu_rx_stop = iwm_ampdu_rx_stop; > +#ifdef notyet > + ic->ic_ampdu_tx_start = iwm_ampdu_tx_start; > + ic->ic_ampdu_tx_stop = iwm_ampdu_tx_stop; > +#endif > /* > * We cannot read the MAC address without loading the > * firmware from disk. Postpone until mountroot is done.