Skip to contentSkip to conversation

More USB patches for 2.6.18

PATCH In review Greg KH 6 participants 12 messages Sep 28, 2006 – Sep 29, 2006

Subsystems (2)
lore
Share & tools
lore

Greg KH

author
#0 lore raw

PATCH 1/1 More USB patches for 2.6.18

Here are some more USB bugfixes and device ids 2.6.18. They should all fix the reported problems in your current tree (if not, please let me know.)

All of these changes have been in the -mm tree for a while.

Please pull from:

	master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6.git/

The full patches will be sent to the linux-usb-devel mailing list, if anyone wants to see them.

thanks,

greg k-h

 drivers/usb/core/driver.c          |   65 ++++-----
 drivers/usb/core/hcd.c             |    6 -
 drivers/usb/core/hub.c             |    4 -
 drivers/usb/core/usb.c             |   46 ++++++
 drivers/usb/core/usb.h             |   19 ++-
 drivers/usb/gadget/dummy_hcd.c     |   33 +++-
 drivers/usb/gadget/file_storage.c  |   35 ++++-
 drivers/usb/host/ohci-hcd.c        |   18 +-
 drivers/usb/host/ohci-hub.c        |  265 +++++++++++++++++++++---------------
 drivers/usb/host/ohci-pci.c        |    3 
 drivers/usb/host/ohci.h            |    1 
 drivers/usb/image/microtek.c       |   18 +-
 drivers/usb/image/microtek.h       |    4 -
 drivers/usb/input/hid-core.c       |    4 +
 drivers/usb/misc/phidgetkit.c      |   56 +++++---
 drivers/usb/net/asix.c             |    4 +
 drivers/usb/net/kaweth.c           |    1 
 drivers/usb/net/pegasus.c          |   18 +-
 drivers/usb/serial/cyberjack.c     |    6 -
 drivers/usb/serial/ftdi_sio.c      |    4 +
 drivers/usb/serial/ftdi_sio.h      |   10 +
 drivers/usb/serial/generic.c       |    6 -
 drivers/usb/serial/ipaq.c          |    1 
 drivers/usb/serial/ipw.c           |    6 -
 drivers/usb/serial/ir-usb.c        |    6 -
 drivers/usb/serial/keyspan_pda.c   |    6 -
 drivers/usb/serial/omninet.c       |    6 -
 drivers/usb/serial/pl2303.c        |    1 
 drivers/usb/serial/pl2303.h        |    4 +
 drivers/usb/serial/safe_serial.c   |    6 -
 drivers/usb/storage/unusual_devs.h |   14 ++
 include/linux/usb.h                |    2 
 32 files changed, 436 insertions(+), 242 deletions(-)

---------------

Alan Cox:
ohci: Use ref-counting hotplug safe interfaces

Alan Stern:
USB: unusual-devs entry for Nokia E60
USB: create new workqueue thread for USB autosuspend
USB: dummy-hcd: fix "warn-unused-result" messages
USB: g_file_storage: fix "ignoring return value" warnings
USB: allow both root-hub interrupts and polling
OHCI: remove existing autosuspend code
OHCI: add auto-stop support
USB: fix autosuspend when CONFIG_PM isn't set
USB: g_file_storage: Set sense info Valid bit only when needed

David Hollis:
USB: asix - Add alternate device IDs for Dlink DUB-E100 Rev B1

Henrik Kretzschmar:
USB: fixes kerneldoc errors in usbcore-auto(susp/res)-patch
USB: microtek usb scanner: Scsi_Cmnd conversion

Ian Abbott:
USB serial ftdi_sio: Add support for Tactrix OpenPort devices

Jan Mate:
USB Storage: unusual_devs.h entry for Sony Ericsson P990i

Justin Carlson:
USB: add SeaLevel 2106 SeaLINK support to ftdi_sio

Matthias Urlichs:
USB: another device ID for ipaq

Mikael Pettersson:

      USB: Fix alignment of buffer passed down to ->hub_control()

Oliver Neukum:
USB: new id for kaweth

Peter Zijlstra:
usb-serial: possible irq lock inversion (PPP vs. usb/serial)

Petko Manolov:
USB: Pegasus driver failing for ADMtek 8515 network device

Raghavendra Biligiri:
USB: add Raritan KVM USB Dongle to the HID_QUIRK_NOGET blacklist

Sean Young:
USB: New PhidgetKit 8/8/8 reset outputs after 2 seconds

