Re: [PATCH] thunderbolt: icm: Remove Apple check for Alpine Ridge

From: Kai-Heng Feng
Date: Mon Aug 07 2017 - 04:00:14 EST


On Mon, Aug 7, 2017 at 3:51 PM, Mika Westerberg
<mika.westerberg@xxxxxxxxxxxxxxx> wrote:
> At this point we should find out that the ICM is already running and the
> function never calls pci2cio_write().

I guess you mean this code section:

/* Check if the ICM firmware is already running */
val = ioread32(nhi->iobase + REG_FW_STS);
if (val & REG_FW_STS_ICM_EN)
return 0;

>
> The reason why it is not happening needs to be resolved.
>
>> pcie2cio_write()
>> pci_write_config_dword(pdev, vnd_cap + PCIE2CIO_WRDATA, data);
>>
>> > Is there an actual issue you are trying to solve here?
>>
>> Yes, please take a look at [1].
>>
>> Although both the patch I sent and the diff above still failed to
>> probe the device
>> But there are no more NULL pointer dereference.
>>
>> [1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1708043/comments/11
>
> I would like to understand what the actual problem is here because in
> normal cases we should not end up starting ICM firmware in the first
> place.
>
> So no, let's not fix it like this until we know the root cause.
>
> I'll be participating the discussion on the above bug in hopes we could
> figure out the root cause.

Thanks for the information and explanation.