drivers/usb/host/ehci-fsl: Fix interrupt setup in host mode.

Darren Stevens darren at stevens-zone.net
Mon Jun 27 05:49:11 AEST 2022


Hello Sergei

On 26/06/2022, Sergei Shtylyov wrote:
> Hello!
>
> On 6/25/22 11:41 PM, Darren Stevens wrote:
>
>> In patch a1a2b7125e10 (Drop static setup of IRQ resource from DT
>> core) we stopped platform_get_resource() from returning the IRQ, as all
>
> In commit a1a2b7125e10 ("Drop static setup of IRQ resource from DT core")
>
>> drivers were supposed to have switched to platform_get_irq()
>> Unfortunately the Freescale EHCI driver in host mode got missed. Fix
>> it. Also fix allocation of resources to work with current kernel.
>
>    The basic rule (especially for the fixes) is "do one thing per patch".

I thought I'd done that, this is the minimum amount of changes that fix what changed in the specified commit. 

> [...]
>> @@ -92,15 +89,18 @@ static int fsl_ehci_drv_probe(struct platform_device *pdev)
>>          goto err1;
>>      }
>>  
>> -    res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> -    hcd->regs = devm_ioremap_resource(&pdev->dev, res);
>> +    tmp = of_address_to_resource(dn, 0, &res);
>
>    Hm, why? What does this fix?

With baseline the mouse and keyboard on our machines don't work - dmesg reports no interrupt. Fixing the interrupt detection throws a 'invalid resoure' error instead (No idea why), which these lines fix. Both problems disappear if we revert the 'fixes' patch.

Hmmm, perhaps title shoud be 'fix resource detection in host mode'?

Regards
Darren



More information about the Linuxppc-dev mailing list