diff mbox series

fsl-mph-dr-of: module autoload regression for ehci-fsl

Message ID 2791418.Y6S9NjorxK@steina-w
State New
Headers show
Series fsl-mph-dr-of: module autoload regression for ehci-fsl | expand

Commit Message

Alexander Stein Jan. 20, 2023, 11:29 a.m. UTC
Hi,

I just noticed that the following commit introduced a regression 
> bb160ee61c04f ("drivers/usb/host/ehci-fsl: Fix interrupt setup in host 
mode.")
in a way that the modalias of the created fsl-ehci platform device has 
changed. As of 6.2.0-rc4-next-20230117 I have the following modaliases:
$ cat /sys/bus/platform/devices/8600000.usb/modalias 
of:NusbT(null)Cfsl-usb2-dr-v2.5Cfsl-usb2-dr
$ cat /sys/bus/platform/devices/fsl-ehci.0/modalias 
of:NusbT(null)Cfsl-usb2-dr-v2.5Cfsl-usb2-dr

8600000.usb is usb2 node from arch/arm/boot/dts/ls1021a.dtsi, it's modalias is 
okay and to be expected. But the modalias from the seconds one is wrong, it 
should be 'fsl-ehci' for host mode (see dr_mode_data in fsl-mph-dr-of.c).

I guess the actual reason is the now set of_node on the new platform device.

If I revert the following two patches (bb160ee61c04f alone would result in IRQ 
parsing error)
a1a2b7125e107 ("of/platform: Drop static setup of IRQ resource from DT core")
bb160ee61c04f ("drivers/usb/host/ehci-fsl: Fix interrupt setup in host mode.")

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

This is what I would expect. Module autoloading still does not work, but this 
is due to a wrong MODULE_ALIAS in ehci-fsl.c. The following change fixes this
---8<---
I'll send a patch for this.

Best regards,
Alexander
diff mbox series

Patch

diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index 3d21946e8822a..92ec655fd09b6 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -29,7 +29,7 @@ 
 #include "ehci-fsl.h"
 
 #define DRIVER_DESC "Freescale EHCI Host controller driver"
-#define DRV_NAME "ehci-fsl"
+#define DRV_NAME "fsl-ehci"
 
 static struct hc_driver __read_mostly fsl_ehci_hc_driver;
---8<---