usb: ulpi: ulpi_init should be executed in subsys_initcall
PATCH v3 1/1 usb: ulpi: ulpi_init should be executed in subsys_initcall
Phy drivers and the ulpi interface providers depend on the registeration of the ulpi bus. Ulpi registers the bus in module_init(). This could result in a load order issue, i.e. ulpi phy drivers or the ulpi interface providers loading before the bus registeration.
This patch fixes this load order issue by putting ulpi_init in subsys_initcall().
--- drivers/usb/common/ulpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/common/ulpi.c +1 -1
@@ -242,7 +242,7 @@ static int __init ulpi_init(void) {return bus_register (&ulpi_bus); } -module_init (ulpi_init); +subsys_initcall (ulpi_init); static void __exit ulpi_exit(void) {
Signature · 1 line
2.1.4
Hi,
Quoted 3 lines · Lu Baolu
Phy drivers and the ulpi interface providers depend on the registeration of the ulpi bus. Ulpi registers the bus in
module_init(). This could result in a load order issue, i.e.
It's still not an issue :(
I'd say "unnecessary probe delays".
But of cource it's Felipe's call :) Description looks better now.
BR, David
Quoted 28 lines
ulpi phy drivers or the ulpi interface providers loading before the bus registeration.
This patch fixes this load order issue by putting
ulpi_initinsubsys_initcall().Reported-by Zhuo Qiuxu <[email protected]>Signed-off-by Lu Baolu <[email protected]>--- drivers/usb/common/ulpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/common/ulpi.c +1
-1@@ -242,7 +242,7 @@ static int __init ulpi_init(void) {return bus_register (&ulpi_bus); } -module_init (ulpi_init); +subsys_initcall (ulpi_init); static void __exit ulpi_exit(void) {Signature · 1 line
2.1.4
Quoted 8 lines · David Cohen
Hi,
Quoted 3 lines · Lu Baolu
Phy drivers and the ulpi interface providers depend on the registeration of the ulpi bus. Ulpi registers the bus in
module_init(). This could result in a load order issue, i.e.It's still not an issue :(
I'd say "unnecessary probe delays".
I managed to boot a kernel built from the top of Felipe's remotes/origin/next branch under an Ubuntu environment on Intel's Bay Trail tablet.
The same panic (as I found in the Android environment previously) shows up as well. And if I replace module_init() with sys_initcall(), the panic disappears.
Thanks,
-Baolu
Quoted 34 lines
But of cource it's Felipe's call :) Description looks better now.
BR, David
Quoted 28 lines
ulpi phy drivers or the ulpi interface providers loading before the bus registeration.
This patch fixes this load order issue by putting
ulpi_initinsubsys_initcall().Reported-by Zhuo Qiuxu <[email protected]>Signed-off-by Lu Baolu <[email protected]>--- drivers/usb/common/ulpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/common/ulpi.c +1
-1@@ -242,7 +242,7 @@ static int __init ulpi_init(void) {return bus_register (&ulpi_bus); } -module_init (ulpi_init); +subsys_initcall (ulpi_init); static void __exit ulpi_exit(void) {Signature · 1 line
2.1.4
Hi,
Quoted 12 lines · Baolu
Quoted 8 lines · David Cohen
Hi,
Quoted 3 lines · Lu Baolu
Phy drivers and the ulpi interface providers depend on the registeration of the ulpi bus. Ulpi registers the bus in
module_init(). This could result in a load order issue, i.e.It's still not an issue :(
I'd say "unnecessary probe delays".
Quoted 7 lines
I managed to boot a kernel built from the top of Felipe's remotes/origin/next branch under an Ubuntu environment on Intel's Bay Trail tablet.
The same panic (as I found in the Android environment previously) shows up as well. And if I replace
module_init()withsys_initcall(), the panic disappears.
the problem is something else... Moving things around in the init levels is just a workaround for another issue. Seems like there's some missing EPROBE_DEFER somewhere.
Signature · 1 line
balbi
Quoted 17 lines · Felipe Balbi
Hi,
Quoted 14 lines · Baolu
Quoted 8 lines · David Cohen
Hi,
Quoted 3 lines · Lu Baolu
Phy drivers and the ulpi interface providers depend on the registeration of the ulpi bus. Ulpi registers the bus in
module_init(). This could result in a load order issue, i.e.It's still not an issue :(
I'd say "unnecessary probe delays".I managed to boot a kernel built from the top of Felipe's remotes/origin/next branch under an Ubuntu environment on Intel's Bay Trail tablet.
Quoted 6 lines
Quoted 3 lines
The same panic (as I found in the Android environment previously) shows up as well. And if I replace
module_init()withsys_initcall(), the panic disappears.the problem is something else... Moving things around in the init levels is just a workaround for another issue. Seems like there's some missing
EPROBE_DEFERsomewhere.
Yes, I agree.
Heikki, I assume "missing EPROBE_DEFER issue" will be fixed by Sasha's patch. I will resend the patch with a new commit message.
Thanks,
Baolu
Quoted 1 line
Quoted 7 lines · David Cohen
Hi,
Quoted 3 lines · Lu Baolu
Phy drivers and the ulpi interface providers depend on the registeration of the ulpi bus. Ulpi registers the bus in
module_init(). This could result in a load order issue, i.e.
Quoted 15 lines
It's still not an issue :(
I'd say "unnecessary probe delays".But of cource it's Felipe's call :) Description looks better now.
BR, David
Quoted 8 lines
ulpi phy drivers or the ulpi interface providers loading before the bus registeration.
This patch fixes this load order issue by putting
ulpi_initinsubsys_initcall().Reported-by Zhuo Qiuxu <[email protected]>Signed-off-by Lu Baolu <[email protected]>
Adding Felipe. FWIW, my ACK in any case:
Thanks,
Signature · 1 line
heikki