2018-04-23 12:05:43

by Mika Westerberg

[permalink] [raw]
Subject: [BUG] iwlwifi: Microcode SW error detected. Restarting 0x2000000.

Hi,

On my Lenovo X1 Carbon gen 5 system,after I upgraded to v4.17-rc1
iwlwifi started to fail with following splats on dmesg:

iwlwifi 0000:04:00.0: Microcode SW error detected. Restarting 0x2000000.
iwlwifi 0000:04:00.0: Start IWL Error Log Dump:
iwlwifi 0000:04:00.0: Status: 0x00000100, count: 6
iwlwifi 0000:04:00.0: Loaded firmware version: 31.560484.0
iwlwifi 0000:04:00.0: 0x00000038 | BAD_COMMAND
iwlwifi 0000:04:00.0: 0x00A002F1 | trm_hw_status0
iwlwifi 0000:04:00.0: 0x00000000 | trm_hw_status1
iwlwifi 0000:04:00.0: 0x0002495C | branchlink2
iwlwifi 0000:04:00.0: 0x0003962E | interruptlink1
iwlwifi 0000:04:00.0: 0x00000000 | interruptlink2
iwlwifi 0000:04:00.0: 0x00000000 | data1
iwlwifi 0000:04:00.0: 0x00000030 | data2
iwlwifi 0000:04:00.0: 0x00000030 | data3
iwlwifi 0000:04:00.0: 0x003B31AF | beacon time
iwlwifi 0000:04:00.0: 0x0004CE4F | tsf low
iwlwifi 0000:04:00.0: 0x00000000 | tsf hi
iwlwifi 0000:04:00.0: 0x00000000 | time gp1
iwlwifi 0000:04:00.0: 0x0004CE50 | time gp2
iwlwifi 0000:04:00.0: 0x00000001 | uCode revision type
iwlwifi 0000:04:00.0: 0x0000001F | uCode version major
iwlwifi 0000:04:00.0: 0x00088D64 | uCode version minor
iwlwifi 0000:04:00.0: 0x00000230 | hw version
iwlwifi 0000:04:00.0: 0x00489000 | board version
iwlwifi 0000:04:00.0: 0x00000000 | hcmd
iwlwifi 0000:04:00.0: 0x00122080 | isr0
iwlwifi 0000:04:00.0: 0x00000000 | isr1
iwlwifi 0000:04:00.0: 0x28201802 | isr2
iwlwifi 0000:04:00.0: 0x404001C0 | isr3
iwlwifi 0000:04:00.0: 0x00000000 | isr4
iwlwifi 0000:04:00.0: 0x802D0051 | last cmd Id
iwlwifi 0000:04:00.0: 0x00000000 | wait_event
iwlwifi 0000:04:00.0: 0x0000DF8E | l2p_control
iwlwifi 0000:04:00.0: 0x00000820 | l2p_duration
iwlwifi 0000:04:00.0: 0x00000000 | l2p_mhvalid
iwlwifi 0000:04:00.0: 0x00000000 | l2p_addr_match
iwlwifi 0000:04:00.0: 0x0000000D | lmpm_pmg_sel
iwlwifi 0000:04:00.0: 0x13091828 | timestamp
iwlwifi 0000:04:00.0: 0x00002838 | flow_handler
iwlwifi 0000:04:00.0: Start IWL Error Log Dump:
iwlwifi 0000:04:00.0: Status: 0x00000100, count: 7
iwlwifi 0000:04:00.0: 0x00000034 | NMI_INTERRUPT_WDG
iwlwifi 0000:04:00.0: 0x00000000 | umac branchlink1
iwlwifi 0000:04:00.0: 0xC0086950 | umac branchlink2
iwlwifi 0000:04:00.0: 0xC00842BC | umac interruptlink1
iwlwifi 0000:04:00.0: 0xC00840CC | umac interruptlink2
iwlwifi 0000:04:00.0: 0x00000400 | umac data1
iwlwifi 0000:04:00.0: 0xC00840CC | umac data2
iwlwifi 0000:04:00.0: 0xDEADBEEF | umac data3
iwlwifi 0000:04:00.0: 0x0000001F | umac major
iwlwifi 0000:04:00.0: 0x00088D64 | umac minor
iwlwifi 0000:04:00.0: 0xC08861DC | frame pointer
iwlwifi 0000:04:00.0: 0xC08861DC | stack pointer
iwlwifi 0000:04:00.0: 0x00000000 | last host cmd
iwlwifi 0000:04:00.0: 0x00004008 | isr status reg
ieee80211 phy0: Hardware restart was requested
iwlwifi 0000:04:00.0: FW Error notification: type 0x00000000 cmd_id 0x00
iwlwifi 0000:04:00.0: FW Error notification: seq 0x0000 service 0x00000000
iwlwifi 0000:04:00.0: FW Error notification: timestamp 0x 4CE4B
iwlwifi 0000:04:00.0: Microcode SW error detected. Restarting 0x2000000.

The controller in question is:

04:00.0 Network controller [0280]: Intel Corporation Wireless 8265 / 8275 [8086:24fd] (rev 88)

Bisection pointed to the following commit and after I reverted it,
things seem to work fine again:

66fa2424df16 ("iwlwifi: fw api: support the new scan request FW API version")

Any idea what might be wrong with that commit and how to fix it
properly?

Thanks!


2018-04-23 13:16:13

by Mika Westerberg

[permalink] [raw]
Subject: Re: [BUG] iwlwifi: Microcode SW error detected. Restarting 0x2000000.

On Mon, Apr 23, 2018 at 03:39:45PM +0300, Luciano Coelho wrote:
> We had a bug in the scan command size for older firmwares. I have
> already made a fix for it, but I hadn't sent it out for upstream yet.
> I'll send it out now and soon send you a link to it in patchwork.
>
> You have two options: recompile the kernel with my patch or; use the
> latest version of the firmware from linux-firmware.git[1].
>
> I recommend upgrading the firmware, because we have a lot of other
> fixes and improvements there, but if you want to keep your distro's
> original firmware package, you can apply my patch instead.
>
> HTH and thanks for reporting!

I upgraded the firmware to iwlwifi-8265-36.ucode and the issue is gone
now. Thanks Luca!

2018-04-23 12:39:53

by Luciano Coelho

[permalink] [raw]
Subject: Re: [BUG] iwlwifi: Microcode SW error detected. Restarting 0x2000000.

On Mon, 2018-04-23 at 15:05 +0300, Mika Westerberg wrote:
> Hi,

Hi Mika,


> On my Lenovo X1 Carbon gen 5 system,after I upgraded to v4.17-rc1
> iwlwifi started to fail with following splats on dmesg:
>
> iwlwifi 0000:04:00.0: Microcode SW error detected. Restarting
> 0x2000000.
> iwlwifi 0000:04:00.0: Start IWL Error Log Dump:
> iwlwifi 0000:04:00.0: Status: 0x00000100, count: 6
> iwlwifi 0000:04:00.0: Loaded firmware version: 31.560484.0
> iwlwifi 0000:04:00.0: 0x00000038 | BAD_COMMAND

[...]

> The controller in question is:
>
> 04:00.0 Network controller [0280]: Intel Corporation Wireless 8265
> / 8275 [8086:24fd] (rev 88)
>
> Bisection pointed to the following commit and after I reverted it,
> things seem to work fine again:
>
> 66fa2424df16 ("iwlwifi: fw api: support the new scan request FW API
> version")
>
> Any idea what might be wrong with that commit and how to fix it
> properly?

We had a bug in the scan command size for older firmwares. I have
already made a fix for it, but I hadn't sent it out for upstream yet.
I'll send it out now and soon send you a link to it in patchwork.

You have two options: recompile the kernel with my patch or; use the
latest version of the firmware from linux-firmware.git[1].

I recommend upgrading the firmware, because we have a lot of other
fixes and improvements there, but if you want to keep your distro's
original firmware package, you can apply my patch instead.

HTH and thanks for reporting!


[1] https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/iwlwifi-8265-36.ucode


--
Cheers,
Luca.

2018-04-23 13:28:25

by Luca Coelho

[permalink] [raw]
Subject: Re: [BUG] iwlwifi: Microcode SW error detected. Restarting 0x2000000.

On Mon, 2018-04-23 at 15:39 +0300, Luciano Coelho wrote:
> On Mon, 2018-04-23 at 15:05 +0300, Mika Westerberg wrote:
> > Hi,
>
> Hi Mika,
>
>
> > On my Lenovo X1 Carbon gen 5 system,after I upgraded to v4.17-rc1
> > iwlwifi started to fail with following splats on dmesg:
> >
> > iwlwifi 0000:04:00.0: Microcode SW error detected. Restarting
> > 0x2000000.
> > iwlwifi 0000:04:00.0: Start IWL Error Log Dump:
> > iwlwifi 0000:04:00.0: Status: 0x00000100, count: 6
> > iwlwifi 0000:04:00.0: Loaded firmware version: 31.560484.0
> > iwlwifi 0000:04:00.0: 0x00000038 | BAD_COMMAND
>
> [...]
>
> > The controller in question is:
> >
> > 04:00.0 Network controller [0280]: Intel Corporation Wireless
> > 8265
> > / 8275 [8086:24fd] (rev 88)
> >
> > Bisection pointed to the following commit and after I reverted it,
> > things seem to work fine again:
> >
> > 66fa2424df16 ("iwlwifi: fw api: support the new scan request FW
> > API
> > version")
> >
> > Any idea what might be wrong with that commit and how to fix it
> > properly?
>
> We had a bug in the scan command size for older firmwares. I have
> already made a fix for it, but I hadn't sent it out for upstream
> yet.
> I'll send it out now and soon send you a link to it in patchwork.

Here's the patch that solves the problem with older FWs:

https://patchwork.kernel.org/patch/10356987/

--
Cheers,
Luca.