2006-09-28 22:42:51

by Greg KH

[permalink] [raw]
Subject: [GIT PATCH] 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


2006-09-28 23:40:43

by Linus Torvalds

[permalink] [raw]
Subject: Re: [GIT PATCH] More USB patches for 2.6.18



On Thu, 28 Sep 2006, Greg KH wrote:
>
> 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

2006-09-28 23:46:19

by Greg KH

[permalink] [raw]
Subject: Re: [GIT PATCH] More USB patches for 2.6.18

On Thu, Sep 28, 2006 at 04:40:23PM -0700, Linus Torvalds wrote:
>
>
> On Thu, 28 Sep 2006, Greg KH wrote:
> >
> > 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.

Odd, care to attach your .config?

thanks,

greg k-h

2006-09-29 00:00:15

by Andrew Morton

[permalink] [raw]
Subject: Re: [GIT PATCH] More USB patches for 2.6.18

On Thu, 28 Sep 2006 16:40:23 -0700 (PDT)
Linus Torvalds <[email protected]> wrote:

>
>
> On Thu, 28 Sep 2006, Greg KH wrote:
> >
> > 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
>

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
--- a/drivers/usb/host/ohci-hub.c~ohci-add-auto-stop-support-hack-hack
+++ a/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);
_

2006-09-29 00:05:25

by Greg KH

[permalink] [raw]
Subject: Re: [GIT PATCH] More USB patches for 2.6.18

On Thu, Sep 28, 2006 at 04:59:51PM -0700, Andrew Morton wrote:
> On Thu, 28 Sep 2006 16:40:23 -0700 (PDT)
> Linus Torvalds <[email protected]> wrote:
>
> >
> >
> > On Thu, 28 Sep 2006, Greg KH wrote:
> > >
> > > 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
> >
>
> 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
> --- a/drivers/usb/host/ohci-hub.c~ohci-add-auto-stop-support-hack-hack
> +++ a/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

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

2006-09-29 00:08:04

by Greg KH

[permalink] [raw]
Subject: Re: [GIT PATCH] More USB patches for 2.6.18

On Thu, Sep 28, 2006 at 05:05:24PM -0700, Greg KH wrote:
> On Thu, Sep 28, 2006 at 04:59:51PM -0700, Andrew Morton wrote:
> > On Thu, 28 Sep 2006 16:40:23 -0700 (PDT)
> > Linus Torvalds <[email protected]> wrote:
> >
> > >
> > >
> > > On Thu, 28 Sep 2006, Greg KH wrote:
> > > >
> > > > 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
> > >
> >
> > 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
> > --- a/drivers/usb/host/ohci-hub.c~ohci-add-auto-stop-support-hack-hack
> > +++ a/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
>
> 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

2006-09-29 00:08:40

by David Brownell

[permalink] [raw]
Subject: Re: [linux-usb-devel] [GIT PATCH] More USB patches for 2.6.18

> --- a/drivers/usb/host/ohci-hub.c~ohci-add-auto-stop-support-hack-hack
> +++ a/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 */

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

2006-09-29 00:12:34

by Andrew Morton

[permalink] [raw]
Subject: Re: [GIT PATCH] More USB patches for 2.6.18

On Thu, 28 Sep 2006 17:05:24 -0700
Greg KH <[email protected]> wrote:

> >
> > +#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.

2006-09-29 00:20:51

by Andrew Morton

[permalink] [raw]
Subject: Re: [linux-usb-devel] [GIT PATCH] More USB patches for 2.6.18

On Thu, 28 Sep 2006 17:08:33 -0700
David Brownell <[email protected]> wrote:

> > --- a/drivers/usb/host/ohci-hub.c~ohci-add-auto-stop-support-hack-hack
> > +++ a/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 */
>
> Better to just always include the forward decl... much cleaner!

See other email.

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

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

> 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.

2006-09-29 00:56:15

by David Brownell

[permalink] [raw]
Subject: Re: [linux-usb-devel] [GIT PATCH] More USB patches for 2.6.18

On Thursday 28 September 2006 5:20 pm, Andrew Morton wrote:
> 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


> > 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.
>

2006-09-29 01:27:43

by Horst H. von Brand

[permalink] [raw]
Subject: Re: [GIT PATCH] More USB patches for 2.6.18

Andrew Morton <[email protected]> wrote:

[...]

> 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
> --- a/drivers/usb/host/ohci-hub.c~ohci-add-auto-stop-support-hack-hack
> +++ a/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
> +

The #ifdef is unneeded here.

> /* 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);
> _
>
> -
--
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

2006-09-29 16:01:48

by Alan Stern

[permalink] [raw]
Subject: Re: [linux-usb-devel] [GIT PATCH] More USB patches for 2.6.18

On Thu, 28 Sep 2006, David Brownell wrote:

> On Thursday 28 September 2006 5:20 pm, Andrew Morton wrote:
> > 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.

> 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.

> > > 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