1. 13 5月, 2011 1 次提交
  2. 14 4月, 2011 1 次提交
    • J
      USB host: Fix lockdep warning in AMD PLL quirk · 9ab7927b
      Joerg Roedel 提交于
      Booting latest kernel on my test machine produces a lockdep
      warning from the usb_amd_find_chipset_info() function:
      
       WARNING: at /data/lemmy/linux.trees.git/kernel/lockdep.c:2465 lockdep_trace_alloc+0x95/0xc2()
       Hardware name: Snook
       Modules linked in:
       Pid: 959, comm: work_for_cpu Not tainted 2.6.39-rc2+ #22
       Call Trace:
        [<ffffffff8103c0d4>] warn_slowpath_common+0x80/0x98
        [<ffffffff812387e6>] ? T.492+0x24/0x26
        [<ffffffff8103c101>] warn_slowpath_null+0x15/0x17
        [<ffffffff81068667>] lockdep_trace_alloc+0x95/0xc2
        [<ffffffff810ed9ac>] slab_pre_alloc_hook+0x18/0x3b
        [<ffffffff810ef227>] kmem_cache_alloc_trace+0x25/0xba
        [<ffffffff812387e6>] T.492+0x24/0x26
        [<ffffffff81238816>] pci_get_subsys+0x2e/0x73
        [<ffffffff8123886c>] pci_get_device+0x11/0x13
        [<ffffffff814082a9>] usb_amd_find_chipset_info+0x3f/0x18a
      ...
      
      It turns out that this function calls pci_get_device under a spin_lock
      with irqs disabled, but the pci_get_device function is only allowed in
      preemptible context.
      
      This patch fixes the warning by making all data-structure
      modifications on temporal storage and commiting this back
      into the visible structure at the end. While at it, this
      patch also moves the pci_dev_put calls out of the spinlocks
      because this function might sleep too.
      Signed-off-by: NJoerg Roedel <joerg.roedel@amd.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9ab7927b
  3. 02 3月, 2011 1 次提交
    • 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
  4. 18 2月, 2011 1 次提交
  5. 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
  6. 23 10月, 2010 1 次提交
    • A
      OHCI: work around for nVidia shutdown problem · 3df7169e
      Alan Stern 提交于
      This patch (as1417) fixes a problem affecting some (or all) nVidia
      chipsets.  When the computer is shut down, the OHCI controllers
      continue to power the USB buses and evidently they drive a Reset
      signal out all their ports.  This prevents attached devices from going
      to low power.  Mouse LEDs stay on, for example, which is disconcerting
      for users and a drain on laptop batteries.
      
      The fix involves leaving each OHCI controller in the OPERATIONAL state
      during system shutdown rather than putting it in the RESET state.
      Although this nominally means the controller is running, in fact it's
      not doing very much since all the schedules are all disabled.  However
      there is ongoing DMA to the Host Controller Communications Area, so
      the patch also disables the bus-master capability of all PCI USB
      controllers after the shutdown routine runs.
      
      The fix is applied only to nVidia-based PCI OHCI controllers, so it
      shouldn't cause problems on systems using other hardware.  As an added
      safety measure, in case the kernel encounters one of these running
      controllers during boot, the patch changes quirk_usb_handoff_ohci()
      (which runs early on during PCI discovery) to reset the controller
      before anything bad can happen.
      Reported-by: NPali Rohár <pali.rohar@gmail.com>
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: David Brownell <david-b@pacbell.net>
      Tested-by: NPali Rohár <pali.rohar@gmail.com>
      CC: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      3df7169e
  7. 10 8月, 2010 1 次提交
  8. 12 10月, 2009 1 次提交
  9. 23 9月, 2009 1 次提交
    • D
      USB: Work around BIOS bugs by quiescing USB controllers earlier · db8be50c
      David Woodhouse 提交于
      We are seeing a number of crashes in SMM, when VT-d is enabled while
      'Legacy USB support' is enabled in various BIOSes.
      
      The BIOS is supposed to indicate which addresses it uses for DMA in a
      special ACPI table ("RMRR"), so that we can punch a hole for it when we
      set up the IOMMU.
      
      The problem is, as usual, that BIOS engineers are totally incompetent.
      They write code which will crash if the DMA goes AWOL, and then they
      either neglect to provide an RMRR table at all, or they put the wrong
      addresses in it. And of course they don't do _any_ QA, since that would
      take too much time away from their crack-smoking habit.
      
      The real fix, of course, is for consumers to refuse to buy motherboards
      which only have closed-source firmware available. If we had _open_
      firmware, bugs like this would be easy to fix.
      
      Since that's something I can only dream about, this patch implements an
      alternative -- ensuring that the USB controllers are handed off from the
      BIOS and quiesced _before_ the IOMMU is initialised. That would have
      been a much better design than this RMRR nonsense in the first place, of
      course. The bootloader has no business doing DMA after the OS has booted
      anyway.
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      db8be50c
  10. 20 8月, 2009 1 次提交
    • D
      USB: Work around BIOS bugs by quiescing USB controllers earlier · 13203227
      David Woodhouse 提交于
      We are seeing a number of crashes in SMM, when VT-d is enabled while
      'Legacy USB support' is enabled in various BIOSes.
      
      The BIOS is supposed to indicate which addresses it uses for DMA in a
      special ACPI table ("RMRR"), so that we can punch a hole for it when we
      set up the IOMMU.
      
      The problem is, as usual, that BIOS engineers are totally incompetent.
      They write code which will crash if the DMA goes AWOL, and then they
      either neglect to provide an RMRR table at all, or they put the wrong
      addresses in it. And of course they don't do _any_ QA, since that would
      take too much time away from their crack-smoking habit.
      
      The real fix, of course, is for consumers to refuse to buy motherboards
      which only have closed-source firmware available. If we had _open_
      firmware, bugs like this would be easy to fix.
      
      Since that's something I can only dream about, this patch implements an
      alternative -- ensuring that the USB controllers are handed off from the
      BIOS and quiesced _before_ the IOMMU is initialised. That would have
      been a much better design than this RMRR nonsense in the first place, of
      course. The bootloader has no business doing DMA after the OS has booted
      anyway.
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      13203227
  11. 16 6月, 2009 1 次提交
    • S
      USB: xhci: BIOS handoff and HW initialization. · 66d4eadd
      Sarah Sharp 提交于
      Add PCI initialization code to take control of the xHCI host controller
      away from the BIOS, halt, and reset the host controller.  The xHCI spec
      says that BIOSes must give up the host controller within 5 seconds.
      
      Add some host controller glue functions to handle hardware initialization
      and memory allocation for the host controller.  The current xHCI
      prototypes use PCI interrupts, but the xHCI spec requires MSI-X
      interrupts.  Add code to support MSI-X interrupts, but use the PCI
      interrupts for now.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      66d4eadd
  12. 25 3月, 2009 1 次提交
  13. 08 1月, 2009 2 次提交
  14. 25 4月, 2008 1 次提交
  15. 02 2月, 2008 1 次提交
  16. 23 5月, 2007 1 次提交
  17. 13 7月, 2006 1 次提交
  18. 01 7月, 2006 1 次提交
  19. 15 4月, 2006 1 次提交
  20. 01 3月, 2006 1 次提交
  21. 14 2月, 2006 1 次提交
  22. 01 2月, 2006 1 次提交
    • D
      [PATCH] USB: fix EHCI early handoff issues · 401feafa
      David Brownell 提交于
      This moves the previously widely-used ehci-pci.c BIOS handoff
      code into the pci-quirks.c file, replacing the less widely used
      "early handoff" version that seems to cause problems lately.
      
      One notable change:  the "early handoff" version always enabled
      an SMI IRQ ... and did so even if the pre-Linux code said it was
      not using EHCI (and not expecting EHCI SMIs).  Looks like a goof
      in a workaround for some unknown BIOS version.
      
      This merged version only forcibly enables those IRQs when pre-Linux
      code says it's using EHCI.  And now it always forces them off "just
      in case".
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      401feafa
  23. 05 1月, 2006 1 次提交
  24. 05 11月, 2005 1 次提交
  25. 01 11月, 2005 1 次提交
  26. 29 10月, 2005 4 次提交
    • A
      [PATCH] USB: Always do usb-handoff · 478a3bab
      Alan Stern 提交于
      This revised patch (as586b) makes usb-handoff permanently true and no
      longer a kernel boot parameter.  It also removes the piix3_usb quirk code;
      that was nothing more than an early version of the USB handoff code
      (written at a time when Intel's PIIX3 was about the only motherboard with
      USB support).  And it adds identifiers for the three PCI USB controller
      classes to pci_ids.h.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      478a3bab
    • A
      [PATCH] UHCI: unify BIOS handoff and driver reset code · bb200f6e
      Alan Stern 提交于
      This patch (as574) updates the PCI BIOS usb-handoff code for UHCI
      controllers, making it work like the reset routines in uhci-hcd.  This
      allows uhci-hcd to drop its own routines in favor of the new ones
      (code-sharing).
      
      Once the patch is merged we can turn the usb-handoff option on
      permanently, as far as UHCI is concerned.  OHCI and EHCI may still have
      some issues.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      bb200f6e
    • D
      [PATCH] update PCI early-handoff handling for OHCI · f2cb36c1
      David Brownell 提交于
      The PCI "early usb handoff" quirk logic didn't work like "ohci-hcd" ...
      This patch makes it do so by:
      
        - Resetting the controller after kicking BIOS off, matching the
          normal "chip in hardware reset" startup mode;
      
        - Reporting any BIOS that borks this simple handoff; it's likely
          got a few other surprises for us too.
      
        - Ignoring that handoff on HPPA;
      
      The diagnostic string is mostly shared with EHCI, saving a few bytes.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
       drivers/usb/host/pci-quirks.c |   22 ++++++++++++++++++----
       1 file changed, 18 insertions(+), 4 deletions(-)
      f2cb36c1
    • D
      [PATCH] USB: move handoff code · 7586269c
      David Brownell 提交于
      This moves the PCI quirk handling for USB host controllers from the
      PCI directory to the USB directory.  Follow-on patches will need to:
      
      (a) merge these copies with the originals in the HCD reset methods.
      they don't wholly agree, despite doing the very same thing; and
      
      (b) eventually change it so "usb-handoff" is the default, to help
      get more robust USB/BIOS/input/... interactions.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
       drivers/Makefile              |    2
       drivers/pci/quirks.c          |  253 ---------------------------------------
       drivers/usb/Makefile          |    1
       drivers/usb/host/Makefile     |    5
       drivers/usb/host/pci-quirks.c |  272 ++++++++++++++++++++++++++++++++++++++++++
       5 files changed, 280 insertions(+), 253 deletions(-)
      7586269c