RE: [PATCH] usb: host: xhci-plat: Iterate over parent nodes for finding quirks

From: Anurag Kumar Vulisha
Date: Tue Jun 12 2018 - 03:04:11 EST


Hi Greg,

Please let me know if you have any comments on this patch.

Thanks,
Anurag Kumar Vulisha

>-----Original Message-----
>From: Anurag Kumar Vulisha
>Sent: Wednesday, June 06, 2018 12:11 AM
>To: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
>Cc: Mathias Nyman <mathias.nyman@xxxxxxxxx>; linux-usb@xxxxxxxxxxxxxxx; linux-
>kernel@xxxxxxxxxxxxxxx
>Subject: RE: [PATCH] usb: host: xhci-plat: Iterate over parent nodes for finding quirks
>
>Hi Greg,
>
>>-----Original Message-----
>>From: Greg Kroah-Hartman [mailto:gregkh@xxxxxxxxxxxxxxxxxxx]
>>Sent: Tuesday, June 05, 2018 8:55 PM
>>To: Anurag Kumar Vulisha <anuragku@xxxxxxxxxx>
>>Cc: Mathias Nyman <mathias.nyman@xxxxxxxxx>; linux-usb@xxxxxxxxxxxxxxx;
>>linux- kernel@xxxxxxxxxxxxxxx
>>Subject: Re: [PATCH] usb: host: xhci-plat: Iterate over parent nodes
>>for finding quirks
>>
>>On Tue, Jun 05, 2018 at 08:50:56PM +0530, Anurag Kumar Vulisha wrote:
>>> In xhci_plat_probe() both sysdev and pdev->dev are being used for
>>> finding quirks. There are some drivers(like dwc3 host.c) which adds
>>> quirks(like usb3-lpm-capable) into pdev and the logic present in
>>> xhci_plat_probe() checks for quirks in either sysdev or pdev for
>>> finding the quirks. Because of this logic, some of the quirks are
>>> getting missed(usb3-lpm-capable quirk added by dwc3 host.c driver is
>>> getting missed).This patch fixes this by iterating over all the
>>> available parents for finding the quirks. In this way all the quirks
>>> which are present in child or parent are correctly updated.
>>>
>>> Signed-off-by: Anurag Kumar Vulisha <anurag.kumar.vulisha@xxxxxxxxxx>
>>
>>So this is a bugfix? If so, how far back in the kernel releases should it go to?
>>
>I feel this is as a bugfix. This problem started with this patch
>"usb: xhci: use bus->sysdev for DMA configuration (4c39d4b949d36faf)"
>where pdev->dev is replaced with sysdev. If I am not wrong this bug is present since
>4.12 kernel release.
>
>Thanks,
>Anurag kumar Vulisha
>
>>thanks,
>>
>>greg k-h