Wesley PA4WDH:
USB: Add vendor / product ID to pl2303

#1 lore raw
Quoted 6 lines · Greg KH

Here are some more USB bugfixes and device ids 2.6.18. They should all fix the reported problems in your current tree (if not, please let me know.)

All of these changes have been in the -mm tree for a while.

Maybe I shouldn't have hurried you.

In file included from drivers/usb/host/ohci-hcd.c:140:
drivers/usb/host/ohci-hub.c: In function 'ohci_rh_resume':
drivers/usb/host/ohci-hub.c:184: error: invalid storage class for function 'ohci_restart' drivers/usb/host/ohci-hub.c:188: warning: implicit declaration of function 'ohci_restart' drivers/usb/host/ohci-hcd.c: At top level:
drivers/usb/host/ohci-hcd.c:815: error: static declaration of 'ohci_restart' follows non-static declaration drivers/usb/host/ohci-hub.c:188: error: previous implicit declaration of 'ohci_restart' was here make[3]: *** [drivers/usb/host/ohci-hcd.o] Error 1
make[2]: *** [drivers/usb/host] Error 2
make[1]: *** [drivers/usb] Error 2
make: *** [drivers] Error 2

oops.

Linus

author
#2 lore raw
Quoted 24 lines · Linus Torvalds
Quoted 6 lines · Greg KH

Here are some more USB bugfixes and device ids 2.6.18. They should all fix the reported problems in your current tree (if not, please let me know.)

All of these changes have been in the -mm tree for a while.

Maybe I shouldn't have hurried you.

In file included from drivers/usb/host/ohci-hcd.c:140:
drivers/usb/host/ohci-hub.c: In function 'ohci_rh_resume':
drivers/usb/host/ohci-hub.c:184: error: invalid storage class for function 'ohci_restart' drivers/usb/host/ohci-hub.c:188: warning: implicit declaration of function 'ohci_restart' drivers/usb/host/ohci-hcd.c: At top level:
drivers/usb/host/ohci-hcd.c:815: error: static declaration of 'ohci_restart' follows non-static declaration drivers/usb/host/ohci-hub.c:188: error: previous implicit declaration of 'ohci_restart' was here make[3]: *** [drivers/usb/host/ohci-hcd.o] Error 1
make[2]: *** [drivers/usb/host] Error 2
make[1]: *** [drivers/usb] Error 2
make: *** [drivers] Error 2

Quoted 1 line

oops.

Odd, care to attach your .config?

thanks,

greg k-h

#3 lore raw
In reply to Linus Torvalds
Quoted 12 lines · On Thu, 28 Sep 2006 16:40:23 -0700 (PDT) Linus Torvalds <[email protected]>…
Quoted 6 lines · Greg KH

Here are some more USB bugfixes and device ids 2.6.18. They should all fix the reported problems in your current tree (if not, please let me know.)

All of these changes have been in the -mm tree for a while.

Maybe I shouldn't have hurried you.

Quoted 12 lines

In file included from drivers/usb/host/ohci-hcd.c:140:
drivers/usb/host/ohci-hub.c: In function 'ohci_rh_resume':
drivers/usb/host/ohci-hub.c:184: error: invalid storage class for function 'ohci_restart' drivers/usb/host/ohci-hub.c:188: warning: implicit declaration of function 'ohci_restart' drivers/usb/host/ohci-hcd.c: At top level:
drivers/usb/host/ohci-hcd.c:815: error: static declaration of 'ohci_restart' follows non-static declaration drivers/usb/host/ohci-hub.c:188: error: previous implicit declaration of 'ohci_restart' was here make[3]: *** [drivers/usb/host/ohci-hcd.o] Error 1
make[2]: *** [drivers/usb/host] Error 2
make[1]: *** [drivers/usb] Error 2
make: *** [drivers] Error 2

That's the "some gccs dont like static function decls in that scope" thing.

I fixed it (unpleasantly) like this:

drivers/usb/host/ohci-hub.c renamed from drivers/usb/host/ohci-hub.c~ohci-add-auto-stop-support-hack-hack +4 -2
diff -puN drivers/usb/host/ohci-hub.c~ohci-add-auto-stop-support-hack-hack drivers/usb/host/ohci-hub.c
@@ -132,6 +132,10 @@ static inline struct ed *find_head (stru
 	return ed;
 }
 
