mbox series

[0/3] Fix ehci-fsl autoload regression on fsl-mph-dr-of

Message ID 20230207110531.1060252-1-alexander.stein@ew.tq-group.com (mailing list archive)
Headers show
Series Fix ehci-fsl autoload regression on fsl-mph-dr-of | expand

Message

Alexander Stein Feb. 7, 2023, 11:05 a.m. UTC
Hi,

I noticed on my ls1021a based platform (TQMLS102xA) that the platform device
created by fsl-mph-dr-of does not autoload fsl-ehci. Digging into it I noticed
that starting from commit bb160ee61c04f ("drivers/usb/host/ehci-fsl: Fix
interrupt setup in host mode.") this platform device has the wrong modalias:

$ cat /sys/bus/platform/devices/8600000.usb/fsl-ehci.0/modalias 
of:NusbT(null)Cfsl-usb2-dr-v2.5Cfsl-usb2-dr

This is the modalias of the parent device, thus module ehci_fsl is not loaded
automatically. Given the reason of removing the IRQ resource from DT in
commit a1a2b7125e107 ("of/platform: Drop static setup of IRQ resource from DT
core") the of_node has to be assigned to the subnode, but for modalias the
reused of_node has to be ignored.

Patch 2 is not strictly required to fix autoloading, but this is still a bug fix.

Best regards,
Alexander

Alexander Stein (3):
  of: device: Ignore modalias of reused nodes
  of: device: Do not ignore error code in of_device_uevent_modalias
  usb: host: fsl-mph-dr-of: reuse device_set_of_node_from_dev

 drivers/of/device.c              | 6 ++++--
 drivers/usb/host/fsl-mph-dr-of.c | 3 +--
 2 files changed, 5 insertions(+), 4 deletions(-)

Comments

Rob Herring (Arm) Feb. 8, 2023, 11:44 p.m. UTC | #1
On Tue, Feb 07, 2023 at 12:05:28PM +0100, Alexander Stein wrote:
> Hi,
> 
> I noticed on my ls1021a based platform (TQMLS102xA) that the platform device
> created by fsl-mph-dr-of does not autoload fsl-ehci. Digging into it I noticed
> that starting from commit bb160ee61c04f ("drivers/usb/host/ehci-fsl: Fix
> interrupt setup in host mode.") this platform device has the wrong modalias:
> 
> $ cat /sys/bus/platform/devices/8600000.usb/fsl-ehci.0/modalias 
> of:NusbT(null)Cfsl-usb2-dr-v2.5Cfsl-usb2-dr
> 
> This is the modalias of the parent device, thus module ehci_fsl is not loaded
> automatically. Given the reason of removing the IRQ resource from DT in
> commit a1a2b7125e107 ("of/platform: Drop static setup of IRQ resource from DT
> core") the of_node has to be assigned to the subnode, but for modalias the
> reused of_node has to be ignored.
> 
> Patch 2 is not strictly required to fix autoloading, but this is still a bug fix.
> 
> Best regards,
> Alexander
> 
> Alexander Stein (3):
>   of: device: Ignore modalias of reused nodes
>   of: device: Do not ignore error code in of_device_uevent_modalias
>   usb: host: fsl-mph-dr-of: reuse device_set_of_node_from_dev

Assuming Greg will take these. For the series:

Reviewed-by: Rob Herring <robh@kernel.org>