12 Oct, 2009

1 commit

  • This reverts commit db8be50c4307dac2b37305fc59c8dc0f978d09ea, as per

    http://bugzilla.kernel.org/show_bug.cgi?id=14374
    http://marc.info/?l=linux-kernel&m=125446885705223&w=4

    We simply can't do the USB handoff at FIXUP_HEADER time, since it will
    often require us to have valid IO mappings etc. But that in turn
    requires a whole different approach, not this trivial one-liner.

    Maybe we could teach all the USB quirk handoff handlers to only do the
    quirk if the device has all its registers set up (since if it isn't
    initialized, it's unlikely to be active), but regardless that will need
    a whole lot more code than just saying "let's do it really early".

    The proper fix is almost certainly to just leave the legacy IOMMU
    mappings active until after all devices have been initialized.

    Reported-by: Nick Piggin
    Cc: David Woodhouse
    Cc: Greg Kroah-Hartman
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

23 Sep, 2009

1 commit

  • 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: David Woodhouse
    Signed-off-by: Greg Kroah-Hartman

    David Woodhouse
     

16 Jun, 2009

1 commit

  • 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: Sarah Sharp
    Signed-off-by: Greg Kroah-Hartman

    Sarah Sharp
     

25 Mar, 2009

1 commit


08 Jan, 2009

2 commits

  • Instead of waiting a painful 5000ms, quirk_usb_disable_ehci() now does a
    1000ms loop to wait for the BIOS to acknowledge the handoff.

    The five second delay is really quite irritating to have to deal with
    every boot up, and I very seriously doubt any non-broken bios takes more
    than a second to do the actual handoff.

    Signed-off-by: Steven Noonan
    Cc: Alan Stern
    Cc: David Brownell
    Cc: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Steven Noonan
     
  • Use the newly introduced pci_ioremap_bar() function in drivers/usb.
    pci_ioremap_bar() just takes a pci device and a bar number, with the goal
    of making it really hard to get wrong, while also having a central place
    to stick sanity checks.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Greg Kroah-Hartman

    Arjan van de Ven
     

25 Apr, 2008

1 commit


02 Feb, 2008

1 commit

  • Convert quirk printks to dev_printk().

    I made the MSI disable messages a little more consistent:

    - always use "disabled", not "deactivated"
    - specify "device MSI disabled" or "subordinate MSI disabled" when
    disabling MSI for only a specific device or subordinate bus

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Greg Kroah-Hartman

    bjorn.helgaas@hp.com
     

23 May, 2007

1 commit

  • This patch (as882) fixes a problem with the EHCI BIOS handoff. On my
    machine, the BIOS configures the controller and the handoff fails,
    leaving the controller configured. During resume-from-disk, this
    confuses ehci-hcd into thinking that the controller has not been
    tampered with.

    The problem is fixed by turning off the Configured Flag whenever a
    BIOS handoff is attempted, whether it succeeds or not.

    Signed-off-by: Alan Stern
    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     

13 Jul, 2006

1 commit


01 Jul, 2006

1 commit


15 Apr, 2006

1 commit


01 Mar, 2006

1 commit

  • Fix http://bugzilla.kernel.org/show_bug.cgi?id=6128

    Finish morphing the "early handoff" version of the EHCI BIOS handshake over
    to match the previous implementation inside the EHCI driver (except that
    now we forcibly disable the SMI). The version that had been with the PCI
    code was surprisingly full of bugs.

    Signed-off-by: David Brownell
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    David Brownell
     

14 Feb, 2006

1 commit

  • Disable some dubious "early" USB handoff code that allegedly works around bugs
    on some systems (we don't know which ones) but rudely breaks some others.

    Also make the kernel warnings reporting BIOS handoff problems be more useful,
    reporting the register whose value displays the trouble.

    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    David Brownell
     

01 Feb, 2006

1 commit

  • 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: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    David Brownell
     

05 Jan, 2006

1 commit


05 Nov, 2005

1 commit


01 Nov, 2005

1 commit


29 Oct, 2005

4 commits

  • 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: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    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: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • 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: Greg Kroah-Hartman

    drivers/usb/host/pci-quirks.c | 22 ++++++++++++++++++----
    1 file changed, 18 insertions(+), 4 deletions(-)

    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: David Brownell
    Signed-off-by: Greg Kroah-Hartman

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

    David Brownell