+#ifdef CONFIG_PM
+static int ohci_restart(struct ohci_hcd *ohci);
+#endif
+
 /* caller has locked the root hub */
 static int ohci_rh_resume (struct ohci_hcd *ohci)
 __releases(ohci->lock)
@@ -181,8 +185,6 @@ __acquires(ohci->lock)
 #ifdef	CONFIG_PM
 	if (status == -EBUSY) {
 		if (!autostopped) {
-			static int ohci_restart (struct ohci_hcd *ohci);
-
 			spin_unlock_irq (&ohci->lock);
 			(void) ohci_init (ohci);
 			status = ohci_restart (ohci);

_

author
#4 lore raw
Quoted 37 lines · Andrew Morton
Quoted 12 lines · On Thu, 28 Sep 2006 16:40:23 -0700 (PDT) Linus Torvalds <[email protected]>…
Quoted 6 lines · Greg KH

Here are some more USB bugfixes and device ids 2.6.18. They should all fix the reported problems in your current tree (if not, please let me know.)

All of these changes have been in the -mm tree for a while.

Maybe I shouldn't have hurried you.

Quoted 12 lines

In file included from drivers/usb/host/ohci-hcd.c:140:
drivers/usb/host/ohci-hub.c: In function 'ohci_rh_resume':
drivers/usb/host/ohci-hub.c:184: error: invalid storage class for function 'ohci_restart' drivers/usb/host/ohci-hub.c:188: warning: implicit declaration of function 'ohci_restart' drivers/usb/host/ohci-hcd.c: At top level:
drivers/usb/host/ohci-hcd.c:815: error: static declaration of 'ohci_restart' follows non-static declaration drivers/usb/host/ohci-hub.c:188: error: previous implicit declaration of 'ohci_restart' was here make[3]: *** [drivers/usb/host/ohci-hcd.o] Error 1
make[2]: *** [drivers/usb/host] Error 2
make[1]: *** [drivers/usb] Error 2
make: *** [drivers] Error 2

That's the "some gccs dont like static function decls in that scope" thing.

I fixed it (unpleasantly) like this:

diff -puN drivers/usb/host/ohci-hub.c~ohci-add-auto-stop-support-hack-hack drivers/usb/host/ohci-hub.c

drivers/usb/host/ohci-hub.c static inline struct ed *find_head (stru · line 137

Quoted 6 lines
drivers/usb/host/ohci-hub.c renamed from drivers/usb/host/ohci-hub.c~ohci-add-auto-stop-support-hack-hack +3 -0
@@ -132,6 +132,10 @@ static inline struct ed *find_head (stru
 	return ed;
 }
 
+#ifdef CONFIG_PM
+static int ohci_restart(struct ohci_hcd *ohci);
+#endif

That #ifdef shouldn't be even needed.

I'll add a patch to the git tree to fix this up, give me a few minutes...

thanks,

greg k-h

author
#5 lore raw
Quoted 41 lines · Greg KH
Quoted 40 lines · Andrew Morton
Quoted 12 lines · On Thu, 28 Sep 2006 16:40:23 -0700 (PDT) Linus Torvalds <[email protected]>…
Quoted 6 lines · Greg KH

Here are some more USB bugfixes and device ids 2.6.18. They should all fix the reported problems in your current tree (if not, please let me know.)

All of these changes have been in the -mm tree for a while.

Maybe I shouldn't have hurried you.

Quoted 12 lines

In file included from drivers/usb/host/ohci-hcd.c:140:
drivers/usb/host/ohci-hub.c: In function 'ohci_rh_resume':
drivers/usb/host/ohci-hub.c:184: error: invalid storage class for function 'ohci_restart' drivers/usb/host/ohci-hub.c:188: warning: implicit declaration of function 'ohci_restart' drivers/usb/host/ohci-hcd.c: At top level:
drivers/usb/host/ohci-hcd.c:815: error: static declaration of 'ohci_restart' follows non-static declaration drivers/usb/host/ohci-hub.c:188: error: previous implicit declaration of 'ohci_restart' was here make[3]: *** [drivers/usb/host/ohci-hcd.o] Error 1
make[2]: *** [drivers/usb/host] Error 2
make[1]: *** [drivers/usb] Error 2
make: *** [drivers] Error 2

That's the "some gccs dont like static function decls in that scope" thing.

I fixed it (unpleasantly) like this:

diff -puN drivers/usb/host/ohci-hub.c~ohci-add-auto-stop-support-hack-hack drivers/usb/host/ohci-hub.c

drivers/usb/host/ohci-hub.c renamed from drivers/usb/host/ohci-hub.c~ohci-add-auto-stop-support-hack-hack +0 -0
@@ -132,6 +132,10 @@ static inline struct ed *find_head (stru
 	return ed;
 }
 
Quoted 8 lines

drivers/usb/host/ohci-hub.c static inline struct ed *find_head (stru · line 137

Quoted 3 lines
drivers/usb/host/ohci-hub.c renamed from drivers/usb/host/ohci-hub.c~ohci-add-auto-stop-support-hack-hack +3 -0
+#ifdef CONFIG_PM
+static int ohci_restart(struct ohci_hcd *ohci);
+#endif

That #ifdef shouldn't be even needed.

I'll add a patch to the git tree to fix this up, give me a few minutes...

Ok, Linus, if you pull from:
master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6.git

You should have one more patch that fixes this problem.

Sorry, I think I need to upgrade to gcc4 here to catch these things...

greg k-h

#7 lore raw
In reply to Andrew Morton

drivers/usb/host/ohci-hub.c static inline struct ed *find_head (stru · line 139

Quoted 11 lines
drivers/usb/host/ohci-hub.c renamed from drivers/usb/host/ohci-hub.c~ohci-add-auto-stop-support-hack-hack +4 -0
@@ -132,6 +132,10 @@ static inline struct ed *find_head (stru
 	return ed;
 }
 
+#ifdef CONFIG_PM
+static int ohci_restart(struct ohci_hcd *ohci);
+#endif
+
 /* caller has locked the root hub */

Better to just always include the forward decl... much cleaner!

... reviewing and testing those new OHCI changes is still on my list; all that suspend stuff needs care, things that work on PCs don't necessarily work on embedded hardware (where OHCI is common, and PM tends to be more critical).

- Dave

#6 lore raw
In reply to Greg KH
Quoted 6 lines · On Thu, 28 Sep 2006 17:05:24 -0700 Greg KH <[email protected]> wrote:

drivers/usb/host/ohci-hub.c static inline struct ed *find_head (stru · line 137

Quoted 4 lines
drivers/usb/host/ohci-hub.c renamed from drivers/usb/host/ohci-hub.c~ohci-add-auto-stop-support-hack-hack +3 -0
+#ifdef CONFIG_PM
+static int ohci_restart(struct ohci_hcd *ohci);
+#endif

That #ifdef shouldn't be even needed.

We'll get "warning: 'ohci_restart' declared 'static' but never defined" without it.

#8 lore raw
In reply to David Brownell
Quoted 6 lines · On Thu, 28 Sep 2006 17:08:33 -0700 David Brownell <[email protected]> wrote:
Quoted 6 lines
drivers/usb/host/ohci-hub.c renamed from drivers/usb/host/ohci-hub.c~ohci-add-auto-stop-support-hack-hack +0 -0
@@ -132,6 +132,10 @@ static inline struct ed *find_head (stru
 	return ed;
 }
 
Quoted 7 lines

drivers/usb/host/ohci-hub.c static inline struct ed *find_head (stru · line 139

Quoted 5 lines
drivers/usb/host/ohci-hub.c renamed from drivers/usb/host/ohci-hub.c~ohci-add-auto-stop-support-hack-hack +4 -0
+#ifdef CONFIG_PM
+static int ohci_restart(struct ohci_hcd *ohci);
+#endif
+
 /* caller has locked the root hub */

Better to just always include the forward decl... much cleaner!

See other email.

Quoted 2 lines

... reviewing and testing those new OHCI changes is still on my list;

erm, we prefer to do that before code hits mainline.

Quoted 3 lines

all that suspend stuff needs care, things that work on PCs don't necessarily work on embedded hardware (where OHCI is common, and PM tends to be more critical).

I guess we'll find out.

#9 lore raw
Quoted 7 lines · Andrew Morton
Quoted 2 lines · On Thu, 28 Sep 2006 17:08:33 -0700 David Brownell <[email protected]> wrote:

... reviewing and testing those new OHCI changes is still on my list;

erm, we prefer to do that before code hits mainline.

Exactly why I mentioned the issue. I trust Alan basically got the ohci parts of that new root hub suspend code right, but I probably have a lot more variety in OHCI silicon here ... but virtually no time to assemble the relevant platform patches and test them with new patches from MM/etc, given other ongoing work.

On the plus side, I think maybe OMAP1 devel boards are now mostly buildable straight from kernel GIT (with i2c-omap merged), which is a BIG improvement for at least one part of the testing equation.

- Dave

Quoted 6 lines
Quoted 3 lines

all that suspend stuff needs care, things that work on PCs don't necessarily work on embedded hardware (where OHCI is common, and PM tends to be more critical).

I guess we'll find out.

#11 lore raw
In reply to Andrew Morton

Andrew Morton <[email protected]> wrote:

[...]

Quoted 9 lines

That's the "some gccs dont like static function decls in that scope" thing.

I fixed it (unpleasantly) like this:

diff -puN drivers/usb/host/ohci-hub.c~ohci-add-auto-stop-support-hack-hack drivers/usb/host/ohci-hub.c

drivers/usb/host/ohci-hub.c static inline struct ed *find_head (stru · line 138

Quoted 7 lines
drivers/usb/host/ohci-hub.c renamed from drivers/usb/host/ohci-hub.c~ohci-add-auto-stop-support-hack-hack +4 -0
@@ -132,6 +132,10 @@ static inline struct ed *find_head (stru
 	return ed;
 }
 
+#ifdef CONFIG_PM
+static int ohci_restart(struct ohci_hcd *ohci);
+#endif
+

The #ifdef is unneeded here.

Quoted 15 lines
drivers/usb/host/ohci-hub.c renamed from drivers/usb/host/ohci-hub.c~ohci-add-auto-stop-support-hack-hack +0 -2
 /* caller has locked the root hub */
 static int ohci_rh_resume (struct ohci_hcd *ohci)
 __releases(ohci->lock)
@@ -181,8 +185,6 @@ __acquires(ohci->lock)
 #ifdef	CONFIG_PM
 	if (status == -EBUSY) {
 		if (!autostopped) {
-			static int ohci_restart (struct ohci_hcd *ohci);
-
 			spin_unlock_irq (&ohci->lock);
 			(void) ohci_init (ohci);
 			status = ohci_restart (ohci);

_

-

Signature · 4 lines
Dr. Horst H. von Brand                   User #22616 counter.li.org
Departamento de Informatica                    Fono: +56 32 2654431
Universidad Tecnica Federico Santa Maria             +56 32 2654239
Casilla 110-V, Valparaiso, Chile               Fax:  +56 32 2797513
maintainer
#10 lore raw
In reply to David Brownell
Quoted 8 lines · David Brownell
Quoted 7 lines · Andrew Morton
Quoted 2 lines · On Thu, 28 Sep 2006 17:08:33 -0700 David Brownell <[email protected]> wrote:

... reviewing and testing those new OHCI changes is still on my list;

erm, we prefer to do that before code hits mainline.

We are victims of bad timing. This all started with the USB autosuspend patches, submitted around a month ago. Greg didn't merge all of them because he experienced some problems (which we still haven't sorted out!), but the rest went into -mm. But then Greg was away for a while and too busy to help with debugging.

I hadn't done any testing of OHCI controllers with CONFIG_USB_SUSPEND turned off, and when problems turned up a couple of weeks ago it became apparent that some of the existing code in ohci-hcd had to change or be removed, as it wasn't compatible with the new autosuspend mechanism. This was done just in the past week, and David hasn't had much of a chance to go through and review it yet.

As a result, when the autosuspend patches went upstream for 2.6.19-rc1 the extra ohci-hcd changes had to go with them, even though they have received very little testing and review. Perhaps things moved too quickly, but this wasn't obvious at the time, and anyway it's done now.

Quoted 5 lines

Exactly why I mentioned the issue. I trust Alan basically got the ohci parts of that new root hub suspend code right, but I probably have a lot more variety in OHCI silicon here ... but virtually no time to assemble the relevant platform patches and test them with new patches from MM/etc, given other ongoing work.

Exactly. The new code works on the one system I have with OHCI controllers, and a few other people have used it successfully. However this is hardly a wide sampling, and we know there are controllers out there with bizarre quirks which might not like the changes.

The problems with last-minute compile errors are symptoms that the new code has shaken down yet -- compounded by the way different versions of GCC don't all report the same classes of errors.

Quoted 5 lines
Quoted 5 lines
Quoted 3 lines

all that suspend stuff needs care, things that work on PCs don't necessarily work on embedded hardware (where OHCI is common, and PM tends to be more critical).

I guess we'll find out.

Hopefully in plenty of time to get straightened out before too many 2.6.19-rc releases have gone by.

Alan Stern