Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: iwn, wpa_supplicant, and wpa2 enterprise



On 4 June 2010 23:26, Sverre Froyen <sverre%viewmark.com@localhost> wrote:
> I did not mean to imply that dhcpcd was at fault. The problem is that the
> driver gets an SIOCSIFFLAGS ioctl request. This results in a call to iwn_init.
> While the driver is initializing (and still inside iwn_ioctl), it receives
> additional ioctl requests from wpa_supplicant and dhcpcd. These now fail.
>
> I have modified the patch to block only the two ioctls that call iwn_init. It
> now reads:
>
> Â Â Â Â/*
> Â Â Â Â * Prevent processes from entering this function while another
> Â Â Â Â * process is tsleep'ing in it.
> Â Â Â Â */
> Â Â Â Âif (sc->sc_flags & IWN_FLAG_BUSY) {
> Â Â Â Â Â Â Â Âswitch (cmd) {
> Â Â Â Â Â Â Â Âcase SIOCSIFADDR:
> Â Â Â Â Â Â Â Â Â Â Â Â/* FALLTHROUGH */
> Â Â Â Â Â Â Â Âcase SIOCSIFFLAGS:
> Â Â Â Â Â Â Â Â Â Â Â Âsplx(s);
> Â Â Â Â Â Â Â Â Â Â Â Âaprint_normal_dev(sc->sc_dev,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â"ioctl while busy cmd = 0x%lx\n", cmd);
> Â Â Â Â Â Â Â Â Â Â Â Âreturn EBUSY;
> Â Â Â Â Â Â Â Â}
> Â Â Â Â}
> Â Â Â Âsc->sc_flags |= IWN_FLAG_BUSY;
>
> There is a third call to iwn_init which can be happen if an ENETRESET error
> occurs. That call is left unprotected.
>
> With this modification my laptop boots fine. It would be good if Pouya could
> test the patch on his system.

Sorry about my delay in responding.  With your new patch, if I enable
wpa_supplicant in rc.conf I still see the same behaviour as before
(that is, a fatal firmware error and a uvm_fault in wpa_supplicant
that drops in ddb), plus I saw the following two lines just before the
uvm_fault at least once:

iwn0: could not load firmware .text extension
iwn0: could not load firmware

Here is the stack trace:

kern_free() at netbsd:kern_free+0x2d
iwn_init()  at netbsd:iwn_init+0x47a
iwn_ioctl() at netbsd:iwn_ioctl+0xf9
ifioctl() at netbsd:ifioctl()+0x1e4
soo_ioctl() at netbsd:soo_ioctl+0x2a5
sys_ioctl() at netbsd:sys_ioctl+0xe9
syscall() at netbsd:syscall+0xaa

Pouya

P.S. Since dhcpcd was mentioned, I should perhaps note that I am using
dhclient and not dhcpcd (I'm ignorant about the relative advantages of
each client).  The uvm_fault, however, precedes the execution of
dhclient.


Home | Main Index | Thread Index | Old Index