1. 20 5月, 2011 1 次提交
    • A
      USB: remove remaining usages of hcd->state from usbcore and fix regression · 69fff59d
      Alan Stern 提交于
      This patch (as1467) removes the last usages of hcd->state from
      usbcore.  We no longer check to see if an interrupt handler finds that
      a controller has died; instead we rely on host controller drivers to
      make an explicit call to usb_hc_died().
      
      This fixes a regression introduced by commit
      9b37596a (USB: move usbcore away from
      hcd->state).  It used to be that when a controller shared an IRQ with
      another device and an interrupt arrived while hcd->state was set to
      HC_STATE_HALT, the interrupt handler would be skipped.  The commit
      removed that test; as a result the current code doesn't skip calling
      the handler and ends up believing the controller has died, even though
      it's only temporarily stopped.  The solution is to ignore HC_STATE_HALT
      following the handler's return.
      
      As a consequence of this change, several of the host controller
      drivers need to be modified.  They can no longer implicitly rely on
      usbcore realizing that a controller has died because of hcd->state.
      The patch adds calls to usb_hc_died() in the appropriate places.
      
      The patch also changes a few of the interrupt handlers.  They don't
      expect to be called when hcd->state is equal to HC_STATE_HALT, even if
      the controller is still alive.  Early returns were added to avoid any
      confusion.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Tested-by: NManuel Lauss <manuel.lauss@googlemail.com>
      CC: Rodolfo Giometti <giometti@linux.it>
      CC: Olav Kongas <ok@artecdesign.ee>
      CC: <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      69fff59d
  2. 04 5月, 2011 2 次提交
  3. 14 4月, 2011 2 次提交
  4. 12 3月, 2011 1 次提交
    • B
      usb: host: Add EHCI driver for NVIDIA Tegra SoCs · 79ad3b5a
      Benoit Goby 提交于
      The Tegra 2 SoC has 3 EHCI compatible USB controllers. This patch adds
      the necessary glue to allow the ehci-hcd driver to work on Tegra 2
      SoCs.
      
      The platform data is used to configure board-specific phy settings and
      to configure the operating mode, as one of the ports may be used as a otg
      port. For additional power saving, the driver supports powering down the
      phy on bus suspend when it is used, for example, to connect an internal
      device that use an out-of-band remote wakeup mechanism (e.g. a gpio).
      Signed-off-by: NBenoit Goby <benoit@android.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      79ad3b5a
  5. 02 3月, 2011 2 次提交
    • Y
      usb: EHCI, OHCI: Add configuration for the SH USB controller · 60b0bf0f
      Yoshihiro Shimoda 提交于
      The SH EHCI/OHCI driver hardcoded the CPU type in {ehci,ohci}-hcd.c.
      So if we will add the new CPU, we had to add to the hcd driver each time.
      The patch adds the CONFIG_USB_{EHCI,OHCI}_SH configuration. So if we
      want to use the SH EHCI/OHCI, we only enable the configuration.
      Signed-off-by: NYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      60b0bf0f
    • A
      USB host: Move AMD PLL quirk to pci-quirks.c · ad93562b
      Andiry Xu 提交于
      This patch moves the AMD PLL quirk code in OHCI/EHCI driver to pci-quirks.c,
      and exports the functions to be used by xHCI driver later.
      
      AMD PLL quirk disable the optional PM feature inside specific
      SB700/SB800/Hudson-2/3 platforms under the following conditions:
      
      1. If an isochronous device is connected to OHCI/EHCI/xHCI port and is active;
      2. Optional PM feature that powers down the internal Bus PLL when the link is
         in low power state is enabled.
      
      Without AMD PLL quirk, USB isochronous stream may stutter or have breaks
      occasionally, which greatly impair the performance of audio/video streams.
      
      Currently AMD PLL quirk is implemented in OHCI and EHCI driver, and will be
      added to xHCI driver too. They are doing similar things actually, so move
      the quirk code to pci-quirks.c, which has several advantages:
      
      1. Remove duplicate defines and functions in OHCI/EHCI (and xHCI) driver and
         make them cleaner;
      2. AMD chipset information will be probed only once and then stored.
         Currently they're probed during every OHCI/EHCI initialization, move
         the detect code to pci-quirks.c saves the repeat detect cost;
      3. Build up synchronization among OHCI/EHCI/xHCI driver. In current
         code, every host controller enable/disable PLL only according to
         its own status, and may enable PLL while there is still isoc transfer on
         other HCs. Move the quirk to pci-quirks.c prevents this issue.
      Signed-off-by: NAndiry Xu <andiry.xu@amd.com>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Cc: Alex He <alex.he@amd.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ad93562b
  6. 01 3月, 2011 1 次提交
  7. 26 2月, 2011 1 次提交
  8. 18 2月, 2011 2 次提交
  9. 05 2月, 2011 1 次提交
    • A
      USB host: Move AMD PLL quirk to pci-quirks.c · b7d5b439
      Andiry Xu 提交于
      This patch moves the AMD PLL quirk code in OHCI/EHCI driver to pci-quirks.c,
      and exports the functions to be used by xHCI driver later.
      
      AMD PLL quirk disable the optional PM feature inside specific
      SB700/SB800/Hudson-2/3 platforms under the following conditions:
      
      1. If an isochronous device is connected to OHCI/EHCI/xHCI port and is active;
      2. Optional PM feature that powers down the internal Bus PLL when the link is
         in low power state is enabled.
      
      Without AMD PLL quirk, USB isochronous stream may stutter or have breaks
      occasionally, which greatly impair the performance of audio/video streams.
      
      Currently AMD PLL quirk is implemented in OHCI and EHCI driver, and will be
      added to xHCI driver too. They are doing similar things actually, so move
      the quirk code to pci-quirks.c, which has several advantages:
      
      1. Remove duplicate defines and functions in OHCI/EHCI (and xHCI) driver and
         make them cleaner;
      2. AMD chipset information will be probed only once and then stored.
         Currently they're probed during every OHCI/EHCI initialization, move
         the detect code to pci-quirks.c saves the repeat detect cost;
      3. Build up synchronization among OHCI/EHCI/xHCI driver. In current
         code, every host controller enable/disable PLL only according to
         its own status, and may enable PLL while there is still isoc transfer on
         other HCs. Move the quirk to pci-quirks.c prevents this issue.
      Signed-off-by: NAndiry Xu <andiry.xu@amd.com>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Cc: Alex He <alex.he@amd.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b7d5b439
  10. 23 1月, 2011 1 次提交
  11. 11 12月, 2010 2 次提交
  12. 01 12月, 2010 1 次提交
  13. 29 11月, 2010 1 次提交
  14. 17 11月, 2010 2 次提交
  15. 11 11月, 2010 1 次提交
  16. 02 11月, 2010 1 次提交
  17. 30 10月, 2010 1 次提交
    • D
      USB: Add EHCI and OHCH glue for OCTEON II SOCs. · 1643accd
      David Daney 提交于
      The OCTEON II SOC has USB EHCI and OHCI controllers connected directly
      to the internal I/O bus.  This patch adds the necessary 'glue' logic
      to allow ehci-hcd and ohci-hcd drivers to work on OCTEON II.
      
      The OCTEON normally runs big-endian, and the ehci/ohci internal
      registers have host endianness, so we need to select
      USB_EHCI_BIG_ENDIAN_MMIO.
      
      The ehci and ohci blocks share a common clocking and PHY
      infrastructure.  Initialization of the host controller and PHY clocks
      is common between the two and is factored out into the
      octeon2-common.c file.
      
      Setting of USB_ARCH_HAS_OHCI and USB_ARCH_HAS_EHCI is done in
      arch/mips/Kconfig in a following patch.
      Signed-off-by: NDavid Daney <ddaney@caviumnetworks.com>
      To: linux-usb@vger.kernel.org
      To: dbrownell@users.sourceforge.net
      Patchwork: http://patchwork.linux-mips.org/patch/1675/Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      1643accd
  18. 23 10月, 2010 1 次提交
    • M
      USB: ehci tdi : let's tdi_reset set host mode · 65fd4272
      Matthieu CASTET 提交于
      tdi_reset is already taking care of setting host mode for tdi devices.
      Don't duplicate code in platform driver.
      
      Make ehci_halt a nop if the controller is not in host mode (otherwise it 
      will fail), and let's ehci_reset do the tdi_reset.
      We need to move hcd->has_tt flags before ehci_halt, in order ehci_halt 
      knows we are a tdi device.
      
      
      Before the setup routine was doing :
      - put controller in host mode
      - ehci_halt
      - ehci_init
      - hcd->has_tt = 1;
      - ehci_reset
      
      Now we do :
      - hcd->has_tt = 1;
      - ehci_halt
      - ehci_init
      - ehci_reset
      
      PS : now we handle correctly the device -> host transition.
      Signed-off-by: NMatthieu CASTET <matthieu.castet@parrot.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      65fd4272
  19. 11 8月, 2010 6 次提交
  20. 10 8月, 2010 1 次提交
  21. 05 6月, 2010 1 次提交
  22. 21 5月, 2010 1 次提交
  23. 23 4月, 2010 1 次提交
  24. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  25. 19 3月, 2010 1 次提交
  26. 16 2月, 2010 1 次提交
  27. 21 1月, 2010 1 次提交
    • A
      USB: add missing delay during remote wakeup · 49d0f078
      Alan Stern 提交于
      This patch (as1330) fixes a bug in khbud's handling of remote
      wakeups.  When a device sends a remote-wakeup request, the parent hub
      (or the host controller driver, for directly attached devices) begins
      the resume sequence and notifies khubd when the sequence finishes.  At
      this point the port's SUSPEND feature is automatically turned off.
      
      However the device needs an additional 10-ms resume-recovery time
      (TRSMRCY in the USB spec).  Khubd does not wait for this delay if the
      SUSPEND feature is off, and as a result some devices fail to behave
      properly following a remote wakeup.  This patch adds the missing
      delay to the remote-wakeup path.
      
      It also extends the resume-signalling delay used by ehci-hcd and
      uhci-hcd from 20 ms (the value in the spec) to 25 ms (the value we use
      for non-remote-wakeup resumes).  The extra time appears to help some
      devices.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Cc: Rickard Bellini <rickard.bellini@ericsson.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      49d0f078
  28. 12 12月, 2009 2 次提交