USB changes for 2.6.6
Subsystems (6)
PATCH 1/1 USB changes for 2.6.6
Hi,
Here are USB patches for 2.6.62. There are a bunch of different things here:
- interface access fixups
- bugfixes
- a few new drivers
- lots more bugfixes
All of these (with the exception of a few minor patches from today) have been in the -mm tree for quite some time.
Please pull from: bk://kernel.bkbits.net/gregkh/linux/usb-2.6
Patches will be posted to linux-usb-devel as a follow-up thread for those who want to see them.
thanks,
greg k-h
Documentation/usb/mtouchusb.txt | 91 +--- MAINTAINERS | 14 drivers/bluetooth/bfusb.c | 9 drivers/bluetooth/hci_usb.c | 2 drivers/isdn/hisax/st5481_b.c | 9 drivers/isdn/hisax/st5481_d.c | 9 drivers/isdn/hisax/st5481_usb.c | 10 drivers/media/video/cpia_usb.c | 4 drivers/net/irda/irda-usb.c | 2 drivers/usb/Makefile | 1 drivers/usb/class/bluetty.c | 4 drivers/usb/class/cdc-acm.c | 275 ++++++------ drivers/usb/core/config.c | 368 +++++++++------- drivers/usb/core/devices.c | 47 +- drivers/usb/core/devio.c | 410 +++++++++--------- drivers/usb/core/hcd-pci.c | 77 ++- drivers/usb/core/hcd.c | 51 +- drivers/usb/core/hcd.h | 13 drivers/usb/core/hub.c | 652 +++++++++++++++++++++-------- drivers/usb/core/hub.h | 2 drivers/usb/core/inode.c | 6 drivers/usb/core/message.c | 103 +++- drivers/usb/core/urb.c | 23 - drivers/usb/core/usb.c | 132 ++---- drivers/usb/gadget/dummy_hcd.c | 166 ++++++- drivers/usb/gadget/file_storage.c | 2 drivers/usb/gadget/gadget_chips.h | 2 drivers/usb/gadget/serial.c | 6 drivers/usb/gadget/zero.c | 65 ++ drivers/usb/host/ehci-dbg.c | 30 + drivers/usb/host/ehci-hcd.c | 138 +++--- drivers/usb/host/ehci-hub.c | 182 ++++++++ drivers/usb/host/ehci-mem.c | 39 + drivers/usb/host/ehci-q.c | 10 drivers/usb/host/ehci-sched.c | 6 drivers/usb/host/ehci.h | 22 - drivers/usb/host/ohci-dbg.c | 14 drivers/usb/host/ohci-hcd.c | 138 ++++-- drivers/usb/host/ohci-hub.c | 296 +++++++++++++ drivers/usb/host/ohci-mem.c | 3 drivers/usb/host/ohci-pci.c | 176 +------- drivers/usb/host/ohci-q.c | 21 drivers/usb/host/ohci.h | 38 + drivers/usb/host/uhci-hcd.c | 91 +++- drivers/usb/host/uhci-hcd.h | 16 drivers/usb/image/mdc800.c | 12 drivers/usb/input/Kconfig | 13 drivers/usb/input/Makefile | 1 drivers/usb/input/aiptek.c | 4 drivers/usb/input/hid-core.c | 22 - drivers/usb/input/kbtab.c | 2 drivers/usb/input/mtouchusb.c | 111 +---- drivers/usb/input/touchkitusb.c | 310 ++++++++++++++ drivers/usb/input/wacom.c | 4 drivers/usb/media/dsbr100.c | 228 ++++++---- drivers/usb/media/ibmcam.c | 9 drivers/usb/media/konicawc.c | 17 drivers/usb/media/ov511.c | 14 drivers/usb/media/pwc-if.c | 7 drivers/usb/media/se401.c | 2 drivers/usb/media/ultracam.c | 9 drivers/usb/media/vicam.c | 2 drivers/usb/media/w9968cf.h | 4 drivers/usb/misc/Kconfig | 12 drivers/usb/misc/Makefile | 1 drivers/usb/misc/cytherm.c | 9 drivers/usb/misc/emi26.c | 2 drivers/usb/misc/emi26_fw.h | 6 drivers/usb/misc/emi62.c | 2 drivers/usb/misc/emi62_fw_m.h | 7 drivers/usb/misc/emi62_fw_s.h | 7 drivers/usb/misc/legousbtower.c | 767 ++++++++++++++++++++++------------- drivers/usb/misc/phidgetservo.c | 361 +++++++++++++++- drivers/usb/misc/tiglusb.c | 64 ++ drivers/usb/misc/usbtest.c | 6 drivers/usb/misc/uss720.c | 2 drivers/usb/net/kaweth.c | 18 drivers/usb/net/pegasus.c | 4 drivers/usb/net/rtl8150.c | 8 drivers/usb/net/usbnet.c | 56 +- drivers/usb/serial/belkin_sa.c | 28 - drivers/usb/serial/console.c | 5 drivers/usb/serial/cyberjack.c | 31 - drivers/usb/serial/digi_acceleport.c | 18 drivers/usb/serial/empeg.c | 34 - drivers/usb/serial/ftdi_sio.c | 125 ++--- drivers/usb/serial/generic.c | 21 drivers/usb/serial/io_edgeport.c | 140 ++---- drivers/usb/serial/io_ti.c | 102 +--- drivers/usb/serial/ipaq.c | 33 - drivers/usb/serial/ir-usb.c | 41 - drivers/usb/serial/keyspan.c | 9 drivers/usb/serial/keyspan.h | 19 drivers/usb/serial/keyspan_pda.c | 25 - drivers/usb/serial/kl5kusb105.c | 58 -- drivers/usb/serial/kobil_sct.c | 7 drivers/usb/serial/omninet.c | 48 -- drivers/usb/serial/pl2303.c | 39 - drivers/usb/serial/pl2303.h | 3 drivers/usb/serial/safe_serial.c | 15 drivers/usb/serial/usb-serial.c | 99 +--- drivers/usb/serial/usb-serial.h | 67 --- drivers/usb/serial/visor.c | 49 -- drivers/usb/serial/visor.h | 1 drivers/usb/serial/whiteheat.c | 23 - drivers/usb/storage/datafab.c | 2 drivers/usb/storage/isd200.c | 26 - drivers/usb/storage/jumpshot.c | 2 drivers/usb/storage/scsiglue.c | 19 drivers/usb/storage/shuttle_usbat.c | 142 +++--- drivers/usb/storage/shuttle_usbat.h | 20 drivers/usb/storage/transport.c | 58 +- drivers/usb/storage/unusual_devs.h | 40 + drivers/usb/storage/usb.c | 4 drivers/usb/storage/usb.h | 6 include/linux/usb.h | 46 +- include/linux/usbdevice_fs.h | 1 117 files changed, 4466 insertions(+), 2818 deletions(-)
-----
<al.fracchetti:tin.it>:
o USB Storage: Kyocera Finecsm 3L -unusual_devs.h
<c.lucas:ifrance.com>:
o USB: esthetic and trivial patch
<colin:colino.net>:
o USB: cosmetic fixes for cdc-acm
<linux-usb:nerds-incorporated.org>:
o USB: Alcatel TD10 Serial to USB converter cable support
<sean:mess.org>:
o USB: fix PhidgetServo driver
o USB: add new USB PhidgetServo driver
<stuber:loria.fr>:
o USB: LEGO USB Tower driver v0.95
Alan Stern:
o USB: Don't delete interfaces until all are unbound
o USB: Accept devices with funky interface/altsetting numbers
o USB Gadget: Fix file-storage gadget Request Sense length
o (as268) Import device-reset changes from gadget-2.6 tree
o USB: Small change to CPiA USB driver
o USB Storage: unusual_devs.h update
o USB: Reduce kernel stack usage
o USB: Altsetting update for USB IrDA driver
o USB: USB altsetting updates for IDSN Hisax driver
o USB: Lock devices during tree traversal
o USB: Allocate interface structures dynamically
o USB: Altsetting updates for usb/serial
o USB: Altsetting update for USB net drivers
o USB: Altsetting update for USB misc drivers
o USB: Altsetting updates for USB media drivers
o USB: Cosmetic improvements for the UHCI driver
o USB: Ignore URB_NO_INTERRUPT flag in UHCI
o USB: Eliminate dead code from the UHCI driver
o USB: Implement endpoint_disable() for UHCI
o USB: unusual_devs.h update
o USB: Remove unusual_devs entries for Minolta DiMAGE 7, 7Hi
Andrew Morton:
o USB: fix ohci-hcd build error
Daniel Ritz:
o USB: add support for eGalax Touchscreen USB
Daniele Bellucci:
o USB: audits in usb_init()
David Brownell:
o USB: hcd-pci suspend tweak
o USB: ohci resume fix
o USB: usbhid calls itself "hid"
o USB: missing probe() diagnostics for CDC Ethernet
o USB: OHCI root hub suspend/resume/wakeup
o USB: khubd turns port power back on after reset
o USB: OHCI cleanups
o USB: OHCI resume/reset stops deadlocking in PM code
o USB: more functional HCD PCI PM glue
o USB: EHCI power management updates
o USB: usbnet handles Billionton Systems USB2AR
o USB: dummy_hcd, root port wakeup/suspend
o USB: reject urb submissions to suspended devices
o USB Gadget: gadget zero and USB suspend/resume
o USB: fix sparc64 2.6.6-rc2-mm2 build busted: usb/core/hub.c hubstatus
o USB: khubd fixes
o USB: re-factor enumeration logic
o USB: usbtest, smp unlink modes
o USB: root hubs can report remote wakeup feature
o USB: fix usbfs iso interval problem
Duncan Sands:
o USB: compile fix for usbfs snooping
o USB: Patch to remove interface indices from devio.c
o USB: fix WARN_ON in usbfs
o USB: usbfs: change extern inline to static inline
o USB: be assertive in usbfs
o USB usbfs: drop pointless racy check
o USB usbfs: missing lock in proc_getdriver
o USB usbfs: destroy submitted urbs only on the disconnected interface
o USB usbfs: fix up releaseintf
o USB usbfs: fix up proc_ioctl
o USB usbfs: fix up proc_setconfig
o USB usbfs: remove obsolete comment from proc_resetdevice
o USB usbfs: replace the per-file semaphore with the per-device semaphore
o USB usbfs: take a reference to the usb device
Greg Kroah-Hartman:
o USB: convert visor to use module_param()
o USB: convert pl2303 to use module_param()
o USB: change usbserial core to use module_param()
o USB: remove get_usb_serial() as it's pretty much unneeded
o USB: remove serial_paranoia_check() function
o USB: removed port_paranoia_check() call for usb serial drivers
o USB: remove magic number field from struct usb_serial as it's pretty useless
o USB: remove magic number field from usb_serial_port as it's pretty useless
o USB: add snooping capability to usbfs for control messages
o USB: make functions static in usb drivers that should be
o USB: add support for Zire 31 devices
o USB: fix build error in hci_usb driver due to urb reference count change
o USB: remove the wait_for_urb function from bfusb driver as it's no longer needed
o USB: fix compiler warnings in devices.c file
o USB: fix incorrect usb-serial conversion for cur_altsetting from previous patch
o USB: make ehci driver use a kref instead of an atomic_t
o USB: removed unused atomic_t in keyspan driver structure
o USB: switch struct urb to use a kref instead of it's own atomic_t
o USB: fix devio compiler warnings created by previous patch
Hanna V. Linder:
o USB: Add class support to drivers/usb/misc/tiglusb.c
Herbert Xu:
o USB Storage: Sony Clie
Luiz Capitulino:
o USB: fix media/dsbr100.c unused variable
Markus Demleitner:
o USB: DSBR-100 tiny patch
Matthew Dharm:
o USB: usb-storage driver changes for 2.6.x [4/4]
o USB: usb-storage driver changes for 2.6.x [3/4]
o USB: usb-storage driver changes for 2.6.x [2/4]
o USB: usb-storage driver changes for 2.6.x [1/4]
Oliver Neukum:
o USB: fixes of assumptions about waitqueues
Stefan Eletzhofer:
o USB Gadget: fix g_serial debug module parm
o USB Gadget: fix pxa define in gadget_chips.h
Todd E. Johnson:
o USB: update for mtouchusb
o USB: mtouchusb update for 2.6.6-rc2
Tony Lindgren:
o USB: Merge support for Keyspan UPR-112 USB serial adapter from 2.4 to 2.6
Quoted 1 line · Greg KH
drivers/usb/misc/cytherm.c | 9
current Linus tree does not compile:
CC [M] drivers/usb/misc/cytherm.odrivers/usb/misc/cytherm.c: In function `set_brightness':drivers/usb/misc/cytherm.c:122: error: `led' undeclared (first use in this function) drivers/usb/misc/cytherm.c:122: error: (Each undeclared identifier is reported only once drivers/usb/misc/cytherm.c:122: error: for each function it appears in.) drivers/usb/misc/cytherm.c: In function `show_temp':drivers/usb/misc/cytherm.c:161: error: led' undeclared (first use in this function) drivers/usb/misc/cytherm.c: In function show_button':drivers/usb/misc/cytherm.c:205: error: led' undeclared (first use in this function) drivers/usb/misc/cytherm.c: In function show_port0':drivers/usb/misc/cytherm.c:242: error: led' undeclared (first use in this function) drivers/usb/misc/cytherm.c: In function set_port0':drivers/usb/misc/cytherm.c:277: error: led' undeclared (first use in this function) drivers/usb/misc/cytherm.c: In function show_port1':drivers/usb/misc/cytherm.c:302: error: led' undeclared (first use in this function) drivers/usb/misc/cytherm.c: In function set_port1':drivers/usb/misc/cytherm.c:337: error: `led' undeclared (first use in this function) make[3]: *** [drivers/usb/misc/cytherm.o] Error 1
thats the dev_dbg() change.
Signature · 3 lines
USB is for mice, FireWire is for men! sUse lINUX ag, nÜRNBERG
Quoted 5 lines · Olaf Hering
Quoted 1 line · Greg KH
drivers/usb/misc/cytherm.c | 9current Linus tree does not compile:
Replace all "led" with "cytherm". The code was crap, and would never have compiled with debugging on anyway.
Linus
Quoted 2 lines · Linus Torvalds
... would never have
compiled with debugging on anyway.
Speaking of which, please consider merging this. It missed Greg's push on Friday, but it's needed to build OHCI and EHCI with CONFIG_USB_DEBUG when !CONFIG_PM.
By request, this adds (and uses) a new API call to hide the necessary #ifdef once, rather than repeat it in every driver. It's an accessor for a field only exists when #ifdef CONFIG_PM. These particular references prevent dumping registers when that part of the chip suspended.
- Dave
include/linux/pm.h +10 -0
@@ -238,6 +238,16 @@#endif }; +static inline u32 +device_pm_state (struct dev_pm_info *info) +{ +#ifdef CONFIG_PM +return info->power_state; +#else +return 0 ; +#endif +} +extern void device_pm_set_parent (struct device * dev,struct device * parent);extern int device_suspend (u32 state);
drivers/usb/host/ehci-dbg.c +1 -1
@@ -639,7 +639,7 @@spin_lock_irqsave (&ehci->lock, flags); -if (bus->controller->power.power_state) { +if (device_pm_state (&bus->controller->power)) { size = scnprintf (next, size, "bus %s, device %s (driver " DRIVER_VERSION ")\n" "SUSPENDED (no register access)\n",
drivers/usb/host/ohci-dbg.c +1 -1
@@ -623,7 +623,7 @@ hcd->self.controller->bus_id, hcd_name); -if (bus->controller->power.power_state) { +if (device_pm_state (&bus->controller->power)) { size -=scnprintf (next, size,"SUSPENDED (no register access)\n" ); goto done;
Quoted 4 lines · David Brownell
Speaking of which, please consider merging this. It missed Greg's push on Friday, but it's needed to build OHCI and EHCI with
CONFIG_USB_DEBUGwhen !CONFIG_PM.
I really have #ifdef's inside code. Even when it is in header files.
So I'd much rather just have two different functions, one in the CONFIG_PM section, and one in the !CONFIG_PM one. That's how we already do everything else in that header file (and how we handle PCI etc).
Linus
Quoted 2 lines · Linus Torvalds
So I'd much rather just have two different functions, one in the
CONFIG_PMsection, and one in the !CONFIG_PM one. That's how we already do everything else in that header file (and how we handle PCI etc).
More like this then? I'm not sure whether you'd prefer to apply that logic to the "struct pm_info" innards too. That file has multiple CONFIG_PM sections, too.
- Dave
include/linux/pm.h +18 -0
@@ -238,6 +238,24 @@#endif }; +#ifdef CONFIG_PM + +static inline u32 +device_pm_state (struct dev_pm_info *info) +{ +return info->power_state; +} + +#else + +static inline u32 +device_pm_state (struct dev_pm_info *info) +{ +return 0 ; +} + +#endif +extern void device_pm_set_parent (struct device * dev,struct device * parent);extern int device_suspend (u32 state);
drivers/usb/host/ehci-dbg.c +1 -1
@@ -639,7 +639,7 @@spin_lock_irqsave (&ehci->lock, flags); -if (bus->controller->power.power_state) { +if (device_pm_state (&bus->controller->power)) { size = scnprintf (next, size, "bus %s, device %s (driver " DRIVER_VERSION ")\n" "SUSPENDED (no register access)\n",
drivers/usb/host/ohci-dbg.c +1 -1
@@ -623,7 +623,7 @@ hcd->self.controller->bus_id, hcd_name); -if (bus->controller->power.power_state) { +if (device_pm_state (&bus->controller->power)) { size -=scnprintf (next, size,"SUSPENDED (no register access)\n" ); goto done;
Quoted 4 lines · David Brownell
More like this then? I'm not sure whether you'd prefer to apply that logic to the "struct
pm_info" innards too. That file has multipleCONFIG_PMsections, too.
I was thinking just putting it in the existing wrapper sections.
We already have wrappers for pm_register, pm_unregister, pm_unregister_all, pm_send, pm_send_all, etc etc, and this would seem to be just one more case like that.
The alternative is to just always have "power_state" in the "dev_pm_info", especially as some versions of gcc have had bugs with empty structures anyway.
Linus
Quoted 9 lines · Linus Torvalds
Quoted 3 lines · David Brownell
More like this then? I'm not sure whether you'd prefer to apply that logic to the "struct
pm_info" innards too. That file has multipleCONFIG_PMsections, too.I was thinking just putting it in the existing wrapper sections.
Wouldn't quite work without moving "struct pm_info" up higher in the file. Seems like that stuff still isn't fully sorted out yet, this may not be the best time to start.
Quoted 1 line
The alternative is to just always have "
power_state" in the "dev_pm_info", especially as some versions of gcc have had bugs with empty structures anyway.
That sounds like a much simpler fix.
- Dave
include/linux/pm.h +1 -1
@@ -229,8 +229,8 @@struct device ;struct dev_pm_info { -#ifdef CONFIG_PM u32 power_state; +#ifdef CONFIG_PM u8 * saved_state;atomic_t pm_users;struct device * pm_parent;
Quoted 8 lines · David Brownell
Quoted 2 lines · Linus Torvalds
... would never have
compiled with debugging on anyway.Speaking of which, please consider merging this. It missed Greg's push on Friday, but it's needed to build OHCI and EHCI with
CONFIG_USB_DEBUGwhen !CONFIG_PM.
I'm making up a few more patches to send to Linus tomorrow with a few bug fixes like this for the USB code. I'll fix this up properly...
thanks,
greg k-h
Quoted 2 lines · Linus Torvalds
Replace all "led" with "cytherm". The code was crap, and would never have compiled with debugging on anyway.
I fixed my crappy code. :)
drivers/usb/misc/cytherm.c +9 -9
@@ -122,12 +122,12 @@ retval =vendor_command (cytherm->udev,WRITE_RAM ,BRIGHTNESS , cytherm->brightness, buffer,8 );if (retval) -dev_dbg (&led->udev->dev,"retval = %d\n" , retval); +dev_dbg (&cytherm->udev->dev,"retval = %d\n" , retval);/* Inform µC that we have changed the brightness setting */ retval =vendor_command (cytherm->udev,WRITE_RAM ,BRIGHTNESS_SEM ,0x01 , buffer,8 );if (retval) -dev_dbg (&led->udev->dev,"retval = %d\n" , retval); +dev_dbg (&cytherm->udev->dev,"retval = %d\n" , retval);kfree (buffer);
@@ -161,13 +161,13 @@/* read temperature */ retval =vendor_command (cytherm->udev,READ_RAM ,TEMP ,0 , buffer,8 );if (retval) -dev_dbg (&led->udev->dev,"retval = %d\n" , retval); +dev_dbg (&cytherm->udev->dev,"retval = %d\n" , retval); temp = buffer[1 ];/* read sign */ retval =vendor_command (cytherm->udev,READ_RAM ,SIGN ,0 , buffer,8 );if (retval) -dev_dbg (&led->udev->dev,"retval = %d\n" , retval); +dev_dbg (&cytherm->udev->dev,"retval = %d\n" , retval); sign = buffer[1 ];kfree (buffer);
@@ -205,7 +205,7 @@/* check button */ retval =vendor_command (cytherm->udev,READ_RAM ,BUTTON ,0 , buffer,8 );if (retval) -dev_dbg (&led->udev->dev,"retval = %d\n" , retval); +dev_dbg (&cytherm->udev->dev,"retval = %d\n" , retval); retval = buffer[1 ];
@@ -242,7 +242,7 @@ retval =vendor_command (cytherm->udev,READ_PORT ,0 ,0 , buffer,8 );if (retval) -dev_dbg (&led->udev->dev,"retval = %d\n" , retval); +dev_dbg (&cytherm->udev->dev,"retval = %d\n" , retval); retval = buffer[1 ];
@@ -277,7 +277,7 @@ retval =vendor_command (cytherm->udev,WRITE_PORT ,0 , tmp, buffer,8 );if (retval) -dev_dbg (&led->udev->dev,"retval = %d\n" , retval); +dev_dbg (&cytherm->udev->dev,"retval = %d\n" , retval);kfree (buffer);
@@ -302,7 +302,7 @@ retval =vendor_command (cytherm->udev,READ_PORT ,1 ,0 , buffer,8 );if (retval) -dev_dbg (&led->udev->dev,"retval = %d\n" , retval); +dev_dbg (&cytherm->udev->dev,"retval = %d\n" , retval); retval = buffer[1 ];
@@ -337,7 +337,7 @@ retval =vendor_command (cytherm->udev,WRITE_PORT ,1 , tmp, buffer,8 );if (retval) -dev_dbg (&led->udev->dev,"retval = %d\n" , retval); +dev_dbg (&cytherm->udev->dev,"retval = %d\n" , retval);kfree (buffer);
Quoted 5 lines · Erik Rigtorp
Quoted 2 lines · Linus Torvalds
Replace all "led" with "cytherm". The code was crap, and would never have compiled with debugging on anyway.
I fixed my crappy code. :)
Linus already did it for you, the tree is fixed :)
thanks,
greg k-h