* [PATCH] usb: fix breakage on systems without ACPI
@ 2012-05-16 12:11 Sasha Levin
2012-05-16 12:21 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Sasha Levin @ 2012-05-16 12:11 UTC (permalink / raw)
To: mjg, tianyu.lan, gregkh; +Cc: linux-usb, linux-kernel, Sasha Levin
Commit da0af6e ("usb: Bind devices to ACPI devices when possible") really
tries to force-bind devices even when impossible, unlike what it says in
the subject.
CONFIG_ACPI is not an indication that ACPI tables are actually present, nor
is an indication that any USB relevant information is present in them. There
is no reason to fail the creation of a USB bus if it can't bind it to
ACPI device during initialization.
On systems with CONFIG_ACPI set but without ACPI tables it would cause a
boot panic.
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
---
drivers/usb/core/usb.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index 7998a67..25d0c61 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -1015,9 +1015,7 @@ static int __init usb_init(void)
if (retval)
goto out;
- retval = usb_acpi_register();
- if (retval)
- goto acpi_register_failed;
+ usb_acpi_register();
retval = bus_register(&usb_bus_type);
if (retval)
goto bus_register_failed;
@@ -1053,7 +1051,6 @@ bus_notifier_failed:
bus_unregister(&usb_bus_type);
bus_register_failed:
usb_acpi_unregister();
-acpi_register_failed:
usb_debugfs_cleanup();
out:
return retval;
--
1.7.8.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] usb: fix breakage on systems without ACPI
2012-05-16 12:11 [PATCH] usb: fix breakage on systems without ACPI Sasha Levin
@ 2012-05-16 12:21 ` Greg KH
2012-05-16 14:05 ` Lan Tianyu
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2012-05-16 12:21 UTC (permalink / raw)
To: Sasha Levin; +Cc: mjg, tianyu.lan, linux-usb, linux-kernel
On Wed, May 16, 2012 at 02:11:15PM +0200, Sasha Levin wrote:
> Commit da0af6e ("usb: Bind devices to ACPI devices when possible") really
> tries to force-bind devices even when impossible, unlike what it says in
> the subject.
>
> CONFIG_ACPI is not an indication that ACPI tables are actually present, nor
> is an indication that any USB relevant information is present in them. There
> is no reason to fail the creation of a USB bus if it can't bind it to
> ACPI device during initialization.
>
> On systems with CONFIG_ACPI set but without ACPI tables it would cause a
> boot panic.
Nice catch, sorry about that, I'll go queue this up.
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] usb: fix breakage on systems without ACPI
2012-05-16 12:21 ` Greg KH
@ 2012-05-16 14:05 ` Lan Tianyu
0 siblings, 0 replies; 3+ messages in thread
From: Lan Tianyu @ 2012-05-16 14:05 UTC (permalink / raw)
To: Greg KH, levinsasha928; +Cc: mjg, linux-usb, linux-kernel
On 2012年5月16日 20:21:53, Greg KH wrote:
> On Wed, May 16, 2012 at 02:11:15PM +0200, Sasha Levin wrote:
>> Commit da0af6e ("usb: Bind devices to ACPI devices when possible") really
>> tries to force-bind devices even when impossible, unlike what it says in
>> the subject.
>>
>> CONFIG_ACPI is not an indication that ACPI tables are actually present, nor
>> is an indication that any USB relevant information is present in them. There
>> is no reason to fail the creation of a USB bus if it can't bind it to
>> ACPI device during initialization.
>>
>> On systems with CONFIG_ACPI set but without ACPI tables it would cause a
>> boot panic.
>
> Nice catch, sorry about that, I'll go queue this up.
>
> greg k-h
Oh. Sorry for this. I just test it on some my machines that have usb
descriptor.
bring trouble for you.
--
Best Regards
Tianyu Lan
linux kernel enabling team
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-16 14:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-16 12:11 [PATCH] usb: fix breakage on systems without ACPI Sasha Levin
2012-05-16 12:21 ` Greg KH
2012-05-16 14:05 ` Lan Tianyu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).