1. 21 5月, 2014 1 次提交
    • A
      PCI: Mark RTL8110SC INTx masking as broken · 3cb30b73
      Alex Williamson 提交于
      INTx masking does not work on this device.  To see this, configure the
      network device UP on an active network, note that the interrupt count
      continues to increment for the device in /proc/interrupts.  Use setpci to
      set the PCI_COMMAND_INTX_DISABLE bit in the PCI_COMMAND register.  As
      expected, the interrupt count ceases to increment.  However, reading the
      PCI_STATUS_INTERRUPT bit of the PCI_STATUS register does not indicate that
      interrupts are pending and clearing PCI_COMMAND_INTX_DISABLE in the
      PCI_COMMAND register does not allow the device to continue operation.
      
      This does not affect operation of the host r8169 driver, but it does
      prevent the device from being functional when assigned to a VM, such as
      with QEMU and VFIO.  The guest driver successfully probes the device, but
      there is no traffic.  Mark INTx masking as broken, allowing the more
      restrictive APIC masking to be used instead.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      3cb30b73
  2. 15 4月, 2014 1 次提交
  3. 28 2月, 2014 1 次提交
  4. 12 2月, 2014 2 次提交
  5. 22 12月, 2013 1 次提交
    • Y
      PCI: Convert pcibios_resource_to_bus() to take a pci_bus, not a pci_dev · fc279850
      Yinghai Lu 提交于
      These interfaces:
      
        pcibios_resource_to_bus(struct pci_dev *dev, *bus_region, *resource)
        pcibios_bus_to_resource(struct pci_dev *dev, *resource, *bus_region)
      
      took a pci_dev, but they really depend only on the pci_bus.  And we want to
      use them in resource allocation paths where we have the bus but not a
      device, so this patch converts them to take the pci_bus instead of the
      pci_dev:
      
        pcibios_resource_to_bus(struct pci_bus *bus, *bus_region, *resource)
        pcibios_bus_to_resource(struct pci_bus *bus, *resource, *bus_region)
      
      In fact, with standard PCI-PCI bridges, they only depend on the host
      bridge, because that's the only place address translation occurs, but
      we aren't going that far yet.
      
      [bhelgaas: changelog]
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      fc279850
  6. 28 11月, 2013 1 次提交
  7. 15 11月, 2013 1 次提交
  8. 26 9月, 2013 1 次提交
    • T
      PCI: Remove Intel Haswell D3 delays · b8cac70a
      Todd E Brandt 提交于
      The latest Intel Haswell chipsets have a hardware optimization which
      allows on-chip PCI devices to ignore the 10ms delay before entering
      or exiting D3 suspend.
      
      This patch implements the optimization as a PCI quirk, since we want
      tight control over which devices use it. This way we can test each device
      individually to be sure there are no issues before we enable the quirk.
      The first set of devices are from the Haswell platform, which includes
      every PCI device that is on the northbridge and southbridge.
      
      This patch reduces the Haswell suspend time from 93 ms to 47 ms and resume
      time from 160 ms to 64 ms.
      Signed-off-by: NTodd Brandt <todd.e.brandt@linux.intel.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      b8cac70a
  9. 13 8月, 2013 2 次提交
  10. 26 7月, 2013 1 次提交
  11. 19 6月, 2013 1 次提交
  12. 04 6月, 2013 1 次提交
  13. 16 5月, 2013 1 次提交
  14. 16 4月, 2013 1 次提交
  15. 05 4月, 2013 1 次提交
  16. 27 12月, 2012 1 次提交
  17. 29 11月, 2012 1 次提交
  18. 08 11月, 2012 2 次提交
    • I
      PCI: Add PLX PCI 9050 workaround for some Meilhaus DAQ cards · 2794bb28
      Ian Abbott 提交于
      The Meilhaus ME-2000i and ME-2600i data acquisition cards supported by
      the Comedi "me_daq" driver use the PLX PCI 9050 PCI Target bridge chip
      affected by the bug that prevents the chip's local configuration
      registers being read from BAR0 or BAR1 base addresses that are an odd
      multiple of 128 bytes.  Use the PLX PCI 9050 quirk handler for these
      devices to re-allocate affected regions to a 256-byte boundary.
      Signed-off-by: NIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      2794bb28
    • I
      PCI: Add workaround for PLX PCI 9050 BAR alignment erratum · 21c5fd97
      Ian Abbott 提交于
      The PLX PCI 9050 PCI Target bridge controller has a bug that prevents
      its local configuration registers being read through BAR0 (memory) or
      BAR1 (i/o) if the base address lies on an odd 128-byte boundary, i.e. if
      bit 7 of the base address is non-zero.  This bug is described in the PCI
      9050 errata list, version 1.4, May 2005.  It was fixed in the
      pin-compatible PCI 9052, which can be distinguished from the PCI 9050 by
      checking the revision in the PCI header, which is hard-coded for these
      chips.
      
      Workaround the problem by re-allocating the affected regions to a
      256-byte boundary.  Note that BAR0 and/or BAR1 may have been disabled
      (size 0) during initialization of the PCI chip when its configuration is
      read from a serial EEPROM.
      
      Currently, the fix-up has only been used for devices with the default
      vendor and device ID of the PLX PCI 9050.  The PCI 9052 shares the same
      default device ID as the PCI 9050 but they have different PCI revision
      codes.
      Signed-off-by: NIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      21c5fd97
  19. 24 8月, 2012 1 次提交
  20. 23 8月, 2012 1 次提交
  21. 19 7月, 2012 1 次提交
  22. 16 7月, 2012 1 次提交
  23. 11 7月, 2012 1 次提交
    • A
      PCI: EHCI: fix crash during suspend on ASUS computers · dbf0e4c7
      Alan Stern 提交于
      Quite a few ASUS computers experience a nasty problem, related to the
      EHCI controllers, when going into system suspend.  It was observed
      that the problem didn't occur if the controllers were not put into the
      D3 power state before starting the suspend, and commit
      151b6128 (USB: EHCI: fix crash during
      suspend on ASUS computers) was created to do this.
      
      It turned out this approach messed up other computers that didn't have
      the problem -- it prevented USB wakeup from working.  Consequently
      commit c2fb8a3f (USB: add
      NO_D3_DURING_SLEEP flag and revert 151b6128) was merged; it
      reverted the earlier commit and added a whitelist of known good board
      names.
      
      Now we know the actual cause of the problem.  Thanks to AceLan Kao for
      tracking it down.
      
      According to him, an engineer at ASUS explained that some of their
      BIOSes contain a bug that was added in an attempt to work around a
      problem in early versions of Windows.  When the computer goes into S3
      suspend, the BIOS tries to verify that the EHCI controllers were first
      quiesced by the OS.  Nothing's wrong with this, but the BIOS does it
      by checking that the PCI COMMAND registers contain 0 without checking
      the controllers' power state.  If the register isn't 0, the BIOS
      assumes the controller needs to be quiesced and tries to do so.  This
      involves making various MMIO accesses to the controller, which don't
      work very well if the controller is already in D3.  The end result is
      a system hang or memory corruption.
      
      Since the value in the PCI COMMAND register doesn't matter once the
      controller has been suspended, and since the value will be restored
      anyway when the controller is resumed, we can work around the BIOS bug
      simply by setting the register to 0 during system suspend.  This patch
      (as1590) does so and also reverts the second commit mentioned above,
      which is now unnecessary.
      
      In theory we could do this for every PCI device.  However to avoid
      introducing new problems, the patch restricts itself to EHCI host
      controllers.
      
      Finally the affected systems can suspend with USB wakeup working
      properly.
      
      Reference: https://bugzilla.kernel.org/show_bug.cgi?id=37632
      Reference: https://bugzilla.kernel.org/show_bug.cgi?id=42728Based-on-patch-by: NAceLan Kao <acelan.kao@canonical.com>
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Tested-by: NDâniel Fraga <fragabr@gmail.com>
      Tested-by: NJavier Marcet <jmarcet@gmail.com>
      Tested-by: NAndrey Rahmatullin <wrar@wrar.name>
      Tested-by: NOleksij Rempel <bug-track@fisher-privat.net>
      Tested-by: NPavel Pisa <pisa@cmp.felk.cvut.cz>
      Cc: stable <stable@vger.kernel.org>
      Acked-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      dbf0e4c7
  24. 10 7月, 2012 6 次提交
  25. 19 6月, 2012 2 次提交
  26. 17 6月, 2012 1 次提交
  27. 14 6月, 2012 1 次提交
    • A
      USB: add NO_D3_DURING_SLEEP flag and revert 151b6128 · c2fb8a3f
      Alan Stern 提交于
      This patch (as1558) fixes a problem affecting several ASUS computers:
      The machine crashes or corrupts memory when going into suspend if the
      ehci-hcd driver is bound to any controllers.  Users have been forced
      to unbind or unload ehci-hcd before putting their systems to sleep.
      
      After extensive testing, it was determined that the machines don't
      like going into suspend when any EHCI controllers are in the PCI D3
      power state.  Presumably this is a firmware bug, but there's nothing
      we can do about it except to avoid putting the controllers in D3
      during system sleep.
      
      The patch adds a new flag to indicate whether the problem is present,
      and avoids changing the controller's power state if the flag is set.
      Runtime suspend is unaffected; this matters only for system suspend.
      However as a side effect, the controller will not respond to remote
      wakeup requests while the system is asleep.  Hence USB wakeup is not
      functional -- but of course, this is already true in the current state
      of affairs.
      
      A similar patch has already been applied as commit
      151b6128 (USB: EHCI: fix crash during
      suspend on ASUS computers).  The patch supersedes that one and reverts
      it.  There are two differences:
      
      	The old patch added the flag at the USB level; this patch
      	adds it at the PCI level.
      
      	The old patch applied to all chipsets with the same vendor,
      	subsystem vendor, and product IDs; this patch makes an
      	exception for a known-good system (based on DMI information).
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Tested-by: NDâniel Fraga <fragabr@gmail.com>
      Tested-by: NAndrey Rahmatullin <wrar@wrar.name>
      Tested-by: NSteven Rostedt <rostedt@goodmis.org>
      Cc: stable <stable@vger.kernel.org>
      Reviewed-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c2fb8a3f
  28. 12 6月, 2012 3 次提交
    • A
      PCI: add ACS validation utility · ad805758
      Alex Williamson 提交于
      In a PCI environment, transactions aren't always required to reach
      the root bus before being re-routed.  Intermediate switches between
      an endpoint and the root bus can redirect DMA back downstream before
      things like IOMMUs have a chance to intervene.  Legacy PCI is always
      susceptible to this as it operates on a shared bus.  PCIe added a
      new capability to describe and control this behavior, Access Control
      Services, or ACS.
      
      The utility function pci_acs_enabled() allows us to test the ACS
      capabilities of an individual devices against a set of flags while
      pci_acs_path_enabled() tests a complete path from a given downstream
      device up to the specified upstream device.  We also include the
      ability to add device specific tests as it's likely we'll see
      devices that do not implement ACS, but want to indicate support
      for various capabilities in this space.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      ad805758
    • S
      PCI: move fixup hooks from __init to __devinit · b99ea85a
      Sebastian Andrzej Siewior 提交于
      The fixups are executed once the pci-device is found which is during
      boot process so __init seems fine as long as the platform does not
      support hotplug.
      
      However it is possible to remove the PCI bus at run time and have it
      rediscovered again via "echo 1 > /sys/bus/pci/rescan" and this will call
      the fixups again.
      Signed-off-by: NSebastian Andrzej Siewior <sebastian@breakpoint.cc>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      b99ea85a
    • A
      PCI: add PCI DMA source ID quirk · 12ea6cad
      Alex Williamson 提交于
      DMA transactions are tagged with the source ID of the device making
      the request.  Occasionally hardware screws this up and uses the
      source ID of a different device (often the wrong function number of
      a multifunction device).  A specific Ricoh multifunction device is
      a prime example of this problem and included in this patch.
      
      Given a pci_dev, this function returns the pci_dev to use as the
      source ID for DMA.  When hardware works correctly, this returns
      the input device.  For the components of the Ricoh multifunction
      device, it returns the pci_dev for function 0.
      
      This will be used by IOMMU drivers for determining the boundaries
      of IOMMU groups as multiple devices using the same source ID must
      be contained within the same group.  This can also be used by
      existing streaming DMA paths for the same purpose.
      
      [bhelgaas: fold in pci_dev_get() for !CONFIG_PCI]
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      12ea6cad
  29. 03 5月, 2012 1 次提交