* [PATCH v3 1/1] usb: ulpi: ulpi_init should be executed in subsys_initcall
@ 2015-05-22 11:29 Lu Baolu
2015-05-22 16:08 ` David Cohen
0 siblings, 1 reply; 6+ messages in thread
From: Lu Baolu @ 2015-05-22 11:29 UTC (permalink / raw)
To: Heikki Krogerus, Greg Kroah-Hartman, David Cohen
Cc: linux-usb, linux-kernel, 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.
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().
Reported-by: Zhuo Qiuxu <qiuxu.zhuo@intel.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
---
drivers/usb/common/ulpi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/common/ulpi.c b/drivers/usb/common/ulpi.c
index 0e6f968..01c0c04 100644
--- a/drivers/usb/common/ulpi.c
+++ b/drivers/usb/common/ulpi.c
@@ -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)
{
--
2.1.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v3 1/1] usb: ulpi: ulpi_init should be executed in subsys_initcall
2015-05-22 11:29 [PATCH v3 1/1] usb: ulpi: ulpi_init should be executed in subsys_initcall Lu Baolu
@ 2015-05-22 16:08 ` David Cohen
2015-05-25 6:24 ` Lu, Baolu
2015-05-25 12:09 ` Heikki Krogerus
0 siblings, 2 replies; 6+ messages in thread
From: David Cohen @ 2015-05-22 16:08 UTC (permalink / raw)
To: Lu Baolu; +Cc: Heikki Krogerus, Greg Kroah-Hartman, linux-usb, linux-kernel
Hi,
On Fri, May 22, 2015 at 07:29:15PM +0800, Lu Baolu wrote:
> 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
> 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().
>
> Reported-by: Zhuo Qiuxu <qiuxu.zhuo@intel.com>
> Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
> ---
> drivers/usb/common/ulpi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/common/ulpi.c b/drivers/usb/common/ulpi.c
> index 0e6f968..01c0c04 100644
> --- a/drivers/usb/common/ulpi.c
> +++ b/drivers/usb/common/ulpi.c
> @@ -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)
> {
> --
> 2.1.4
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 1/1] usb: ulpi: ulpi_init should be executed in subsys_initcall
2015-05-22 16:08 ` David Cohen
@ 2015-05-25 6:24 ` Lu, Baolu
2015-05-26 14:50 ` Felipe Balbi
2015-05-25 12:09 ` Heikki Krogerus
1 sibling, 1 reply; 6+ messages in thread
From: Lu, Baolu @ 2015-05-25 6:24 UTC (permalink / raw)
To: David Cohen; +Cc: Heikki Krogerus, Greg Kroah-Hartman, linux-usb, linux-kernel
On 05/23/2015 12:08 AM, David Cohen wrote:
> Hi,
>
> On Fri, May 22, 2015 at 07:29:15PM +0800, Lu Baolu wrote:
>> 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
>
> But of cource it's Felipe's call :) Description looks better now.
>
> BR, David
>
>> 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().
>>
>> Reported-by: Zhuo Qiuxu <qiuxu.zhuo@intel.com>
>> Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
>> ---
>> drivers/usb/common/ulpi.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/usb/common/ulpi.c b/drivers/usb/common/ulpi.c
>> index 0e6f968..01c0c04 100644
>> --- a/drivers/usb/common/ulpi.c
>> +++ b/drivers/usb/common/ulpi.c
>> @@ -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)
>> {
>> --
>> 2.1.4
>>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 1/1] usb: ulpi: ulpi_init should be executed in subsys_initcall
2015-05-22 16:08 ` David Cohen
2015-05-25 6:24 ` Lu, Baolu
@ 2015-05-25 12:09 ` Heikki Krogerus
1 sibling, 0 replies; 6+ messages in thread
From: Heikki Krogerus @ 2015-05-25 12:09 UTC (permalink / raw)
To: David Cohen, Felipe Balbi
Cc: Lu Baolu, Greg Kroah-Hartman, linux-usb, linux-kernel
On Fri, May 22, 2015 at 09:08:45AM -0700, David Cohen wrote:
> Hi,
>
> On Fri, May 22, 2015 at 07:29:15PM +0800, Lu Baolu wrote:
> > 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
>
> > 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().
> >
> > Reported-by: Zhuo Qiuxu <qiuxu.zhuo@intel.com>
> > Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Adding Felipe. FWIW, my ACK in any case:
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Thanks,
--
heikki
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 1/1] usb: ulpi: ulpi_init should be executed in subsys_initcall
2015-05-25 6:24 ` Lu, Baolu
@ 2015-05-26 14:50 ` Felipe Balbi
2015-05-27 1:33 ` Lu, Baolu
0 siblings, 1 reply; 6+ messages in thread
From: Felipe Balbi @ 2015-05-26 14:50 UTC (permalink / raw)
To: Lu, Baolu
Cc: David Cohen, Heikki Krogerus, Greg Kroah-Hartman, linux-usb,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 974 bytes --]
Hi,
On Mon, May 25, 2015 at 02:24:00PM +0800, Lu, Baolu wrote:
>
>
> On 05/23/2015 12:08 AM, David Cohen wrote:
> >Hi,
> >
> >On Fri, May 22, 2015 at 07:29:15PM +0800, Lu Baolu wrote:
> >>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.
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.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 1/1] usb: ulpi: ulpi_init should be executed in subsys_initcall
2015-05-26 14:50 ` Felipe Balbi
@ 2015-05-27 1:33 ` Lu, Baolu
0 siblings, 0 replies; 6+ messages in thread
From: Lu, Baolu @ 2015-05-27 1:33 UTC (permalink / raw)
To: balbi
Cc: David Cohen, Heikki Krogerus, Greg Kroah-Hartman, linux-usb,
linux-kernel
On 05/26/2015 10:50 PM, Felipe Balbi wrote:
> Hi,
>
> On Mon, May 25, 2015 at 02:24:00PM +0800, Lu, Baolu wrote:
>>
>> On 05/23/2015 12:08 AM, David Cohen wrote:
>>> Hi,
>>>
>>> On Fri, May 22, 2015 at 07:29:15PM +0800, Lu Baolu wrote:
>>>> 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.
> 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.
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
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-05-27 1:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-22 11:29 [PATCH v3 1/1] usb: ulpi: ulpi_init should be executed in subsys_initcall Lu Baolu
2015-05-22 16:08 ` David Cohen
2015-05-25 6:24 ` Lu, Baolu
2015-05-26 14:50 ` Felipe Balbi
2015-05-27 1:33 ` Lu, Baolu
2015-05-25 12:09 ` Heikki Krogerus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox