Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 23 May 2011 19:33:02 +0000 (12:33 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 23 May 2011 19:33:02 +0000 (12:33 -0700)
* 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (205 commits)
  USB: EHCI: Remove SPARC_LEON {read,write}_be definitions from ehci.h
  USB: UHCI: Support big endian GRUSBHC HC
  sparc: add {read,write}*_be routines
  USB: UHCI: Add support for big endian descriptors
  USB: UHCI: Use ACCESS_ONCE rather than using a full compiler barrier
  USB: UHCI: Add support for big endian mmio
  usb-storage: Correct adjust_quirks to include latest flags
  usb/isp1760: Fix possible unlink problems
  usb/isp1760: Move function isp1760_endpoint_disable() within file.
  USB: remove remaining usages of hcd->state from usbcore and fix regression
  usb: musb: ux500: add configuration and build options for ux500 dma
  usb: musb: ux500: add dma glue layer for ux500
  usb: musb: ux500: add dma name for ux500
  usb: musb: ux500: add ux500 specific code for gadget side
  usb: musb: fix compile error
  usb-storage: fix up the unusual_realtek device list
  USB: gadget: f_audio: Fix invalid dereference of initdata
  EHCI: don't rescan interrupt QHs needlessly
  OHCI: fix regression caused by nVidia shutdown workaround
  USB: OTG: msm: Free VCCCX regulator even if we can't set the voltage
  ...

1  2 
Documentation/kernel-parameters.txt
MAINTAINERS
drivers/Makefile
drivers/hid/hid-core.c
drivers/hid/hid-ids.h
drivers/usb/host/sl811-hcd.c
drivers/usb/host/uhci-hcd.c
drivers/usb/misc/usbtest.c

@@@ -245,7 -245,7 +245,7 @@@ bytes respectively. Such letter suffixe
  
        acpi_sleep=     [HW,ACPI] Sleep options
                        Format: { s3_bios, s3_mode, s3_beep, s4_nohwsig,
 -                                old_ordering, s4_nonvs, sci_force_enable }
 +                                old_ordering, nonvs, sci_force_enable }
                        See Documentation/power/video.txt for information on
                        s3_bios and s3_mode.
                        s3_beep is for debugging; it makes the PC's speaker beep
                        noexec=on: enable non-executable mappings (default)
                        noexec=off: disable non-executable mappings
  
 +      nosmep          [X86]
 +                      Disable SMEP (Supervisor Mode Execution Protection)
 +                      even if it is supported by processor.
 +
        noexec32        [X86-64]
                        This affects only 32-bit executables.
                        noexec32=on: enable non-executable mappings (default)
                                        bytes of sense data);
                                c = FIX_CAPACITY (decrease the reported
                                        device capacity by one sector);
+                               d = NO_READ_DISC_INFO (don't use
+                                       READ_DISC_INFO command);
+                               e = NO_READ_CAPACITY_16 (don't use
+                                       READ_CAPACITY_16 command);
                                h = CAPACITY_HEURISTICS (decrease the
                                        reported device capacity by one
                                        sector if the number is odd);
diff --combined MAINTAINERS
@@@ -405,8 -405,8 +405,8 @@@ S: Maintaine
  F:    sound/oss/aedsp16.c
  
  AFFS FILE SYSTEM
 -M:    Roman Zippel <zippel@linux-m68k.org>
 -S:    Maintained
 +L:    linux-fsdevel@vger.kernel.org
 +S:    Orphan
  F:    Documentation/filesystems/affs.txt
  F:    fs/affs/
  
@@@ -548,11 -548,10 +548,11 @@@ S:      Maintaine
  F:    sound/aoa/
  
  APM DRIVER
 -L:    linux-laptop@vger.kernel.org
 -S:    Orphan
 +M:    Jiri Kosina <jkosina@suse.cz>
 +S:    Odd fixes
  F:    arch/x86/kernel/apm_32.c
  F:    include/linux/apm_bios.h
 +F:    drivers/char/apm-emulation.c
  
  APPLE BCM5974 MULTITOUCH DRIVER
  M:    Henrik Rydberg <rydberg@euromail.se>
@@@ -730,7 -729,7 +730,7 @@@ ARM/EZX SMARTPHONES (A780, A910, A1200
  M:    Daniel Ribeiro <drwyrm@gmail.com>
  M:    Stefan Schmidt <stefan@openezx.org>
  M:    Harald Welte <laforge@openezx.org>
 -L:    openezx-devel@lists.openezx.org (subscribers-only)
 +L:    openezx-devel@lists.openezx.org (moderated for non-subscribers)
  W:    http://www.openezx.org/
  S:    Maintained
  T:    topgit git://git.openezx.org/openezx.git
@@@ -1233,6 -1232,13 +1233,6 @@@ W:     http://wireless.kernel.org/en/users/
  S:    Supported
  F:    drivers/net/wireless/ath/ath9k/
  
 -ATHEROS AR9170 WIRELESS DRIVER
 -M:    Christian Lamparter <chunkeey@web.de>
 -L:    linux-wireless@vger.kernel.org
 -W:    http://wireless.kernel.org/en/users/Drivers/ar9170
 -S:    Obsolete
 -F:    drivers/net/wireless/ath/ar9170/
 -
  CARL9170 LINUX COMMUNITY WIRELESS DRIVER
  M:    Christian Lamparter <chunkeey@googlemail.com>
  L:    linux-wireless@vger.kernel.org
@@@ -2807,19 -2813,38 +2807,19 @@@ F:   Documentation/gpio.tx
  F:    drivers/gpio/
  F:    include/linux/gpio*
  
 +GRE DEMULTIPLEXER DRIVER
 +M:    Dmitry Kozlov <xeb@mail.ru>
 +L:    netdev@vger.kernel.org
 +S:    Maintained
 +F:    net/ipv4/gre.c
 +F:    include/net/gre.h
 +
  GRETH 10/100/1G Ethernet MAC device driver
  M:    Kristoffer Glembo <kristoffer@gaisler.com>
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    drivers/net/greth*
  
 -HARD DRIVE ACTIVE PROTECTION SYSTEM (HDAPS) DRIVER
 -M:    Frank Seidel <frank@f-seidel.de>
 -L:    platform-driver-x86@vger.kernel.org
 -W:    http://www.kernel.org/pub/linux/kernel/people/fseidel/hdaps/
 -S:    Maintained
 -F:    drivers/platform/x86/hdaps.c
 -
 -HWPOISON MEMORY FAILURE HANDLING
 -M:    Andi Kleen <andi@firstfloor.org>
 -L:    linux-mm@kvack.org
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-mce-2.6.git hwpoison
 -S:    Maintained
 -F:    mm/memory-failure.c
 -F:    mm/hwpoison-inject.c
 -
 -HYPERVISOR VIRTUAL CONSOLE DRIVER
 -L:    linuxppc-dev@lists.ozlabs.org
 -S:    Odd Fixes
 -F:    drivers/tty/hvc/
 -
 -iSCSI BOOT FIRMWARE TABLE (iBFT) DRIVER
 -M:    Peter Jones <pjones@redhat.com>
 -M:    Konrad Rzeszutek Wilk <konrad@kernel.org>
 -S:    Maintained
 -F:    drivers/firmware/iscsi_ibft*
 -
  GSPCA FINEPIX SUBDRIVER
  M:    Frank Zago <frank@zago.net>
  L:    linux-media@vger.kernel.org
@@@ -2870,26 -2895,6 +2870,26 @@@ T:    git git://git.kernel.org/pub/scm/lin
  S:    Maintained
  F:    drivers/media/video/gspca/
  
 +HARD DRIVE ACTIVE PROTECTION SYSTEM (HDAPS) DRIVER
 +M:    Frank Seidel <frank@f-seidel.de>
 +L:    platform-driver-x86@vger.kernel.org
 +W:    http://www.kernel.org/pub/linux/kernel/people/fseidel/hdaps/
 +S:    Maintained
 +F:    drivers/platform/x86/hdaps.c
 +
 +HWPOISON MEMORY FAILURE HANDLING
 +M:    Andi Kleen <andi@firstfloor.org>
 +L:    linux-mm@kvack.org
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-mce-2.6.git hwpoison
 +S:    Maintained
 +F:    mm/memory-failure.c
 +F:    mm/hwpoison-inject.c
 +
 +HYPERVISOR VIRTUAL CONSOLE DRIVER
 +L:    linuxppc-dev@lists.ozlabs.org
 +S:    Odd Fixes
 +F:    drivers/tty/hvc/
 +
  HARDWARE MONITORING
  M:    Jean Delvare <khali@linux-fr.org>
  M:    Guenter Roeck <guenter.roeck@ericsson.com>
@@@ -2940,8 -2945,8 +2940,8 @@@ F:      drivers/block/cciss
  F:    include/linux/cciss_ioctl.h
  
  HFS FILESYSTEM
 -M:    Roman Zippel <zippel@linux-m68k.org>
 -S:    Maintained
 +L:    linux-fsdevel@vger.kernel.org
 +S:    Orphan
  F:    Documentation/filesystems/hfs.txt
  F:    fs/hfs/
  
@@@ -3357,12 -3362,6 +3357,12 @@@ F:    Documentation/wimax/README.i2400
  F:    drivers/net/wimax/i2400m/
  F:    include/linux/wimax/i2400m.h
  
 +INTEL WIRELESS 3945ABG/BG, 4965AGN (iwlegacy)
 +M:    Stanislaw Gruszka <sgruszka@redhat.com>
 +L:    linux-wireless@vger.kernel.org
 +S:    Supported
 +F:    drivers/net/wireless/iwlegacy/
 +
  INTEL WIRELESS WIFI LINK (iwlwifi)
  M:    Wey-Yi Guy <wey-yi.w.guy@intel.com>
  M:    Intel Linux Wireless <ilw@linux.intel.com>
@@@ -3479,12 -3478,6 +3479,12 @@@ F:    Documentation/isapnp.tx
  F:    drivers/pnp/isapnp/
  F:    include/linux/isapnp.h
  
 +iSCSI BOOT FIRMWARE TABLE (iBFT) DRIVER
 +M:    Peter Jones <pjones@redhat.com>
 +M:    Konrad Rzeszutek Wilk <konrad@kernel.org>
 +S:    Maintained
 +F:    drivers/firmware/iscsi_ibft*
 +
  ISCSI
  M:    Mike Christie <michaelc@cs.wisc.edu>
  L:    open-iscsi@googlegroups.com
@@@ -3814,7 -3807,7 +3814,7 @@@ M:      Rusty Russell <rusty@rustcorp.com.au
  L:    lguest@lists.ozlabs.org
  W:    http://lguest.ozlabs.org/
  S:    Odd Fixes
 -F:    Documentation/lguest/
 +F:    Documentation/virtual/lguest/
  F:    arch/x86/lguest/
  F:    drivers/lguest/
  F:    include/linux/lguest*.h
@@@ -4001,6 -3994,7 +4001,6 @@@ F:      arch/m32r
  
  M68K ARCHITECTURE
  M:    Geert Uytterhoeven <geert@linux-m68k.org>
 -M:    Roman Zippel <zippel@linux-m68k.org>
  L:    linux-m68k@lists.linux-m68k.org
  W:    http://www.linux-m68k.org/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k.git
@@@ -4253,7 -4247,7 +4253,7 @@@ F:      include/linux/isicom.
  MUSB MULTIPOINT HIGH SPEED DUAL-ROLE CONTROLLER
  M:    Felipe Balbi <balbi@ti.com>
  L:    linux-usb@vger.kernel.org
- T:    git git://gitorious.org/usb/usb.git
+ T:    git git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git
  S:    Maintained
  F:    drivers/usb/musb/
  
@@@ -4270,13 -4264,6 +4270,13 @@@ M:    Tim Hockin <thockin@hockin.org
  S:    Maintained
  F:    drivers/net/natsemi.c
  
 +NATIVE INSTRUMENTS USB SOUND INTERFACE DRIVER
 +M:    Daniel Mack <zonque@gmail.com>
 +S:    Maintained
 +L:    alsa-devel@alsa-project.org
 +W:    http://www.native-instruments.com
 +F:    sound/usb/caiaq/
 +
  NCP FILESYSTEM
  M:    Petr Vandrovec <petr@vandrovec.name>
  S:    Odd Fixes
@@@ -4392,7 -4379,6 +4392,7 @@@ S:      Maintaine
  F:    net/ipv4/
  F:    net/ipv6/
  F:    include/net/ip*
 +F:    arch/x86/net/*
  
  NETWORKING [LABELED] (NetLabel, CIPSO, Labeled IPsec, SECMARK)
  M:    Paul Moore <paul.moore@hp.com>
@@@ -4588,6 -4574,7 +4588,7 @@@ M:      Felipe Balbi <balbi@ti.com
  M:    David Brownell <dbrownell@users.sourceforge.net>
  L:    linux-usb@vger.kernel.org
  L:    linux-omap@vger.kernel.org
+ T:    git git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git
  S:    Maintained
  F:    drivers/usb/*/*omap*
  F:    arch/arm/*omap*/usb*
@@@ -5003,13 -4990,6 +5004,13 @@@ F:    Documentation/pps
  F:    drivers/pps/
  F:    include/linux/pps*.h
  
 +PPTP DRIVER
 +M:    Dmitry Kozlov <xeb@mail.ru>
 +L:    netdev@vger.kernel.org
 +S:    Maintained
 +F:    drivers/net/pptp.c
 +W:    http://sourceforge.net/projects/accel-pptp
 +
  PREEMPTIBLE KERNEL
  M:    Robert Love <rml@tech9.net>
  L:    kpreempt-tech@lists.sourceforge.net
@@@ -5439,7 -5419,6 +5440,7 @@@ F:      include/linux/timex.
  F:    kernel/time/clocksource.c
  F:    kernel/time/time*.c
  F:    kernel/time/ntp.c
 +F:    drivers/clocksource
  
  TLG2300 VIDEO4LINUX-2 DRIVER
  M:    Huang Shijie <shijie8@gmail.com>
@@@ -5620,9 -5599,9 +5621,9 @@@ F:      include/linux/ata.
  F:    include/linux/libata.h
  
  SERVER ENGINES 10Gbps iSCSI - BladeEngine 2 DRIVER
 -M:    Jayamohan Kallickal <jayamohank@serverengines.com>
 +M:    Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
  L:    linux-scsi@vger.kernel.org
 -W:    http://www.serverengines.com
 +W:    http://www.emulex.com
  S:    Supported
  F:    drivers/scsi/be2iscsi/
  
@@@ -5840,13 -5819,6 +5841,13 @@@ S:    Maintaine
  F:    drivers/ssb/
  F:    include/linux/ssb/
  
 +BROADCOM SPECIFIC AMBA DRIVER (BCMA)
 +M:    RafaÅ‚ MiÅ‚ecki <zajec5@gmail.com>
 +L:    linux-wireless@vger.kernel.org
 +S:    Maintained
 +F:    drivers/bcma/
 +F:    include/linux/bcma/
 +
  SONY VAIO CONTROL DEVICE DRIVER
  M:    Mattia Dongili <malattia@linux.it>
  L:    platform-driver-x86@vger.kernel.org
@@@ -5876,7 -5848,7 +5877,7 @@@ F:      include/sound
  F:    sound/
  
  SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEMENT (ASoC)
 -M:    Liam Girdwood <lrg@slimlogic.co.uk>
 +M:    Liam Girdwood <lrg@ti.com>
  M:    Mark Brown <broonie@opensource.wolfsonmicro.com>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6.git
  L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
@@@ -6127,7 -6099,7 +6128,7 @@@ F:      drivers/mmc/host/tifm_sd.
  F:    include/linux/tifm.h
  
  TI TWL4030 SERIES SOC CODEC DRIVER
 -M:    Peter Ujfalusi <peter.ujfalusi@nokia.com>
 +M:    Peter Ujfalusi <peter.ujfalusi@ti.com>
  L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
  S:    Maintained
  F:    sound/soc/codecs/twl4030*
@@@ -6230,7 -6202,6 +6231,7 @@@ TRIVIAL PATCHE
  M:    Jiri Kosina <trivial@kernel.org>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial.git
  S:    Maintained
 +K:    ^Subject:.*(?i)trivial
  
  TTY LAYER
  M:    Greg Kroah-Hartman <gregkh@suse.de>
@@@ -6648,7 -6619,7 +6649,7 @@@ L:      user-mode-linux-devel@lists.sourcefo
  L:    user-mode-linux-user@lists.sourceforge.net
  W:    http://user-mode-linux.sourceforge.net
  S:    Maintained
 -F:    Documentation/uml/
 +F:    Documentation/virtual/uml/
  F:    arch/um/
  F:    fs/hostfs/
  F:    fs/hppfs/
@@@ -6772,7 -6743,7 +6773,7 @@@ F:      drivers/scsi/vmw_pvscsi.
  F:    drivers/scsi/vmw_pvscsi.h
  
  VOLTAGE AND CURRENT REGULATOR FRAMEWORK
 -M:    Liam Girdwood <lrg@slimlogic.co.uk>
 +M:    Liam Girdwood <lrg@ti.com>
  M:    Mark Brown <broonie@opensource.wolfsonmicro.com>
  W:    http://opensource.wolfsonmicro.com/node/15
  W:    http://www.slimlogic.co.uk/?p=48
@@@ -7054,6 -7025,20 +7055,6 @@@ M:     "Maciej W. Rozycki" <macro@linux-mip
  S:    Maintained
  F:    drivers/tty/serial/zs.*
  
 -GRE DEMULTIPLEXER DRIVER
 -M:    Dmitry Kozlov <xeb@mail.ru>
 -L:    netdev@vger.kernel.org
 -S:    Maintained
 -F:    net/ipv4/gre.c
 -F:    include/net/gre.h
 -
 -PPTP DRIVER
 -M:    Dmitry Kozlov <xeb@mail.ru>
 -L:    netdev@vger.kernel.org
 -S:    Maintained
 -F:    drivers/net/pptp.c
 -W:    http://sourceforge.net/projects/accel-pptp
 -
  THE REST
  M:    Linus Torvalds <torvalds@linux-foundation.org>
  L:    linux-kernel@vger.kernel.org
diff --combined drivers/Makefile
@@@ -64,11 -64,10 +64,10 @@@ obj-$(CONFIG_ATA_OVER_ETH) += block/aoe
  obj-$(CONFIG_PARIDE)          += block/paride/
  obj-$(CONFIG_TC)              += tc/
  obj-$(CONFIG_UWB)             += uwb/
- obj-$(CONFIG_USB_OTG_UTILS)   += usb/otg/
+ obj-$(CONFIG_USB_OTG_UTILS)   += usb/
  obj-$(CONFIG_USB)             += usb/
- obj-$(CONFIG_USB_MUSB_HDRC)   += usb/musb/
  obj-$(CONFIG_PCI)             += usb/
- obj-$(CONFIG_USB_GADGET)      += usb/gadget/
+ obj-$(CONFIG_USB_GADGET)      += usb/
  obj-$(CONFIG_SERIO)           += input/serio/
  obj-$(CONFIG_GAMEPORT)                += input/gameport/
  obj-$(CONFIG_INPUT)           += input/
@@@ -110,7 -109,6 +109,7 @@@ obj-$(CONFIG_HID)          += hid
  obj-$(CONFIG_PPC_PS3)         += ps3/
  obj-$(CONFIG_OF)              += of/
  obj-$(CONFIG_SSB)             += ssb/
 +obj-$(CONFIG_BCMA)            += bcma/
  obj-$(CONFIG_VHOST_NET)               += vhost/
  obj-$(CONFIG_VLYNQ)           += vlynq/
  obj-$(CONFIG_STAGING)         += staging/
diff --combined drivers/hid/hid-core.c
@@@ -1045,9 -1045,6 +1045,9 @@@ void hid_report_raw_event(struct hid_de
  
        rsize = ((report->size - 1) >> 3) + 1;
  
 +      if (rsize > HID_MAX_BUFFER_SIZE)
 +              rsize = HID_MAX_BUFFER_SIZE;
 +
        if (csize < rsize) {
                dbg_hid("report %d is too short, (%d < %d)\n", report->id,
                                csize, rsize);
@@@ -1293,7 -1290,6 +1293,7 @@@ static const struct hid_device_id hid_h
        { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_X5_005D) },
        { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_RP_649) },
        { HID_USB_DEVICE(USB_VENDOR_ID_ACRUX, 0x0802) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_ACTIONSTAR, USB_DEVICE_ID_ACTIONSTAR_1011) },
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ATV_IRCONTROL) },
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4) },
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE) },
        { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_TACTICAL_PAD) },
        { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS) },
        { HID_USB_DEVICE(USB_VENDOR_ID_CREATIVELABS, USB_DEVICE_ID_PRODIKEYS_PCMIDI) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_CVTOUCH, USB_DEVICE_ID_CVTOUCH_SCREEN) },
        { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_1) },
        { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_2) },
        { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_3) },
        { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH3) },
        { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH4) },
        { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2515) },
        { HID_USB_DEVICE(USB_VENDOR_ID_EMS, USB_DEVICE_ID_EMS_TRIO_LINKER_PLUS_II) },
        { HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) },
        { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) },
        { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR) },
        { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, USB_DEVICE_ID_GENERAL_TOUCH_WIN7_TWOFINGERS) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_GOODTOUCH, USB_DEVICE_ID_GOODTOUCH_000f) },
        { HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, 0x0003) },
        { HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, 0x0012) },
        { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE) },
        { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_2) },
        { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_3) },
        { HID_USB_DEVICE(USB_VENDOR_ID_HANVON, USB_DEVICE_ID_HANVON_MULTITOUCH) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_ILITEK, USB_DEVICE_ID_ILITEK_MULTITOUCH) },
        { HID_USB_DEVICE(USB_VENDOR_ID_IRTOUCHSYSTEMS, USB_DEVICE_ID_IRTOUCH_INFRARED_USB) },
        { HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) },
        { HID_USB_DEVICE(USB_VENDOR_ID_KEYTOUCH, USB_DEVICE_ID_KEYTOUCH_IEC) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOMO_WHEEL2) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_DFP_WHEEL) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G25_WHEEL) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G27_WHEEL) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WII_WHEEL) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_SPACETRAVELLER) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_SPACENAVIGATOR) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_LUMIO, USB_DEVICE_ID_CRYSTALTOUCH) },
        { HID_USB_DEVICE(USB_VENDOR_ID_MICROCHIP, USB_DEVICE_ID_PICOLCD) },
        { HID_USB_DEVICE(USB_VENDOR_ID_MICROCHIP, USB_DEVICE_ID_PICOLCD_BOOTLOADER) },
        { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_SIDEWINDER_GV) },
        { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_18) },
        { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_PKB1700) },
        { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT, USB_DEVICE_ID_PENMOUNT_PCI) },
        { HID_USB_DEVICE(USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE) },
        { HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH) },
        { HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN) },
        { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE) },
        { HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) },
        { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER) },
        { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
        { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE) },
        { HID_USB_DEVICE(USB_VENDOR_ID_STANTUM, USB_DEVICE_ID_MTP) },
        { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb65a) },
        { HID_USB_DEVICE(USB_VENDOR_ID_TOPSEED, USB_DEVICE_ID_TOPSEED_CYBERLINK) },
        { HID_USB_DEVICE(USB_VENDOR_ID_TOPSEED2, USB_DEVICE_ID_TOPSEED2_RF_COMBO) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_TOUCH_INTL, USB_DEVICE_ID_TOUCH_INTL_MULTI_TOUCH) },
        { HID_USB_DEVICE(USB_VENDOR_ID_TWINHAN, USB_DEVICE_ID_TWINHAN_IR_REMOTE) },
        { HID_USB_DEVICE(USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_TURBOX_TOUCHSCREEN_MOSART) },
        { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_PF1209) },
        { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_WP4030U) },
        { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_WP5540U) },
        { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_WP8060U) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_UNITEC, USB_DEVICE_ID_UNITEC_USB_TOUCH_0709) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_UNITEC, USB_DEVICE_ID_UNITEC_USB_TOUCH_0A19) },
        { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_SMARTJOY_PLUS) },
        { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE_BLUETOOTH) },
        { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_SLIM_TABLET_5_8_INCH) },
@@@ -1775,19 -1760,37 +1775,37 @@@ static const struct hid_device_id hid_i
        { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_GPEN_560) },
        { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_KYE, 0x0058) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_CASSY) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_CASSY2) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_POCKETCASSY) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_POCKETCASSY2) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MOBILECASSY) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MOBILECASSY2) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYVOLTAGE) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYCURRENT) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYTIME) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYTEMPERATURE) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYPH) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_JWM) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_DMMP) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_UMIP) },
-       { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_XRAY1) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_UMIC) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_UMIB) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_XRAY) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_XRAY2) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_VIDEOCOM) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MOTOR) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_COM3LAB) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_TELEPORT) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_NETWORKANALYSER) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_POWERCONTROL) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MACHINETEST) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MOSTANALYSER) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MOSTANALYSER2) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_ABSESP) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_AUTODATABUS) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MCT) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_HYBRID) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_HEATCONTROL) },
        { HID_USB_DEVICE(USB_VENDOR_ID_MCC, USB_DEVICE_ID_MCC_PMD1024LS) },
        { HID_USB_DEVICE(USB_VENDOR_ID_MCC, USB_DEVICE_ID_MCC_PMD1208LS) },
        { HID_USB_DEVICE(USB_VENDOR_ID_MICROCHIP, USB_DEVICE_ID_PICKIT1) },
diff --combined drivers/hid/hid-ids.h
@@@ -37,9 -37,6 +37,9 @@@
  
  #define USB_VENDOR_ID_ACRUX           0x1a34
  
 +#define USB_VENDOR_ID_ACTIONSTAR      0x2101
 +#define USB_DEVICE_ID_ACTIONSTAR_1011 0x1011
 +
  #define USB_VENDOR_ID_ADS_TECH                0x06e1
  #define USB_DEVICE_ID_ADS_TECH_RADIO_SI470X   0xa155
  
  #define USB_VENDOR_ID_CREATIVELABS    0x041e
  #define USB_DEVICE_ID_PRODIKEYS_PCMIDI        0x2801
  
 +#define USB_VENDOR_ID_CVTOUCH         0x1ff7
 +#define USB_DEVICE_ID_CVTOUCH_SCREEN  0x0013
 +
  #define USB_VENDOR_ID_CYGNAL          0x10c4
  #define USB_DEVICE_ID_CYGNAL_RADIO_SI470X     0x818a
  
  #define USB_VENDOR_ID_DREAM_CHEEKY    0x1d34
  
  #define USB_VENDOR_ID_ELO             0x04E7
 +#define USB_DEVICE_ID_ELO_TS2515      0x0022
  #define USB_DEVICE_ID_ELO_TS2700      0x0020
  
  #define USB_VENDOR_ID_EMS             0x2006
  #define USB_DEVICE_ID_0_8_8_IF_KIT    0x0053
  #define USB_DEVICE_ID_PHIDGET_MOTORCONTROL    0x0058
  
 +#define USB_VENDOR_ID_GOODTOUCH               0x1aad
 +#define USB_DEVICE_ID_GOODTOUCH_000f  0x000f
 +
  #define USB_VENDOR_ID_GOTOP           0x08f2
  #define USB_DEVICE_ID_SUPER_Q2                0x007f
  #define USB_DEVICE_ID_GOGOPEN         0x00ce
  #define USB_DEVICE_ID_UGCI_FLYING     0x0020
  #define USB_DEVICE_ID_UGCI_FIGHTING   0x0030
  
 +#define USB_VENDOR_ID_ILITEK          0x222a
 +#define USB_DEVICE_ID_ILITEK_MULTITOUCH       0x0001
 +
  #define USB_VENDOR_ID_IMATION         0x0718
  #define USB_DEVICE_ID_DISC_STAKKA     0xd000
  
  
  #define USB_VENDOR_ID_LD              0x0f11
  #define USB_DEVICE_ID_LD_CASSY                0x1000
+ #define USB_DEVICE_ID_LD_CASSY2               0x1001
  #define USB_DEVICE_ID_LD_POCKETCASSY  0x1010
+ #define USB_DEVICE_ID_LD_POCKETCASSY2 0x1011
  #define USB_DEVICE_ID_LD_MOBILECASSY  0x1020
+ #define USB_DEVICE_ID_LD_MOBILECASSY2 0x1021
+ #define USB_DEVICE_ID_LD_MICROCASSYVOLTAGE    0x1031
+ #define USB_DEVICE_ID_LD_MICROCASSYCURRENT    0x1032
+ #define USB_DEVICE_ID_LD_MICROCASSYTIME               0x1033
+ #define USB_DEVICE_ID_LD_MICROCASSYTEMPERATURE        0x1035
+ #define USB_DEVICE_ID_LD_MICROCASSYPH         0x1038
  #define USB_DEVICE_ID_LD_JWM          0x1080
  #define USB_DEVICE_ID_LD_DMMP         0x1081
  #define USB_DEVICE_ID_LD_UMIP         0x1090
- #define USB_DEVICE_ID_LD_XRAY1                0x1100
+ #define USB_DEVICE_ID_LD_UMIC         0x10A0
+ #define USB_DEVICE_ID_LD_UMIB         0x10B0
+ #define USB_DEVICE_ID_LD_XRAY         0x1100
  #define USB_DEVICE_ID_LD_XRAY2                0x1101
+ #define USB_DEVICE_ID_LD_XRAYCT               0x1110
  #define USB_DEVICE_ID_LD_VIDEOCOM     0x1200
+ #define USB_DEVICE_ID_LD_MOTOR                0x1210
  #define USB_DEVICE_ID_LD_COM3LAB      0x2000
  #define USB_DEVICE_ID_LD_TELEPORT     0x2010
  #define USB_DEVICE_ID_LD_NETWORKANALYSER 0x2020
  #define USB_DEVICE_ID_LD_POWERCONTROL 0x2030
  #define USB_DEVICE_ID_LD_MACHINETEST  0x2040
+ #define USB_DEVICE_ID_LD_MOSTANALYSER 0x2050
+ #define USB_DEVICE_ID_LD_MOSTANALYSER2        0x2051
+ #define USB_DEVICE_ID_LD_ABSESP               0x2060
+ #define USB_DEVICE_ID_LD_AUTODATABUS  0x2070
+ #define USB_DEVICE_ID_LD_MCT          0x2080
+ #define USB_DEVICE_ID_LD_HYBRID               0x2090
+ #define USB_DEVICE_ID_LD_HEATCONTROL  0x20A0
  
  #define USB_VENDOR_ID_LOGITECH                0x046d
  #define USB_DEVICE_ID_LOGITECH_RECEIVER       0xc101
  #define USB_DEVICE_ID_LOGITECH_MOMO_WHEEL     0xc295
  #define USB_DEVICE_ID_LOGITECH_DFP_WHEEL      0xc298
  #define USB_DEVICE_ID_LOGITECH_G25_WHEEL      0xc299
 +#define USB_DEVICE_ID_LOGITECH_G27_WHEEL      0xc29b
  #define USB_DEVICE_ID_LOGITECH_WII_WHEEL      0xc29c
  #define USB_DEVICE_ID_LOGITECH_ELITE_KBD      0xc30a
  #define USB_DEVICE_ID_S510_RECEIVER   0xc50c
  #define USB_DEVICE_ID_DINOVO_MINI     0xc71f
  #define USB_DEVICE_ID_LOGITECH_MOMO_WHEEL2    0xca03
  
 +#define USB_VENDOR_ID_LUMIO           0x202e
 +#define USB_DEVICE_ID_CRYSTALTOUCH    0x0006
 +
  #define USB_VENDOR_ID_MCC             0x09db
  #define USB_DEVICE_ID_MCC_PMD1024LS   0x0076
  #define USB_DEVICE_ID_MCC_PMD1208LS   0x007a
  #define USB_VENDOR_ID_PANTHERLORD     0x0810
  #define USB_DEVICE_ID_PANTHERLORD_TWIN_USB_JOYSTICK   0x0001
  
 +#define USB_VENDOR_ID_PENMOUNT                0x14e1
 +#define USB_DEVICE_ID_PENMOUNT_PCI    0x3500
 +
  #define USB_VENDOR_ID_PETALYNX                0x18b1
  #define USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE  0x0037
  
  #define USB_VENDOR_ID_SONY                    0x054c
  #define USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE     0x024b
  #define USB_DEVICE_ID_SONY_PS3_CONTROLLER     0x0268
 +#define USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER      0x042f
  
  #define USB_VENDOR_ID_SOUNDGRAPH      0x15c2
  #define USB_DEVICE_ID_SOUNDGRAPH_IMON_FIRST   0x0034
  #define USB_VENDOR_ID_SUNPLUS         0x04fc
  #define USB_DEVICE_ID_SUNPLUS_WDESKTOP        0x05d8
  
 +#define USB_VENDOR_ID_SYMBOL          0x05e0
 +#define USB_DEVICE_ID_SYMBOL_SCANNER_1        0x0800
 +#define USB_DEVICE_ID_SYMBOL_SCANNER_2        0x1300
 +
  #define USB_VENDOR_ID_THRUSTMASTER    0x044f
  
  #define USB_VENDOR_ID_TOPSEED         0x0766
  #define USB_VENDOR_ID_TOPMAX          0x0663
  #define USB_DEVICE_ID_TOPMAX_COBRAPAD 0x0103
  
 +#define USB_VENDOR_ID_TOUCH_INTL      0x1e5e
 +#define USB_DEVICE_ID_TOUCH_INTL_MULTI_TOUCH  0x0313
 +
  #define USB_VENDOR_ID_TOUCHPACK               0x1bfd
  #define USB_DEVICE_ID_TOUCHPACK_RTS   0x1688
  
  #define USB_DEVICE_ID_UCLOGIC_TABLET_WP5540U  0x0004
  #define USB_DEVICE_ID_UCLOGIC_TABLET_WP8060U  0x0005
  
 +#define USB_VENDOR_ID_UNITEC  0x227d
 +#define USB_DEVICE_ID_UNITEC_USB_TOUCH_0709   0x0709
 +#define USB_DEVICE_ID_UNITEC_USB_TOUCH_0A19   0x0a19
 +
  #define USB_VENDOR_ID_VERNIER         0x08f7
  #define USB_DEVICE_ID_VERNIER_LABPRO  0x0001
  #define USB_DEVICE_ID_VERNIER_GOTEMP  0x0002
@@@ -47,7 -47,6 +47,7 @@@
  #include <linux/usb/sl811.h>
  #include <linux/usb/hcd.h>
  #include <linux/platform_device.h>
 +#include <linux/prefetch.h>
  
  #include <asm/io.h>
  #include <asm/irq.h>
@@@ -72,12 -71,6 +72,6 @@@ MODULE_ALIAS("platform:sl811-hcd")
  /* for now, use only one transfer register bank */
  #undef        USE_B
  
- /* this doesn't understand urb->iso_frame_desc[], but if you had a driver
-  * that just queued one ISO frame per URB then iso transfers "should" work
-  * using the normal urb status fields.
-  */
- #define       DISABLE_ISO
  // #define    QUIRK2
  #define       QUIRK3
  
@@@ -808,7 -801,7 +802,7 @@@ static int sl811h_urb_enqueue
        int                     retval;
        struct usb_host_endpoint        *hep = urb->ep;
  
- #ifdef        DISABLE_ISO
+ #ifndef CONFIG_USB_SL811_HCD_ISO
        if (type == PIPE_ISOCHRONOUS)
                return -ENOSPC;
  #endif
  #include <asm/system.h>
  
  #include "uhci-hcd.h"
- #include "pci-quirks.h"
  
  /*
   * Version Information
   */
 -#define DRIVER_AUTHOR "Linus 'Frodo Rabbit' Torvalds, Johannes Erdfelt, \
 -Randy Dunlap, Georg Acher, Deti Fliegl, Thomas Sailer, Roman Weissgaerber, \
 -Alan Stern"
 +#define DRIVER_AUTHOR                                                 \
 +      "Linus 'Frodo Rabbit' Torvalds, Johannes Erdfelt, "             \
 +      "Randy Dunlap, Georg Acher, Deti Fliegl, Thomas Sailer, "       \
 +      "Roman Weissgaerber, Alan Stern"
  #define DRIVER_DESC "USB Universal Host Controller Interface driver"
  
  /* for flakey hardware, ignore overcurrent indicators */
@@@ -94,7 -92,7 +93,7 @@@ static void uhci_get_current_frame_numb
  /*
   * Calculate the link pointer DMA value for the first Skeleton QH in a frame.
   */
- static __le32 uhci_frame_skel_link(struct uhci_hcd *uhci, int frame)
+ static __hc32 uhci_frame_skel_link(struct uhci_hcd *uhci, int frame)
  {
        int skelnum;
  
        skelnum = 8 - (int) __ffs(frame | UHCI_NUMFRAMES);
        if (skelnum <= 1)
                skelnum = 9;
-       return LINK_TO_QH(uhci->skelqh[skelnum]);
+       return LINK_TO_QH(uhci, uhci->skelqh[skelnum]);
  }
  
  #include "uhci-debug.c"
@@@ -135,15 -133,12 +134,12 @@@ static void finish_reset(struct uhci_hc
         * We have to clear them by hand.
         */
        for (port = 0; port < uhci->rh_numports; ++port)
-               outw(0, uhci->io_addr + USBPORTSC1 + (port * 2));
+               uhci_writew(uhci, 0, USBPORTSC1 + (port * 2));
  
        uhci->port_c_suspend = uhci->resuming_ports = 0;
        uhci->rh_state = UHCI_RH_RESET;
        uhci->is_stopped = UHCI_IS_STOPPED;
-       uhci_to_hcd(uhci)->state = HC_STATE_HALT;
        clear_bit(HCD_FLAG_POLL_RH, &uhci_to_hcd(uhci)->flags);
-       uhci->dead = 0;         /* Full reset resurrects the controller */
  }
  
  /*
  static void uhci_hc_died(struct uhci_hcd *uhci)
  {
        uhci_get_current_frame_number(uhci);
-       uhci_reset_hc(to_pci_dev(uhci_dev(uhci)), uhci->io_addr);
+       uhci->reset_hc(uhci);
        finish_reset(uhci);
        uhci->dead = 1;
  
   */
  static void check_and_reset_hc(struct uhci_hcd *uhci)
  {
-       if (uhci_check_and_reset_hc(to_pci_dev(uhci_dev(uhci)), uhci->io_addr))
+       if (uhci->check_and_reset_hc(uhci))
                finish_reset(uhci);
  }
  
+ #if defined(CONFIG_USB_UHCI_SUPPORT_NON_PCI_HC)
+ /*
+  * The two functions below are generic reset functions that are used on systems
+  * that do not have keyboard and mouse legacy support. We assume that we are
+  * running on such a system if CONFIG_USB_UHCI_SUPPORT_NON_PCI_HC is defined.
+  */
+ /*
+  * Make sure the controller is completely inactive, unable to
+  * generate interrupts or do DMA.
+  */
+ static void uhci_generic_reset_hc(struct uhci_hcd *uhci)
+ {
+       /* Reset the HC - this will force us to get a
+        * new notification of any already connected
+        * ports due to the virtual disconnect that it
+        * implies.
+        */
+       uhci_writew(uhci, USBCMD_HCRESET, USBCMD);
+       mb();
+       udelay(5);
+       if (uhci_readw(uhci, USBCMD) & USBCMD_HCRESET)
+               dev_warn(uhci_dev(uhci), "HCRESET not completed yet!\n");
+       /* Just to be safe, disable interrupt requests and
+        * make sure the controller is stopped.
+        */
+       uhci_writew(uhci, 0, USBINTR);
+       uhci_writew(uhci, 0, USBCMD);
+ }
+ /*
+  * Initialize a controller that was newly discovered or has just been
+  * resumed.  In either case we can't be sure of its previous state.
+  *
+  * Returns: 1 if the controller was reset, 0 otherwise.
+  */
+ static int uhci_generic_check_and_reset_hc(struct uhci_hcd *uhci)
+ {
+       unsigned int cmd, intr;
+       /*
+        * When restarting a suspended controller, we expect all the
+        * settings to be the same as we left them:
+        *
+        *      Controller is stopped and configured with EGSM set;
+        *      No interrupts enabled except possibly Resume Detect.
+        *
+        * If any of these conditions are violated we do a complete reset.
+        */
+       cmd = uhci_readw(uhci, USBCMD);
+       if ((cmd & USBCMD_RS) || !(cmd & USBCMD_CF) || !(cmd & USBCMD_EGSM)) {
+               dev_dbg(uhci_dev(uhci), "%s: cmd = 0x%04x\n",
+                               __func__, cmd);
+               goto reset_needed;
+       }
+       intr = uhci_readw(uhci, USBINTR);
+       if (intr & (~USBINTR_RESUME)) {
+               dev_dbg(uhci_dev(uhci), "%s: intr = 0x%04x\n",
+                               __func__, intr);
+               goto reset_needed;
+       }
+       return 0;
+ reset_needed:
+       dev_dbg(uhci_dev(uhci), "Performing full reset\n");
+       uhci_generic_reset_hc(uhci);
+       return 1;
+ }
+ #endif /* CONFIG_USB_UHCI_SUPPORT_NON_PCI_HC */
  /*
   * Store the basic register settings needed by the controller.
   */
  static void configure_hc(struct uhci_hcd *uhci)
  {
-       struct pci_dev *pdev = to_pci_dev(uhci_dev(uhci));
        /* Set the frame length to the default: 1 ms exactly */
-       outb(USBSOF_DEFAULT, uhci->io_addr + USBSOF);
+       uhci_writeb(uhci, USBSOF_DEFAULT, USBSOF);
  
        /* Store the frame list base address */
-       outl(uhci->frame_dma_handle, uhci->io_addr + USBFLBASEADD);
+       uhci_writel(uhci, uhci->frame_dma_handle, USBFLBASEADD);
  
        /* Set the current frame number */
-       outw(uhci->frame_number & UHCI_MAX_SOF_NUMBER,
-                       uhci->io_addr + USBFRNUM);
-       /* Mark controller as not halted before we enable interrupts */
-       uhci_to_hcd(uhci)->state = HC_STATE_SUSPENDED;
-       mb();
-       /* Enable PIRQ */
-       pci_write_config_word(pdev, USBLEGSUP, USBLEGSUP_DEFAULT);
+       uhci_writew(uhci, uhci->frame_number & UHCI_MAX_SOF_NUMBER,
+                       USBFRNUM);
  
-       /* Disable platform-specific non-PME# wakeup */
-       if (pdev->vendor == PCI_VENDOR_ID_INTEL)
-               pci_write_config_byte(pdev, USBRES_INTEL, 0);
+       /* perform any arch/bus specific configuration */
+       if (uhci->configure_hc)
+               uhci->configure_hc(uhci);
  }
  
  static int resume_detect_interrupts_are_broken(struct uhci_hcd *uhci)
  {
-       int port;
        /* If we have to ignore overcurrent events then almost by definition
         * we can't depend on resume-detect interrupts. */
        if (ignore_oc)
                return 1;
  
-       switch (to_pci_dev(uhci_dev(uhci))->vendor) {
-           default:
-               break;
-           case PCI_VENDOR_ID_GENESYS:
-               /* Genesys Logic's GL880S controllers don't generate
-                * resume-detect interrupts.
-                */
-               return 1;
-           case PCI_VENDOR_ID_INTEL:
-               /* Some of Intel's USB controllers have a bug that causes
-                * resume-detect interrupts if any port has an over-current
-                * condition.  To make matters worse, some motherboards
-                * hardwire unused USB ports' over-current inputs active!
-                * To prevent problems, we will not enable resume-detect
-                * interrupts if any ports are OC.
-                */
-               for (port = 0; port < uhci->rh_numports; ++port) {
-                       if (inw(uhci->io_addr + USBPORTSC1 + port * 2) &
-                                       USBPORTSC_OC)
-                               return 1;
-               }
-               break;
-       }
-       return 0;
+       return uhci->resume_detect_interrupts_are_broken ?
+               uhci->resume_detect_interrupts_are_broken(uhci) : 0;
  }
  
  static int global_suspend_mode_is_broken(struct uhci_hcd *uhci)
  {
-       int port;
-       const char *sys_info;
-       static char bad_Asus_board[] = "A7V8X";
-       /* One of Asus's motherboards has a bug which causes it to
-        * wake up immediately from suspend-to-RAM if any of the ports
-        * are connected.  In such cases we will not set EGSM.
-        */
-       sys_info = dmi_get_system_info(DMI_BOARD_NAME);
-       if (sys_info && !strcmp(sys_info, bad_Asus_board)) {
-               for (port = 0; port < uhci->rh_numports; ++port) {
-                       if (inw(uhci->io_addr + USBPORTSC1 + port * 2) &
-                                       USBPORTSC_CCS)
-                               return 1;
-               }
-       }
-       return 0;
+       return uhci->global_suspend_mode_is_broken ?
+               uhci->global_suspend_mode_is_broken(uhci) : 0;
  }
  
  static void suspend_rh(struct uhci_hcd *uhci, enum uhci_rh_state new_state)
@@@ -321,8 -337,8 +338,8 @@@ __acquires(uhci->lock
                        !int_enable)
                uhci->RD_enable = int_enable = 0;
  
-       outw(int_enable, uhci->io_addr + USBINTR);
-       outw(egsm_enable | USBCMD_CF, uhci->io_addr + USBCMD);
+       uhci_writew(uhci, int_enable, USBINTR);
+       uhci_writew(uhci, egsm_enable | USBCMD_CF, USBCMD);
        mb();
        udelay(5);
  
         * controller should stop after a few microseconds.  Otherwise
         * we will give the controller one frame to stop.
         */
-       if (!auto_stop && !(inw(uhci->io_addr + USBSTS) & USBSTS_HCH)) {
+       if (!auto_stop && !(uhci_readw(uhci, USBSTS) & USBSTS_HCH)) {
                uhci->rh_state = UHCI_RH_SUSPENDING;
                spin_unlock_irq(&uhci->lock);
                msleep(1);
                if (uhci->dead)
                        return;
        }
-       if (!(inw(uhci->io_addr + USBSTS) & USBSTS_HCH))
+       if (!(uhci_readw(uhci, USBSTS) & USBSTS_HCH))
                dev_warn(uhci_dev(uhci), "Controller not stopped yet!\n");
  
        uhci_get_current_frame_number(uhci);
  
  static void start_rh(struct uhci_hcd *uhci)
  {
-       uhci_to_hcd(uhci)->state = HC_STATE_RUNNING;
        uhci->is_stopped = 0;
  
        /* Mark it configured and running with a 64-byte max packet.
         * All interrupts are enabled, even though RESUME won't do anything.
         */
-       outw(USBCMD_RS | USBCMD_CF | USBCMD_MAXP, uhci->io_addr + USBCMD);
-       outw(USBINTR_TIMEOUT | USBINTR_RESUME | USBINTR_IOC | USBINTR_SP,
-                       uhci->io_addr + USBINTR);
+       uhci_writew(uhci, USBCMD_RS | USBCMD_CF | USBCMD_MAXP, USBCMD);
+       uhci_writew(uhci, USBINTR_TIMEOUT | USBINTR_RESUME |
+               USBINTR_IOC | USBINTR_SP, USBINTR);
        mb();
        uhci->rh_state = UHCI_RH_RUNNING;
        set_bit(HCD_FLAG_POLL_RH, &uhci_to_hcd(uhci)->flags);
@@@ -392,9 -407,9 +408,9 @@@ __acquires(uhci->lock
                unsigned egsm;
  
                /* Keep EGSM on if it was set before */
-               egsm = inw(uhci->io_addr + USBCMD) & USBCMD_EGSM;
+               egsm = uhci_readw(uhci, USBCMD) & USBCMD_EGSM;
                uhci->rh_state = UHCI_RH_RESUMING;
-               outw(USBCMD_FGR | USBCMD_CF | egsm, uhci->io_addr + USBCMD);
+               uhci_writew(uhci, USBCMD_FGR | USBCMD_CF | egsm, USBCMD);
                spin_unlock_irq(&uhci->lock);
                msleep(20);
                spin_lock_irq(&uhci->lock);
                        return;
  
                /* End Global Resume and wait for EOP to be sent */
-               outw(USBCMD_CF, uhci->io_addr + USBCMD);
+               uhci_writew(uhci, USBCMD_CF, USBCMD);
                mb();
                udelay(4);
-               if (inw(uhci->io_addr + USBCMD) & USBCMD_FGR)
+               if (uhci_readw(uhci, USBCMD) & USBCMD_FGR)
                        dev_warn(uhci_dev(uhci), "FGR not stopped yet!\n");
        }
  
@@@ -425,10 -440,10 +441,10 @@@ static irqreturn_t uhci_irq(struct usb_
         * interrupt cause.  Contrary to the UHCI specification, the
         * "HC Halted" status bit is persistent: it is RO, not R/WC.
         */
-       status = inw(uhci->io_addr + USBSTS);
+       status = uhci_readw(uhci, USBSTS);
        if (!(status & ~USBSTS_HCH))    /* shared interrupt, not mine */
                return IRQ_NONE;
-       outw(status, uhci->io_addr + USBSTS);           /* Clear it */
+       uhci_writew(uhci, status, USBSTS);              /* Clear it */
  
        if (status & ~(USBSTS_USBINT | USBSTS_ERROR | USBSTS_RD)) {
                if (status & USBSTS_HSE)
                                        lprintk(errbuf);
                                }
                                uhci_hc_died(uhci);
+                               usb_hc_died(hcd);
  
                                /* Force a callback in case there are
                                 * pending unlinks */
@@@ -483,7 -499,7 +500,7 @@@ static void uhci_get_current_frame_numb
        if (!uhci->is_stopped) {
                unsigned delta;
  
-               delta = (inw(uhci->io_addr + USBFRNUM) - uhci->frame_number) &
+               delta = (uhci_readw(uhci, USBFRNUM) - uhci->frame_number) &
                                (UHCI_NUMFRAMES - 1);
                uhci->frame_number += delta;
        }
@@@ -520,61 -536,6 +537,6 @@@ static void release_uhci(struct uhci_hc
                        uhci->frame, uhci->frame_dma_handle);
  }
  
- static int uhci_init(struct usb_hcd *hcd)
- {
-       struct uhci_hcd *uhci = hcd_to_uhci(hcd);
-       unsigned io_size = (unsigned) hcd->rsrc_len;
-       int port;
-       uhci->io_addr = (unsigned long) hcd->rsrc_start;
-       /* The UHCI spec says devices must have 2 ports, and goes on to say
-        * they may have more but gives no way to determine how many there
-        * are.  However according to the UHCI spec, Bit 7 of the port
-        * status and control register is always set to 1.  So we try to
-        * use this to our advantage.  Another common failure mode when
-        * a nonexistent register is addressed is to return all ones, so
-        * we test for that also.
-        */
-       for (port = 0; port < (io_size - USBPORTSC1) / 2; port++) {
-               unsigned int portstatus;
-               portstatus = inw(uhci->io_addr + USBPORTSC1 + (port * 2));
-               if (!(portstatus & 0x0080) || portstatus == 0xffff)
-                       break;
-       }
-       if (debug)
-               dev_info(uhci_dev(uhci), "detected %d ports\n", port);
-       /* Anything greater than 7 is weird so we'll ignore it. */
-       if (port > UHCI_RH_MAXCHILD) {
-               dev_info(uhci_dev(uhci), "port count misdetected? "
-                               "forcing to 2 ports\n");
-               port = 2;
-       }
-       uhci->rh_numports = port;
-       /* Kick BIOS off this hardware and reset if the controller
-        * isn't already safely quiescent.
-        */
-       check_and_reset_hc(uhci);
-       return 0;
- }
- /* Make sure the controller is quiescent and that we're not using it
-  * any more.  This is mainly for the benefit of programs which, like kexec,
-  * expect the hardware to be idle: not doing DMA or generating IRQs.
-  *
-  * This routine may be called in a damaged or failing kernel.  Hence we
-  * do not acquire the spinlock before shutting down the controller.
-  */
- static void uhci_shutdown(struct pci_dev *pdev)
- {
-       struct usb_hcd *hcd = pci_get_drvdata(pdev);
-       uhci_hc_died(hcd_to_uhci(hcd));
- }
  /*
   * Allocate a frame list, and then setup the skeleton
   *
@@@ -669,16 -630,16 +631,16 @@@ static int uhci_start(struct usb_hcd *h
         * 8 Interrupt queues; link all higher int queues to int1 = async
         */
        for (i = SKEL_ISO + 1; i < SKEL_ASYNC; ++i)
-               uhci->skelqh[i]->link = LINK_TO_QH(uhci->skel_async_qh);
-       uhci->skel_async_qh->link = UHCI_PTR_TERM;
-       uhci->skel_term_qh->link = LINK_TO_QH(uhci->skel_term_qh);
+               uhci->skelqh[i]->link = LINK_TO_QH(uhci, uhci->skel_async_qh);
+       uhci->skel_async_qh->link = UHCI_PTR_TERM(uhci);
+       uhci->skel_term_qh->link = LINK_TO_QH(uhci, uhci->skel_term_qh);
  
        /* This dummy TD is to work around a bug in Intel PIIX controllers */
-       uhci_fill_td(uhci->term_td, 0, uhci_explen(0) |
+       uhci_fill_td(uhci, uhci->term_td, 0, uhci_explen(0) |
                        (0x7f << TD_TOKEN_DEVADDR_SHIFT) | USB_PID_IN, 0);
-       uhci->term_td->link = UHCI_PTR_TERM;
+       uhci->term_td->link = UHCI_PTR_TERM(uhci);
        uhci->skel_async_qh->element = uhci->skel_term_qh->element =
-                       LINK_TO_TD(uhci->term_td);
+               LINK_TO_TD(uhci, uhci->term_td);
  
        /*
         * Fill the frame list: make all entries point to the proper
@@@ -791,86 -752,6 +753,6 @@@ static int uhci_rh_resume(struct usb_hc
        return rc;
  }
  
- static int uhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup)
- {
-       struct uhci_hcd *uhci = hcd_to_uhci(hcd);
-       struct pci_dev *pdev = to_pci_dev(uhci_dev(uhci));
-       int rc = 0;
-       dev_dbg(uhci_dev(uhci), "%s\n", __func__);
-       spin_lock_irq(&uhci->lock);
-       if (!HCD_HW_ACCESSIBLE(hcd) || uhci->dead)
-               goto done_okay;         /* Already suspended or dead */
-       if (uhci->rh_state > UHCI_RH_SUSPENDED) {
-               dev_warn(uhci_dev(uhci), "Root hub isn't suspended!\n");
-               rc = -EBUSY;
-               goto done;
-       };
-       /* All PCI host controllers are required to disable IRQ generation
-        * at the source, so we must turn off PIRQ.
-        */
-       pci_write_config_word(pdev, USBLEGSUP, 0);
-       clear_bit(HCD_FLAG_POLL_RH, &hcd->flags);
-       /* Enable platform-specific non-PME# wakeup */
-       if (do_wakeup) {
-               if (pdev->vendor == PCI_VENDOR_ID_INTEL)
-                       pci_write_config_byte(pdev, USBRES_INTEL,
-                                       USBPORT1EN | USBPORT2EN);
-       }
- done_okay:
-       clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
- done:
-       spin_unlock_irq(&uhci->lock);
-       return rc;
- }
- static int uhci_pci_resume(struct usb_hcd *hcd, bool hibernated)
- {
-       struct uhci_hcd *uhci = hcd_to_uhci(hcd);
-       dev_dbg(uhci_dev(uhci), "%s\n", __func__);
-       /* Since we aren't in D3 any more, it's safe to set this flag
-        * even if the controller was dead.
-        */
-       set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
-       spin_lock_irq(&uhci->lock);
-       /* Make sure resume from hibernation re-enumerates everything */
-       if (hibernated)
-               uhci_hc_died(uhci);
-       /* The firmware or a boot kernel may have changed the controller
-        * settings during a system wakeup.  Check it and reconfigure
-        * to avoid problems.
-        */
-       check_and_reset_hc(uhci);
-       /* If the controller was dead before, it's back alive now */
-       configure_hc(uhci);
-       /* Tell the core if the controller had to be reset */
-       if (uhci->rh_state == UHCI_RH_RESET)
-               usb_root_hub_lost_power(hcd->self.root_hub);
-       spin_unlock_irq(&uhci->lock);
-       /* If interrupts don't work and remote wakeup is enabled then
-        * the suspended root hub needs to be polled.
-        */
-       if (!uhci->RD_enable && hcd->self.root_hub->do_remote_wakeup)
-               set_bit(HCD_FLAG_POLL_RH, &hcd->flags);
-       /* Does the root hub have a port wakeup pending? */
-       usb_hcd_poll_rh_status(hcd);
-       return 0;
- }
  #endif
  
  /* Wait until a particular device/endpoint's QH is idle, and free it */
@@@ -908,67 -789,62 +790,62 @@@ static int uhci_hcd_get_frame_number(st
        /* Minimize latency by avoiding the spinlock */
        frame_number = uhci->frame_number;
        barrier();
-       delta = (inw(uhci->io_addr + USBFRNUM) - frame_number) &
+       delta = (uhci_readw(uhci, USBFRNUM) - frame_number) &
                        (UHCI_NUMFRAMES - 1);
        return frame_number + delta;
  }
  
- static const char hcd_name[] = "uhci_hcd";
- static const struct hc_driver uhci_driver = {
-       .description =          hcd_name,
-       .product_desc =         "UHCI Host Controller",
-       .hcd_priv_size =        sizeof(struct uhci_hcd),
-       /* Generic hardware linkage */
-       .irq =                  uhci_irq,
-       .flags =                HCD_USB11,
-       /* Basic lifecycle operations */
-       .reset =                uhci_init,
-       .start =                uhci_start,
- #ifdef CONFIG_PM
-       .pci_suspend =          uhci_pci_suspend,
-       .pci_resume =           uhci_pci_resume,
-       .bus_suspend =          uhci_rh_suspend,
-       .bus_resume =           uhci_rh_resume,
- #endif
-       .stop =                 uhci_stop,
+ /* Determines number of ports on controller */
+ static int uhci_count_ports(struct usb_hcd *hcd)
+ {
+       struct uhci_hcd *uhci = hcd_to_uhci(hcd);
+       unsigned io_size = (unsigned) hcd->rsrc_len;
+       int port;
  
-       .urb_enqueue =          uhci_urb_enqueue,
-       .urb_dequeue =          uhci_urb_dequeue,
+       /* The UHCI spec says devices must have 2 ports, and goes on to say
+        * they may have more but gives no way to determine how many there
+        * are.  However according to the UHCI spec, Bit 7 of the port
+        * status and control register is always set to 1.  So we try to
+        * use this to our advantage.  Another common failure mode when
+        * a nonexistent register is addressed is to return all ones, so
+        * we test for that also.
+        */
+       for (port = 0; port < (io_size - USBPORTSC1) / 2; port++) {
+               unsigned int portstatus;
  
-       .endpoint_disable =     uhci_hcd_endpoint_disable,
-       .get_frame_number =     uhci_hcd_get_frame_number,
+               portstatus = uhci_readw(uhci, USBPORTSC1 + (port * 2));
+               if (!(portstatus & 0x0080) || portstatus == 0xffff)
+                       break;
+       }
+       if (debug)
+               dev_info(uhci_dev(uhci), "detected %d ports\n", port);
  
-       .hub_status_data =      uhci_hub_status_data,
-       .hub_control =          uhci_hub_control,
- };
+       /* Anything greater than 7 is weird so we'll ignore it. */
+       if (port > UHCI_RH_MAXCHILD) {
+               dev_info(uhci_dev(uhci), "port count misdetected? "
+                               "forcing to 2 ports\n");
+               port = 2;
+       }
  
- static const struct pci_device_id uhci_pci_ids[] = { {
-       /* handle any USB UHCI controller */
-       PCI_DEVICE_CLASS(PCI_CLASS_SERIAL_USB_UHCI, ~0),
-       .driver_data =  (unsigned long) &uhci_driver,
-       }, { /* end: all zeroes */ }
- };
+       return port;
+ }
  
MODULE_DEVICE_TABLE(pci, uhci_pci_ids);
static const char hcd_name[] = "uhci_hcd";
  
- static struct pci_driver uhci_pci_driver = {
-       .name =         (char *)hcd_name,
-       .id_table =     uhci_pci_ids,
+ #ifdef CONFIG_PCI
+ #include "uhci-pci.c"
+ #define       PCI_DRIVER              uhci_pci_driver
+ #endif
  
-       .probe =        usb_hcd_pci_probe,
-       .remove =       usb_hcd_pci_remove,
-       .shutdown =     uhci_shutdown,
+ #ifdef CONFIG_SPARC_LEON
+ #include "uhci-grlib.c"
+ #define PLATFORM_DRIVER               uhci_grlib_driver
+ #endif
  
- #ifdef CONFIG_PM_SLEEP
-       .driver =       {
-               .pm =   &usb_hcd_pci_pm_ops
-       },
+ #if !defined(PCI_DRIVER) && !defined(PLATFORM_DRIVER)
+ #error "missing bus glue for uhci-hcd"
  #endif
- };
-  
  static int __init uhci_hcd_init(void)
  {
        int retval = -ENOMEM;
        if (!uhci_up_cachep)
                goto up_failed;
  
-       retval = pci_register_driver(&uhci_pci_driver);
-       if (retval)
-               goto init_failed;
+ #ifdef PLATFORM_DRIVER
+       retval = platform_driver_register(&PLATFORM_DRIVER);
+       if (retval < 0)
+               goto clean0;
+ #endif
+ #ifdef PCI_DRIVER
+       retval = pci_register_driver(&PCI_DRIVER);
+       if (retval < 0)
+               goto clean1;
+ #endif
  
        return 0;
  
- init_failed:
+ #ifdef PCI_DRIVER
+ clean1:
+ #endif
+ #ifdef PLATFORM_DRIVER
+       platform_driver_unregister(&PLATFORM_DRIVER);
+ clean0:
+ #endif
        kmem_cache_destroy(uhci_up_cachep);
  
  up_failed:
@@@ -1017,7 -907,12 +908,12 @@@ errbuf_failed
  
  static void __exit uhci_hcd_cleanup(void) 
  {
-       pci_unregister_driver(&uhci_pci_driver);
+ #ifdef PLATFORM_DRIVER
+       platform_driver_unregister(&PLATFORM_DRIVER);
+ #endif
+ #ifdef PCI_DRIVER
+       pci_unregister_driver(&PCI_DRIVER);
+ #endif
        kmem_cache_destroy(uhci_up_cachep);
        debugfs_remove(uhci_debugfs_root);
        kfree(errbuf);
@@@ -104,7 -104,7 +104,7 @@@ get_endpoints(struct usbtest_dev *dev, 
                alt = intf->altsetting + tmp;
  
                /* take the first altsetting with in-bulk + out-bulk;
 -               * ignore other endpoints and altsetttings.
 +               * ignore other endpoints and altsettings.
                 */
                for (ep = 0; ep < alt->desc.bNumEndpoints; ep++) {
                        struct usb_host_endpoint        *e;
@@@ -268,9 -268,9 +268,9 @@@ static inline void simple_fill_buf(stru
        }
  }
  
- static inline unsigned buffer_offset(void *buf)
+ static inline unsigned long buffer_offset(void *buf)
  {
-       return (unsigned)buf & (ARCH_KMALLOC_MINALIGN - 1);
+       return (unsigned long)buf & (ARCH_KMALLOC_MINALIGN - 1);
  }
  
  static int check_guard_bytes(struct usbtest_dev *tdev, struct urb *urb)
@@@ -329,7 -329,7 +329,7 @@@ static int simple_check_buf(struct usbt
  
  static void simple_free_urb(struct urb *urb)
  {
-       unsigned offset = buffer_offset(urb->transfer_buffer);
+       unsigned long offset = buffer_offset(urb->transfer_buffer);
  
        if (urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP)
                usb_free_coherent(
@@@ -1030,6 -1030,8 +1030,8 @@@ test_ctrl_queue(struct usbtest_dev *dev
                        req.wValue = cpu_to_le16((USB_DT_DEVICE << 8) | 0);
                        /* device descriptor size == 18 bytes */
                        len = udev->descriptor.bMaxPacketSize0;
+                       if (udev->speed == USB_SPEED_SUPER)
+                               len = 512;
                        switch (len) {
                        case 8:
                                len = 24;
@@@ -1195,6 -1197,104 +1197,104 @@@ static int unlink_simple(struct usbtest
  
  /*-------------------------------------------------------------------------*/
  
+ struct queued_ctx {
+       struct completion       complete;
+       atomic_t                pending;
+       unsigned                num;
+       int                     status;
+       struct urb              **urbs;
+ };
+ static void unlink_queued_callback(struct urb *urb)
+ {
+       int                     status = urb->status;
+       struct queued_ctx       *ctx = urb->context;
+       if (ctx->status)
+               goto done;
+       if (urb == ctx->urbs[ctx->num - 4] || urb == ctx->urbs[ctx->num - 2]) {
+               if (status == -ECONNRESET)
+                       goto done;
+               /* What error should we report if the URB completed normally? */
+       }
+       if (status != 0)
+               ctx->status = status;
+  done:
+       if (atomic_dec_and_test(&ctx->pending))
+               complete(&ctx->complete);
+ }
+ static int unlink_queued(struct usbtest_dev *dev, int pipe, unsigned num,
+               unsigned size)
+ {
+       struct queued_ctx       ctx;
+       struct usb_device       *udev = testdev_to_usbdev(dev);
+       void                    *buf;
+       dma_addr_t              buf_dma;
+       int                     i;
+       int                     retval = -ENOMEM;
+       init_completion(&ctx.complete);
+       atomic_set(&ctx.pending, 1);    /* One more than the actual value */
+       ctx.num = num;
+       ctx.status = 0;
+       buf = usb_alloc_coherent(udev, size, GFP_KERNEL, &buf_dma);
+       if (!buf)
+               return retval;
+       memset(buf, 0, size);
+       /* Allocate and init the urbs we'll queue */
+       ctx.urbs = kcalloc(num, sizeof(struct urb *), GFP_KERNEL);
+       if (!ctx.urbs)
+               goto free_buf;
+       for (i = 0; i < num; i++) {
+               ctx.urbs[i] = usb_alloc_urb(0, GFP_KERNEL);
+               if (!ctx.urbs[i])
+                       goto free_urbs;
+               usb_fill_bulk_urb(ctx.urbs[i], udev, pipe, buf, size,
+                               unlink_queued_callback, &ctx);
+               ctx.urbs[i]->transfer_dma = buf_dma;
+               ctx.urbs[i]->transfer_flags = URB_NO_TRANSFER_DMA_MAP;
+       }
+       /* Submit all the URBs and then unlink URBs num - 4 and num - 2. */
+       for (i = 0; i < num; i++) {
+               atomic_inc(&ctx.pending);
+               retval = usb_submit_urb(ctx.urbs[i], GFP_KERNEL);
+               if (retval != 0) {
+                       dev_err(&dev->intf->dev, "submit urbs[%d] fail %d\n",
+                                       i, retval);
+                       atomic_dec(&ctx.pending);
+                       ctx.status = retval;
+                       break;
+               }
+       }
+       if (i == num) {
+               usb_unlink_urb(ctx.urbs[num - 4]);
+               usb_unlink_urb(ctx.urbs[num - 2]);
+       } else {
+               while (--i >= 0)
+                       usb_unlink_urb(ctx.urbs[i]);
+       }
+       if (atomic_dec_and_test(&ctx.pending))          /* The extra count */
+               complete(&ctx.complete);
+       wait_for_completion(&ctx.complete);
+       retval = ctx.status;
+  free_urbs:
+       for (i = 0; i < num; i++)
+               usb_free_urb(ctx.urbs[i]);
+       kfree(ctx.urbs);
+  free_buf:
+       usb_free_coherent(udev, size, buf, buf_dma);
+       return retval;
+ }
+ /*-------------------------------------------------------------------------*/
  static int verify_not_halted(struct usbtest_dev *tdev, int ep, struct urb *urb)
  {
        int     retval;
@@@ -1970,8 -2070,6 +2070,6 @@@ usbtest_ioctl(struct usb_interface *int
                                dev->in_iso_pipe, dev->iso_in, 0);
                break;
  
-       /* FIXME unlink from queue (ring with N urbs) */
        /* FIXME scatterlist cancel (needs helper thread) */
  
        /* Tests for bulk I/O using DMA mapping by core and odd address */
                                dev->in_iso_pipe, dev->iso_in, 1);
                break;
  
+       /* unlink URBs from a bulk-OUT queue */
+       case 24:
+               if (dev->out_pipe == 0 || !param->length || param->sglen < 4)
+                       break;
+               retval = 0;
+               dev_info(&intf->dev, "TEST 17:  unlink from %d queues of "
+                               "%d %d-byte writes\n",
+                               param->iterations, param->sglen, param->length);
+               for (i = param->iterations; retval == 0 && i > 0; --i) {
+                       retval = unlink_queued(dev, dev->out_pipe,
+                                               param->sglen, param->length);
+                       if (retval) {
+                               dev_err(&intf->dev,
+                                       "unlink queued writes failed %d, "
+                                       "iterations left %d\n", retval, i);
+                               break;
+                       }
+               }
+               break;
        }
        do_gettimeofday(&param->duration);
        param->duration.tv_sec -= start.tv_sec;
@@@ -2192,6 -2310,9 +2310,9 @@@ usbtest_probe(struct usb_interface *int
                        case USB_SPEED_HIGH:
                                tmp = "high";
                                break;
+                       case USB_SPEED_SUPER:
+                               tmp = "super";
+                               break;
                        default:
                                tmp = "unknown";
                                break;