Discussion:
ehci-hcd: respect the "nousb" parameter
Chuck Ebbert
2008-01-23 23:19:10 UTC
Permalink
Make the EHCI host driver respect the "nousb" kernel option.

Signed-off-by: Chuck Ebbert <***@redhat.com>

---
drivers/usb/host/ehci-hcd.c | 3 +++
1 file changed, 3 insertions(+)

--- linux-2.6.23.noarch.orig/drivers/usb/host/ehci-hcd.c
+++ linux-2.6.23.noarch/drivers/usb/host/ehci-hcd.c
@@ -973,6 +973,9 @@ static int __init ehci_hcd_init(void)
{
int retval = 0;

+ if (usb_disabled())
+ return -ENODEV;
+
pr_debug("%s: block sizes: qh %Zd qtd %Zd itd %Zd sitd %Zd\n",
hcd_name,
sizeof(struct ehci_qh), sizeof(struct ehci_qtd),

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
linux-usb-***@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
David Brownell
2008-01-23 23:38:13 UTC
Permalink
Post by Chuck Ebbert
Make the EHCI host driver respect the "nousb" kernel option.
You know, given my druthers we'd have the HCD registration
check this, rather than updating every HCD's setup logic...

Care to try a maximally generic fix instead? :)

- Dave
Post by Chuck Ebbert
---
drivers/usb/host/ehci-hcd.c | 3 +++
1 file changed, 3 insertions(+)
--- linux-2.6.23.noarch.orig/drivers/usb/host/ehci-hcd.c
+++ linux-2.6.23.noarch/drivers/usb/host/ehci-hcd.c
@@ -973,6 +973,9 @@ static int __init ehci_hcd_init(void)
{
int retval = 0;
+ if (usb_disabled())
+ return -ENODEV;
+
pr_debug("%s: block sizes: qh %Zd qtd %Zd itd %Zd sitd %Zd\n",
hcd_name,
sizeof(struct ehci_qh), sizeof(struct ehci_qtd),
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
linux-usb-***@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Chuck Ebbert
2008-01-24 19:14:09 UTC
Permalink
Post by David Brownell
Post by Chuck Ebbert
Make the EHCI host driver respect the "nousb" kernel option.
You know, given my druthers we'd have the HCD registration
check this, rather than updating every HCD's setup logic...
Care to try a maximally generic fix instead? :)
Sorry, I don't have the time to figure out how that works.
This one seemed to be the only one missing the test of
usb_disabled() anyway (I copied the code from one of
the other ones.)

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
linux-usb-***@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Loading...