[Thunderbolt-Software] Thunderbolt causes NULL pointer deref after cold boot. ThinkPad Yoga 370

Jordan Glover Golden_Miller83 at protonmail.ch
Thu Mar 8 05:20:25 PST 2018


On March 8, 2018 7:31 AM, Mika Westerberg <mika.westerberg at linux.intel.com> wrote:

> On Wed, Mar 07, 2018 at 12:16:06PM -0500, Jordan Glover wrote:
> 
> > Thanks for the reply. I'm aware of this Wake-on-Lan bug but the workaround
> > 
> > doesn't help in my case. I reported it to Lenovo and they confirm that this
> > 
> > model doesn't have fix for that bug yet but nobody knows if it's the same issue
> > 
> > as tweaking BIOS has no effect. Unfortunately there is no ETA for update from
> > 
> > them.
> 
> It definitely sounds like an issue in BIOS/FW because the firmware
> 
> should be up and running when the host controller appears and for some
> 
> reason it is not.
> 

Lenovo informed me that BIOS update may come at end of month so we will see.

> > I'll happily test any patch.
> 
> Can you try the below patch? It should fix the crash but not the
> 
> underlying issue, though.
> 
> diff --git a/drivers/thunderbolt/icm.c b/drivers/thunderbolt/icm.c
> 
> index ab02d13f40b7..75af7852b7ef 100644
> 
> \-\-\- a/drivers/thunderbolt/icm.c
> 
> \+\+\+ b/drivers/thunderbolt/icm.c
> 
> @@ -915,6 +915,9 @@ static int icm\_firmware\_reset(struct tb \*tb, struct tb_nhi \*nhi)
> 
> struct icm *icm = tb_priv(tb);
> 
> u32 val;
> 
> -   if (!icm->upstream_port)
>     
> -         return -ENODEV;
>         
>     
> -   /\* Put ARC to wait for CIO reset event to happen */
>     
>     val = ioread32(nhi->iobase + REG\_FW\_STS);
>     
>     val |= REG\_FW\_STS\_CIO\_RESET_REQ;
>

I tested it with linux 4.16-rc4. It fails gracefully:

kernel: thunderbolt 0000:08:00.0: NHI initialized, starting thunderbolt
kernel: thunderbolt 0000:08:00.0: allocating TX ring 0 of size 10
kernel: thunderbolt 0000:08:00.0: allocating RX ring 0 of size 10
kernel: thunderbolt 0000:08:00.0: control channel created
kernel: thunderbolt 0000:08:00.0: control channel starting...
kernel: thunderbolt 0000:08:00.0: starting TX ring 0
kernel: thunderbolt 0000:08:00.0: enabling interrupt at register 0x38200 bit 0 (0x0 -> 0x1)
kernel: thunderbolt 0000:08:00.0: starting RX ring 0
kernel: thunderbolt 0000:08:00.0: enabling interrupt at register 0x38200 bit 12 (0x1 -> 0x1001)
kernel: thunderbolt 0000:08:00.0: starting ICM firmware
kernel: thunderbolt 0000:08:00.0: could not start ICM firmware
kernel: thunderbolt 0000:08:00.0: stopping RX ring 0
kernel: thunderbolt 0000:08:00.0: disabling interrupt at register 0x38200 bit 12 (0x1001 -> 0x1)
kernel: thunderbolt 0000:08:00.0: stopping TX ring 0
kernel: thunderbolt 0000:08:00.0: disabling interrupt at register 0x38200 bit 0 (0x1 -> 0x0)
kernel: thunderbolt 0000:08:00.0: control channel stopped
kernel: thunderbolt 0000:08:00.0: freeing RX ring 0
kernel: thunderbolt 0000:08:00.0: freeing TX ring 0
kernel: thunderbolt 0000:08:00.0: shutdown
kernel: thunderbolt: probe of 0000:08:00.0 failed with error -5

​Jordan


More information about the Thunderbolt-Software mailing list