Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Oct 2015 23:41:44 -0700
From:      Adrian Chadd <adrian.chadd@gmail.com>
To:        Felix Johnson <felix.the.red@gmail.com>
Cc:        "freebsd-wireless@freebsd.org" <freebsd-wireless@freebsd.org>
Subject:   Re: IWM 3160 fatal firmware error
Message-ID:  <CAJ-VmokD02VfF1tfhoiRcpkgLc=BaoYeXSjma0iU9h1JLYfiKw@mail.gmail.com>
In-Reply-To: <CAJp9_bZWGH_puwdkZA8AjLmGsm%2BJK=5Tf0mOyCusWPb266ioZA@mail.gmail.com>
References:  <CAJp9_bZWGH_puwdkZA8AjLmGsm%2BJK=5Tf0mOyCusWPb266ioZA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi!

This is a side effect from the openbsd driver that was ported. Yes, it
needs fixing. :(

The intel firmware for iwm NICs requires you to jump through hoops to
setup MAC and PHY contexts in the firmware. Once you've added a MAC or
PHY context, you can't re-add it - you have to either modify it, or
delete it and re-add it. The OpenBSD driver doesn't do it like the
linux driver does - it tries adding the MAC context upon association,
and relied upon doing full NIC reset before changing state. I tried to
fix the obvious cases in FreeBSD by doing some very basic tracking of
whether we've added a MAC context but it never was "completely right"
and so yeah, you still get firmware assertions. Sorry :( If anything
goes wrong during association then there's a good chance the firmware
will panic.

Now ideally we'd fix this in FreeBSD to act like linux - you add the
MAC context when you create a VAP, and you just modify it whenever you
associate/disassociate. However, someone has to sit down with the
linux driver and map out all of the places they're updating the
firmware state and jumping through some pretty complicated hoops. I
don't have the energy to do it myself.

(But if someone does tidy this all up then I'll give 11n and 11ac support a go.)




-adrian


On 8 October 2015 at 23:37, Felix Johnson <felix.the.red@gmail.com> wrote:
> Hello,
>
> First off - thank you for working on the iwm driver!
>
> I was able to configure my iwm 3160 to talk to the AP with WPA-PSK, and
> download a few files.
>
> Unfortunately, I keep getting fatal firmware errors. There is a device
> error log (below),
> and if I call 'service netif restart' I can usually get it running again,
> though only for 30 seconds
> to a few minutes.
>
> I downloaded the latest 11 snapshot for amd64, that's what I'm trying it
> with.
>
> Let me know if I can help.
>
> Felix
>
> (top part is dmesg)
>
> iwm0: <Intel Dual Band Wireless AC 3160> mem 0xf7c00000-0xf7c01fff irq 19
> at device 0.0 on pci2
> iwm0: revision: 0x160, firmware 25.228 (API ver. 9)
> iwm0: iwm_update_edca: called
> iwm0: dumping device error log
> iwm0: Start IWL Error Log Dump:
> iwm0: Status: 0x3, count: 6
> iwm0: 0x00003001 | ADVANCED_SYSASSERT
> iwm0: 00A00220 | uPc
> iwm0: 00000000 | branchlink1
> iwm0: 00000BA4 | branchlink2
> iwm0: 00014B7C | interruptlink1
> iwm0: 00722153 | interruptlink2
> iwm0: 00000001 | data1
> iwm0: 00000000 | data2
> iwm0: DEADBEEF | data3
> iwm0: 13814CA7 | beacon time
> iwm0: A0E7A35D | tsf low
> iwm0: 00000585 | tsf hi
> iwm0: 00000000 | time gp1
> iwm0: 0151DAD8 | time gp2
> iwm0: 00000000 | time gp3
> iwm0: 000419E4 | uCode version
> iwm0: 00000164 | hw version
> iwm0: 00809004 | board version
> iwm0: 0925002B | hcmd
> iwm0: 240220C0 | isr0
> iwm0: 01000000 | isr1
> iwm0: 00000002 | isr2
> iwm0: 0040C0C0 | isr3
> iwm0: 00000001 | isr4
> iwm0: 01000112 | isr_pref
> iwm0: 00000000 | wait_event
> iwm0: 000000C0 | l2p_control
> iwm0: 00018030 | l2p_duration
> iwm0: 0000003F | l2p_mhvalid
> iwm0: 00000081 | l2p_addr_match
> iwm0: 00000005 | lmpm_pmg_sel
> iwm0: 20111734 | timestamp
> iwm0: 0000E0F0 | flow_handler
> iwm0: driver status:
> iwm0:   tx ring  0: qid=0  cur=2   queued=0
> iwm0:   tx ring  1: qid=1  cur=0   queued=0
> iwm0:   tx ring  2: qid=2  cur=0   queued=0
> iwm0:   tx ring  3: qid=3  cur=0   queued=0
> iwm0:   tx ring  4: qid=4  cur=0   queued=0
> iwm0:   tx ring  5: qid=5  cur=0   queued=0
> iwm0:   tx ring  6: qid=6  cur=0   queued=0
> iwm0:   tx ring  7: qid=7  cur=0   queued=0
> iwm0:   tx ring  8: qid=8  cur=0   queued=0
> iwm0:   tx ring  9: qid=9  cur=38  queued=0
> iwm0:   tx ring 10: qid=10 cur=0   queued=0
> iwm0:   tx ring 11: qid=11 cur=0   queued=0
> iwm0:   tx ring 12: qid=12 cur=0   queued=0
> iwm0:   tx ring 13: qid=13 cur=0   queued=0
> iwm0:   tx ring 14: qid=14 cur=0   queued=0
> iwm0:   tx ring 15: qid=15 cur=0   queued=0
> iwm0:   tx ring 16: qid=16 cur=0   queued=0
> iwm0:   tx ring 17: qid=17 cur=0   queued=0
> iwm0:   tx ring 18: qid=18 cur=0   queued=0
> iwm0:   tx ring 19: qid=19 cur=0   queued=0
> iwm0:   rx ring: cur=229
> iwm0:   802.11 state 3
> iwm0: fatal firmware error
> iwm0: iwm_auth: binding cmd
> iwm0: iwm_newstate: could not move to auth state: 35
> iwm0: iwm_auth: failed to set multicast
> iwm0: iwm_newstate: could not move to auth state: 6
> iwm0: could not initiate scan
> iwm0: iwm_update_edca: called
> iwm0: iwm_update_edca: called
> iwm0: iwm_update_edca: called
> iwm0: iwm_update_edca: called
> iwm0: dumping device error log
> iwm0: Start IWL Error Log Dump:
> iwm0: Status: 0x3, count: 6
> iwm0: 0x00003001 | ADVANCED_SYSASSERT
> iwm0: 000002F0 | uPc
> iwm0: 00000000 | branchlink1
> iwm0: 00000BA4 | branchlink2
> iwm0: 00014B7C | interruptlink1
> iwm0: 00722153 | interruptlink2
> iwm0: 00000001 | data1
> iwm0: 00000000 | data2
> iwm0: DEADBEEF | data3
> iwm0: 003FE597 | beacon time
> iwm0: 00001A68 | tsf low
> iwm0: 00000000 | tsf hi
> iwm0: 00000000 | time gp1
> iwm0: 00001A68 | time gp2
> iwm0: 00000000 | time gp3
> iwm0: 000419E4 | uCode version
> iwm0: 00000164 | hw version
> iwm0: 00809004 | board version
> iwm0: 091F002B | hcmd
> iwm0: 00022081 | isr0
> iwm0: 00000000 | isr1
> iwm0: 00000002 | isr2
> iwm0: 0040E4C0 | isr3
> iwm0: 00000001 | isr4
> iwm0: 01002112 | isr_pref
> iwm0: 00000000 | wait_event
> iwm0: 00000850 | l2p_control
> iwm0: 00000020 | l2p_duration
> iwm0: 00000000 | l2p_mhvalid
> iwm0: 00000000 | l2p_addr_match
> iwm0: 00000005 | lmpm_pmg_sel
> iwm0: 20111734 | timestamp
> iwm0: 00002028 | flow_handler
> iwm0: driver status:
> iwm0:   tx ring  0: qid=0  cur=2   queued=2
> iwm0:   tx ring  1: qid=1  cur=0   queued=0
> iwm0:   tx ring  2: qid=2  cur=0   queued=0
> iwm0:   tx ring  3: qid=3  cur=0   queued=0
> iwm0:   tx ring  4: qid=4  cur=0   queued=0
> iwm0:   tx ring  5: qid=5  cur=0   queued=0
> iwm0:   tx ring  6: qid=6  cur=0   queued=0
> iwm0:   tx ring  7: qid=7  cur=0   queued=0
> iwm0:   tx ring  8: qid=8  cur=0   queued=0
> iwm0:   tx ring  9: qid=9  cur=32  queued=0
> iwm0:   tx ring 10: qid=10 cur=0   queued=0
> iwm0:   tx ring 11: qid=11 cur=0   queued=0
> iwm0:   tx ring 12: qid=12 cur=0   queued=0
> iwm0:   tx ring 13: qid=13 cur=0   queued=0
> iwm0:   tx ring 14: qid=14 cur=0   queued=0
> iwm0:   tx ring 15: qid=15 cur=0   queued=0
> iwm0:   tx ring 16: qid=16 cur=0   queued=0
> iwm0:   tx ring 17: qid=17 cur=0   queued=0
> iwm0:   tx ring 18: qid=18 cur=0   queued=0
> iwm0:   tx ring 19: qid=19 cur=0   queued=0
> iwm0:   rx ring: cur=33
> iwm0:   802.11 state 2
> iwm0: fatal firmware error
> iwm0: iwm_auth: binding cmd
> iwm0: iwm_newstate: could not move to auth state: 35
> iwm0: could not initiate scan
> iwm0: iwm_update_edca: called
> iwm0: iwm_update_edca: called
> iwm0: dumping device error log
> iwm0: Start IWL Error Log Dump:
> iwm0: Status: 0x3, count: 6
> iwm0: 0x00003001 | ADVANCED_SYSASSERT
> iwm0: 000002B0 | uPc
> iwm0: 00000000 | branchlink1
> iwm0: 00000BA4 | branchlink2
> iwm0: 00014B7C | interruptlink1
> iwm0: 00722153 | interruptlink2
> iwm0: 00000001 | data1
> iwm0: 00000000 | data2
> iwm0: DEADBEEF | data3
> iwm0: 00000000 | beacon time
> iwm0: 0126EE0C | tsf low
> iwm0: 00000000 | tsf hi
> iwm0: 00000000 | time gp1
> iwm0: 0126EE0D | time gp2
> iwm0: 00000000 | time gp3
> iwm0: 000419E4 | uCode version
> iwm0: 00000164 | hw version
> iwm0: 00809004 | board version
> iwm0: 0923002B | hcmd
> iwm0: 00022080 | isr0
> iwm0: 01000000 | isr1
> iwm0: 00000002 | isr2
> iwm0: 0041C0C0 | isr3
> iwm0: 00000001 | isr4
> iwm0: 01000112 | isr_pref
> iwm0: 00000000 | wait_event
> iwm0: 00000080 | l2p_control
> iwm0: 00010000 | l2p_duration
> iwm0: 0000003F | l2p_mhvalid
> iwm0: 00000000 | l2p_addr_match
> iwm0: 00000005 | lmpm_pmg_sel
> iwm0: 20111734 | timestamp
> iwm0: 00004050 | flow_handler
> iwm0: driver status:
> iwm0:   tx ring  0: qid=0  cur=1   queued=0
> iwm0:   tx ring  1: qid=1  cur=0   queued=0
> iwm0:   tx ring  2: qid=2  cur=0   queued=0
> iwm0:   tx ring  3: qid=3  cur=0   queued=0
> iwm0:   tx ring  4: qid=4  cur=0   queued=0
> iwm0:   tx ring  5: qid=5  cur=0   queued=0
> iwm0:   tx ring  6: qid=6  cur=0   queued=0
> iwm0:   tx ring  7: qid=7  cur=0   queued=0
> iwm0:   tx ring  8: qid=8  cur=0   queued=0
> iwm0:   tx ring  9: qid=9  cur=36  queued=0
> iwm0:   tx ring 10: qid=10 cur=0   queued=0
> iwm0:   tx ring 11: qid=11 cur=0   queued=0
> iwm0:   tx ring 12: qid=12 cur=0   queued=0
> iwm0:   tx ring 13: qid=13 cur=0   queued=0
> iwm0:   tx ring 14: qid=14 cur=0   queued=0
> iwm0:   tx ring 15: qid=15 cur=0   queued=0
> iwm0:   tx ring 16: qid=16 cur=0   queued=0
> iwm0:   tx ring 17: qid=17 cur=0   queued=0
> iwm0:   tx ring 18: qid=18 cur=0   queued=0
> iwm0:   tx ring 19: qid=19 cur=0   queued=0
> iwm0:   rx ring: cur=69
> iwm0:   802.11 state 1
> iwm0: fatal firmware error
> iwm0: iwm_auth: binding cmd
> iwm0: iwm_newstate: could not move to auth state: 35
> iwm0: could not initiate scan
> _______________________________________________
> freebsd-wireless@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
> To unsubscribe, send any mail to "freebsd-wireless-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmokD02VfF1tfhoiRcpkgLc=BaoYeXSjma0iU9h1JLYfiKw>