1. 12 7月, 2019 1 次提交
    • L
      PCI: Enable NVIDIA HDA controllers · b516ea58
      Lukas Wunner 提交于
      Many NVIDIA GPUs can be configured as either a single-function video device
      or a multi-function device with video at function 0 and an HDA audio
      controller at function 1.  The HDA controller can be enabled or disabled by
      a bit in the function 0 config space.
      
      Some BIOSes leave the HDA disabled, which means the HDMI connector from the
      NVIDIA GPU may not work.  Sometimes the BIOS enables the HDA if an HDMI
      cable is connected at boot time, but that doesn't handle hotplug cases.
      
      Enable the HDA controller on device enumeration and resume and re-read the
      header type, which tells us whether the GPU is a multi-function device.
      
      This quirk is limited to NVIDIA PCI devices with the VGA Controller device
      class.  This is expected to correspond to product configurations where the
      NVIDIA GPU has connectors attached.  Other products where the device class
      is 3D Controller are expected to correspond to configurations where the
      NVIDIA GPU is dedicated (dGPU) and has no connectors.  See original post
      (URL below) for more details.
      
      This commit takes inspiration from an earlier patch by Daniel Drake.
      
      Link: https://lore.kernel.org/r/20190708051744.24039-1-drake@endlessm.com v2
      Link: https://lore.kernel.org/r/20190613063514.15317-1-drake@endlessm.com v1
      Link: https://devtalk.nvidia.com/default/topic/1024022
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75985Signed-off-by: NLukas Wunner <lukas@wunner.de>
      Signed-off-by: NDaniel Drake <drake@endlessm.com>
      [bhelgaas: commit log, log message, return early if already enabled]
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Cc: Aaron Plattner <aplattner@nvidia.com>
      Cc: Peter Wu <peter@lekensteyn.nl>
      Cc: Ilia Mirkin <imirkin@alum.mit.edu>
      Cc: Karol Herbst <kherbst@redhat.com>
      Cc: Maik Freudenberg <hhfeuer@gmx.de>
      b516ea58
  2. 14 6月, 2019 2 次提交
    • A
      PCI: Add NVIDIA GPU multi-function power dependencies · 6d2e369f
      Abhishek Sahu 提交于
      The NVIDIA Turing GPU is a multi-function PCI device with the following
      functions:
      
        - Function 0: VGA display controller
        - Function 1: Audio controller
        - Function 2: USB xHCI Host controller
        - Function 3: USB Type-C UCSI controller
      
      Function 0 is tightly coupled with other functions in the hardware.  When
      function 0 is in D3, it gates power for hardware blocks used by other
      functions, which means those functions only work when function 0 is in D0.
      If any of these functions (1/2/3) are in D0, then function 0 should also be
      in D0.
      
      Commit 07f4f97d ("vga_switcheroo: Use device link for HDA controller")
      already creates a device link to show the dependency of function 1 on
      function 0 of this GPU.  Create additional device links to express the
      dependencies of functions 2 and 3 on function 0.  This means function 0
      will be in D0 if any other function is in D0.
      
      [bhelgaas: I think the PCI spec expectation is that functions can be
      power-managed independently, so I don't think this device is technically
      compliant.  For example, the PCIe r5.0 spec, sec 1.4, says "the PCI/PCIe
      hardware/software model includes architectural constructs necessary to
      discover, configure, and use a Function, without needing Function-specific
      knowledge" and sec 5.1 says "D states are associated with a particular
      Function" and "PM provides ... a mechanism to identify power management
      capabilities of a given Function [and] the ability to transition a Function
      into a certain power management state."]
      
      Link: https://lore.kernel.org/lkml/20190606092225.17960-3-abhsahu@nvidia.comSigned-off-by: NAbhishek Sahu <abhsahu@nvidia.com>
      [bhelgaas: commit log]
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      6d2e369f
    • A
      PCI: Generalize multi-function power dependency device links · a17beb1a
      Abhishek Sahu 提交于
      Although not allowed by the PCI specs, some multi-function devices have
      power dependencies between the functions.  For example, function 1 may not
      work unless function 0 is in the D0 power state.
      
      The existing quirk_gpu_hda() adds a device link to express this dependency
      for GPU and HDA devices, but it really is not specific to those device
      types.
      
      Generalize it and rename it to pci_create_device_link() so we can create
      dependencies between any "consumer" and "producer" functions of a
      multi-function device, where the consumer is only functional if the
      producer is in D0.  This reorganization should not affect any
      functionality.
      
      Link: https://lore.kernel.org/lkml/20190606092225.17960-2-abhsahu@nvidia.comSigned-off-by: NAbhishek Sahu <abhsahu@nvidia.com>
      [bhelgaas: commit log, reword diagnostic]
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      a17beb1a
  3. 09 5月, 2019 3 次提交
  4. 25 4月, 2019 1 次提交
    • L
      PCI: Reset Lenovo ThinkPad P50 nvgpu at boot if necessary · e0547c81
      Lyude Paul 提交于
      On ThinkPad P50 SKUs with an Nvidia Quadro M1000M instead of the M2000M
      variant, the BIOS does not always reset the secondary Nvidia GPU during
      reboot if the laptop is configured in Hybrid Graphics mode.  The reason is
      unknown, but the following steps and possibly a good bit of patience will
      reproduce the issue:
      
        1. Boot up the laptop normally in Hybrid Graphics mode
        2. Make sure nouveau is loaded and that the GPU is awake
        3. Allow the Nvidia GPU to runtime suspend itself after being idle
        4. Reboot the machine, the more sudden the better (e.g. sysrq-b may help)
        5. If nouveau loads up properly, reboot the machine again and go back to
           step 2 until you reproduce the issue
      
      This results in some very strange behavior: the GPU will be left in exactly
      the same state it was in when the previously booted kernel started the
      reboot.  This has all sorts of bad side effects: for starters, this
      completely breaks nouveau starting with a mysterious EVO channel failure
      that happens well before we've actually used the EVO channel for anything:
      
        nouveau 0000:01:00.0: disp: chid 0 mthd 0000 data 00000400 00001000 00000002
      
      This causes a timeout trying to bring up the GR ctx:
      
        nouveau 0000:01:00.0: timeout
        WARNING: CPU: 0 PID: 12 at drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.c:1547 gf100_grctx_generate+0x7b2/0x850 [nouveau]
        Hardware name: LENOVO 20EQS64N0B/20EQS64N0B, BIOS N1EET82W (1.55 ) 12/18/2018
        Workqueue: events_long drm_dp_mst_link_probe_work [drm_kms_helper]
        ...
        nouveau 0000:01:00.0: gr: wait for idle timeout (en: 1, ctxsw: 0, busy: 1)
        nouveau 0000:01:00.0: gr: wait for idle timeout (en: 1, ctxsw: 0, busy: 1)
        nouveau 0000:01:00.0: fifo: fault 01 [WRITE] at 0000000000008000 engine 00 [GR] client 15 [HUB/SCC_NB] reason c4 [] on channel -1 [0000000000 unknown]
      
      The GPU never manages to recover.  Booting without loading nouveau causes
      issues as well, since the GPU starts sending spurious interrupts that cause
      other device's IRQs to get disabled by the kernel:
      
        irq 16: nobody cared (try booting with the "irqpoll" option)
        ...
        handlers:
        [<000000007faa9e99>] i801_isr [i2c_i801]
        Disabling IRQ #16
        ...
        serio: RMI4 PS/2 pass-through port at rmi4-00.fn03
        i801_smbus 0000:00:1f.4: Timeout waiting for interrupt!
        i801_smbus 0000:00:1f.4: Transaction timeout
        rmi4_f03 rmi4-00.fn03: rmi_f03_pt_write: Failed to write to F03 TX register (-110).
        i801_smbus 0000:00:1f.4: Timeout waiting for interrupt!
        i801_smbus 0000:00:1f.4: Transaction timeout
        rmi4_physical rmi4-00: rmi_driver_set_irq_bits: Failed to change enabled interrupts!
      
      This causes the touchpad and sometimes other things to get disabled.
      
      Since this happens without nouveau, we can't fix this problem from nouveau
      itself.
      
      Add a PCI quirk for the specific P50 variant of this GPU.  Make sure the
      GPU is advertising NoReset- so we don't reset the GPU when the machine is
      in Dedicated graphics mode (where the GPU being initialized by the BIOS is
      normal and expected).  Map the GPU MMIO space and read the magic 0x2240c
      register, which will have bit 1 set if the device was POSTed during a
      previous boot.  Once we've confirmed all of this, reset the GPU and
      re-disable it - bringing it back to a healthy state.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=203003
      Link: https://lore.kernel.org/lkml/20190212220230.1568-1-lyude@redhat.comSigned-off-by: NLyude Paul <lyude@redhat.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Cc: nouveau@lists.freedesktop.org
      Cc: dri-devel@lists.freedesktop.org
      Cc: Karol Herbst <kherbst@redhat.com>
      Cc: Ben Skeggs <skeggsb@gmail.com>
      Cc: stable@vger.kernel.org
      e0547c81
  5. 23 4月, 2019 1 次提交
  6. 11 4月, 2019 1 次提交
  7. 09 4月, 2019 1 次提交
    • S
      treewide: Switch printk users from %pf and %pF to %ps and %pS, respectively · d75f773c
      Sakari Ailus 提交于
      %pF and %pf are functionally equivalent to %pS and %ps conversion
      specifiers. The former are deprecated, therefore switch the current users
      to use the preferred variant.
      
      The changes have been produced by the following command:
      
      	git grep -l '%p[fF]' | grep -v '^\(tools\|Documentation\)/' | \
      	while read i; do perl -i -pe 's/%pf/%ps/g; s/%pF/%pS/g;' $i; done
      
      And verifying the result.
      
      Link: http://lkml.kernel.org/r/20190325193229.23390-1-sakari.ailus@linux.intel.com
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: sparclinux@vger.kernel.org
      Cc: linux-um@lists.infradead.org
      Cc: xen-devel@lists.xenproject.org
      Cc: linux-acpi@vger.kernel.org
      Cc: linux-pm@vger.kernel.org
      Cc: drbd-dev@lists.linbit.com
      Cc: linux-block@vger.kernel.org
      Cc: linux-mmc@vger.kernel.org
      Cc: linux-nvdimm@lists.01.org
      Cc: linux-pci@vger.kernel.org
      Cc: linux-scsi@vger.kernel.org
      Cc: linux-btrfs@vger.kernel.org
      Cc: linux-f2fs-devel@lists.sourceforge.net
      Cc: linux-mm@kvack.org
      Cc: ceph-devel@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: NSakari Ailus <sakari.ailus@linux.intel.com>
      Acked-by: David Sterba <dsterba@suse.com> (for btrfs)
      Acked-by: Mike Rapoport <rppt@linux.ibm.com> (for mm/memblock.c)
      Acked-by: Bjorn Helgaas <bhelgaas@google.com> (for drivers/pci)
      Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NPetr Mladek <pmladek@suse.com>
      d75f773c
  8. 06 4月, 2019 2 次提交
    • S
      PCI: Work around Pericom PCIe-to-PCI bridge Retrain Link erratum · 4ec73791
      Stefan Mätje 提交于
      Due to an erratum in some Pericom PCIe-to-PCI bridges in reverse mode
      (conventional PCI on primary side, PCIe on downstream side), the Retrain
      Link bit needs to be cleared manually to allow the link training to
      complete successfully.
      
      If it is not cleared manually, the link training is continuously restarted
      and no devices below the PCI-to-PCIe bridge can be accessed.  That means
      drivers for devices below the bridge will be loaded but won't work and may
      even crash because the driver is only reading 0xffff.
      
      See the Pericom Errata Sheet PI7C9X111SLB_errata_rev1.2_102711.pdf for
      details.  Devices known as affected so far are: PI7C9X110, PI7C9X111SL,
      PI7C9X130.
      
      Add a new flag, clear_retrain_link, in struct pci_dev.  Quirks for affected
      devices set this bit.
      
      Note that pcie_retrain_link() lives in aspm.c because that's currently the
      only place we use it, but this erratum is not specific to ASPM, and we may
      retrain links for other reasons in the future.
      Signed-off-by: NStefan Mätje <stefan.maetje@esd.eu>
      [bhelgaas: apply regardless of CONFIG_PCIEASPM]
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      CC: stable@vger.kernel.org
      4ec73791
    • A
      PCI: Add function 1 DMA alias quirk for Marvell 9170 SATA controller · 9cde402a
      Andre Przywara 提交于
      There is a Marvell 88SE9170 PCIe SATA controller I found on a board here.
      Some quick testing with the ARM SMMU enabled reveals that it suffers from
      the same requester ID mixup problems as the other Marvell chips listed
      already.
      
      Add the PCI vendor/device ID to the list of chips which need the
      workaround.
      Signed-off-by: NAndre Przywara <andre.przywara@arm.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      CC: stable@vger.kernel.org
      9cde402a
  9. 07 2月, 2019 1 次提交
    • T
      PCI: Work around Synopsys duplicate Device ID (HAPS USB3, NXP i.MX) · f57a98e1
      Thinh Nguyen 提交于
      There are at least four different parts with the same Vendor and Device
      ID ([16c3:abcd]):
      
        1) Synopsys HAPS USB3 controller
        2) Synopsys PCIe Root Port in Freescale/NXP i.MX6Q (reported by Lucas)
        3) Synopsys PCIe Root Port in Freescale/NXP i.MX6QP (reported by Lukas)
        4) Synopsys PCIe Root Port in Freescale/NXP i.MX7D (reported by Trent)
      
      The HAPS USB3 controller has a Class Code of PCI_CLASS_SERIAL_USB_XHCI,
      which means the XHCI driver would normally claim it.  Previously,
      quirk_synopsys_haps() changed the Class Code of all [16c3:abcd] devices,
      including the Root Ports, to PCI_CLASS_SERIAL_USB_DEVICE to prevent the
      XHCI driver from claiming them so dwc3-haps can claim them instead.
      
      Changing the Class Code of the Root Ports prevents the PCI core from
      handling them as bridges, so devices below them don't work.
      
      Restrict the quirk so it only changes the Class Code for devices that start
      with the PCI_CLASS_SERIAL_USB_XHCI Class Code, leaving the Root Ports
      alone.
      
      Fixes: 03e67425 ("PCI: Override Synopsys USB 3.x HAPS device class")
      Reported-by: NLukas F. Hartmann <lukas@mntmn.com>
      Reported-by: NTrent Piepho <tpiepho@impinj.com>
      Reported-by: NLucas Stach <l.stach@pengutronix.de>
      Signed-off-by: NThinh Nguyen <thinhn@synopsys.com>
      [bhelgaas: changelog]
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      f57a98e1
  10. 02 2月, 2019 1 次提交
  11. 15 1月, 2019 1 次提交
  12. 18 12月, 2018 1 次提交
  13. 12 10月, 2018 3 次提交
    • L
      PCI: Fix Switchtec DMA aliasing quirk dmesg noise · 742bbe1e
      Logan Gunthorpe 提交于
      Currently the Switchtec quirk runs on all endpoints in the switch,
      including all the upstream and downstream ports.  These other functions do
      not contain BARs, so the quirk fails when trying to map the BAR and prints
      the error "Cannot iomap Switchtec device".  The user will see a few of
      these useless and scary errors, one for each port in the switch.
      
      At most, the quirk should only run on either a management endpoint
      (PCI_CLASS_MEMORY_OTHER) or an NTB endpoint (PCI_CLASS_BRIDGE_OTHER).
      However, the quirk is useless except in NTB applications, so we will
      only run it when the class is PCI_CLASS_BRIDGE_OTHER.
      
      Switch to using DECLARE_PCI_FIXUP_CLASS_FINAL and only match
      PCI_CLASS_BRIDGE_OTHER.
      Reported-by: NStephen Bates <sbates@raithlin.com>
      Fixes: ad281ecf ("PCI: Add DMA alias quirk for Microsemi Switchtec NTB")
      Signed-off-by: NLogan Gunthorpe <logang@deltatee.com>
      [bhelgaas: split SWITCHTEC_QUIRK() introduction to separate patch]
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Cc: Doug Meyer <dmeyer@gigaio.com>
      Cc: Kurt Schwemmer <kurt.schwemmer@microsemi.com>
      742bbe1e
    • L
      PCI: Add macro for Switchtec quirk declarations · 01d5d7fa
      Logan Gunthorpe 提交于
      Add SWITCHTEC_QUIRK() to reduce redundancy in declaring devices that use
      quirk_switchtec_ntb_dma_alias().
      
      By itself, this is no functional change, but a subsequent patch updates
      SWITCHTEC_QUIRK() to fix ad281ecf ("PCI: Add DMA alias quirk for
      Microsemi Switchtec NTB").
      
      Fixes: ad281ecf ("PCI: Add DMA alias quirk for Microsemi Switchtec NTB")
      Signed-off-by: NLogan Gunthorpe <logang@deltatee.com>
      [bhelgaas: split to separate patch]
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      01d5d7fa
    • B
      PCI: Add Device IDs for Intel GPU "spurious interrupt" quirk · d0c9606b
      Bin Meng 提交于
      Add Device IDs to the Intel GPU "spurious interrupt" quirk table.
      
      For these devices, unplugging the VGA cable and plugging it in again causes
      spurious interrupts from the IGD.  Linux eventually disables the interrupt,
      but of course that disables any other devices sharing the interrupt.
      
      The theory is that this is a VGA BIOS defect: it should have disabled the
      IGD interrupt but failed to do so.
      
      See f67fd55f ("PCI: Add quirk for still enabled interrupts on Intel
      Sandy Bridge GPUs") and 7c82126a ("PCI: Add new ID for Intel GPU
      "spurious interrupt" quirk") for some history.
      
      [bhelgaas: See link below for discussion about how to fix this more
      generically instead of adding device IDs for every new Intel GPU.  I hope
      this is the last patch to add device IDs.]
      
      Link: https://lore.kernel.org/linux-pci/1537974841-29928-1-git-send-email-bmeng.cn@gmail.comSigned-off-by: NBin Meng <bmeng.cn@gmail.com>
      [bhelgaas: changelog]
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Cc: stable@vger.kernel.org	# v3.4+
      d0c9606b
  14. 18 9月, 2018 1 次提交
  15. 11 9月, 2018 1 次提交
  16. 23 8月, 2018 1 次提交
  17. 15 8月, 2018 1 次提交
  18. 14 8月, 2018 1 次提交
  19. 10 8月, 2018 5 次提交
  20. 13 7月, 2018 3 次提交
    • R
      PCI: iproc: Activate PAXC bridge quirk for more devices · b95e2cd0
      Ray Jui 提交于
      Activate PAXC bridge quirk for more PAXC based PCIe root complex with
      the following PCIe device ID:
      0xd750, 0xd802, 0xd804
      Signed-off-by: NRay Jui <ray.jui@broadcom.com>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Reviewed-by: NOza Pawandeep <poza@codeaurora.org>
      Acked-by: NBjorn Helgaas <bhelgaas@google.com>
      b95e2cd0
    • G
      PCI: Mark fall-through switch cases before enabling -Wimplicit-fallthrough · d6488ac1
      Gustavo A. R. Silva 提交于
      In preparation to enabling -Wimplicit-fallthrough, mark switch cases where
      we are expecting to fall through.
      
      Warning level 2 was used: -Wimplicit-fallthrough=2
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      d6488ac1
    • J
      PCI: Workaround IDT switch ACS Source Validation erratum · aa667c64
      James Puthukattukaran 提交于
      Some IDT switches incorrectly flag an ACS Source Validation error on
      completions for config read requests even though PCIe r4.0, sec 6.12.1.1,
      says that completions are never affected by ACS Source Validation.  Here's
      the text of IDT 89H32H8G3-YC, erratum #36:
      
        Item #36 - Downstream port applies ACS Source Validation to Completions
        Section 6.12.1.1 of the PCI Express Base Specification 3.1 states that
        completions are never affected by ACS Source Validation.  However,
        completions received by a downstream port of the PCIe switch from a
        device that has not yet captured a PCIe bus number are incorrectly
        dropped by ACS Source Validation by the switch downstream port.
      
        Workaround: Issue a CfgWr1 to the downstream device before issuing the
        first CfgRd1 to the device.  This allows the downstream device to capture
        its bus number; ACS Source Validation no longer stops completions from
        being forwarded by the downstream port.  It has been observed that
        Microsoft Windows implements this workaround already; however, some
        versions of Linux and other operating systems may not.
      
      When doing the first config read to probe for a device, if the device is
      behind an IDT switch with this erratum:
      
        1. Disable ACS Source Validation if enabled
        2. Wait for device to become ready to accept config accesses (by using
           the Config Request Retry Status mechanism)
        3. Do a config write to the endpoint
        4. Enable ACS Source Validation (if it was enabled to begin with)
      
      The workaround suggested by IDT is basically only step 3, but we don't know
      when the device is ready to accept config requests.  That means we need to
      do config reads until we receive a non-Config Request Retry Status, which
      means we need to disable ACS SV temporarily.
      Signed-off-by: NJames Puthukattukaran <james.puthukattukaran@oracle.com>
      [bhelgaas: changelog, clean up whitespace, fold in unused variable fix
      from Anders Roxell <anders.roxell@linaro.org>]
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NAlex Williamson <alex.williamson@redhat.com>
      aa667c64
  21. 30 6月, 2018 1 次提交
    • D
      PCI: Add DMA alias quirk for Microsemi Switchtec NTB · ad281ecf
      Doug Meyer 提交于
      Add a quirk for the Microsemi Switchtec parts to allow DMA access via
      non-transparent bridging to work when the IOMMU is turned on.
      
      This exclusively addresses the ability of a remote NT endpoint to perform
      DMA accesses through the locally enumerated NT endpoint.  Other aspects of
      the Switchtec NTB functionality, such as interrupts for doorbells and
      messages are independent of this quirk, and will work whether the IOMMU is
      on or off.
      
      When a requestor on one NT endpoint accesses memory on another NT endpoint,
      it does this via a devfn proxy ID.  Proxy IDs are statically assigned to
      each NT endpoint by the NTB hardware as part of the release-from-reset
      sequence prior to PCI enumeration.  These proxy IDs cannot be modified
      dynamically, and are not visible to the host during enumeration.
      
      When the Switchtec NTB driver loads it will map local requestor IDs, such
      as the root complex and transparent bridge DMA engines, to proxy IDs by
      populating those requestor IDs in hardware mapping table table entries.
      This establishes a fixed relationship between a requestor ID and a proxy
      ID.
      
      When a peer on a remote NT endpoint performs an access within a particular
      translation window in it's NT endpoint BAR address space, that access is
      translated to a DMA request on the local endpoint's bus.  As part of the
      translation process, the original requestor ID has its devfn replaced with
      the proxy ID, and the bus portion of the BDF is replaced with the bus of
      the local NT endpoint.  Thus, the DMA access from a remote NT endpoint will
      appear on the local bus to have come from the unknown devfn which the IOMMU
      will reject.
      
      Interrogate NTB hardware registers for each remote NT endpoint to obtain
      the proxy IDs that have been assigned to it and alias them to the local
      (enumerated) NT endpoint's device.  The IOMMU then accepts the remote proxy
      IDs as if they were requests coming directly from the enumerated endpoint,
      giving remote requestors access to memory resources which the local host
      has made available.
      
      Note that the aliasing of the proxy IDs cannot be performed at the driver
      level given the current IOMMU architecture.  Superficially this is because
      pci_add_dma_alias() symbol is not exported.  Functionally, the current
      IOMMU design requires the aliasing to be performed prior to the creation of
      IOMMU groups.  If a driver were to attempt to use pci_add_dma_alias() in
      its probe routine it would fail since the IOMMU groups have been set up by
      that time.  If the Switchtec hardware supported dynamic proxy ID
      (re-)assignment this would be an issue, but it does not.
      
      To further clarify static proxy ID assignment: While the requester ID to
      proxy ID mapping can be dynamically changed, the number and value of proxy
      IDs given to an NT EP cannot, even for dynamic reconfiguration such as
      hot-add.  Therefore, the chip configuration must account a priori for the
      proxy IDs needs, considering both static and dynamic system configurations.
      For example, a port on the chip may not having anything plugged into it at
      start of day; but it must have a sufficient number of proxy IDs assigned to
      accommodate the supported devices which may be hot-added.
      
      Switchtec NTB functionality with the IOMMU off is unchanged by this quirk.
      Signed-off-by: NDoug Meyer <dmeyer@gigaio.com>
      [bhelgaas: use hard-coded Device IDs instead of adding #defines for each]
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NLogan Gunthorpe <logang@deltatee.com>
      ad281ecf
  22. 11 5月, 2018 2 次提交
  23. 08 5月, 2018 1 次提交
  24. 28 4月, 2018 2 次提交
  25. 11 4月, 2018 1 次提交
    • S
      PCI: Mark Broadcom HT1100 and HT2000 Root Port Extended Tags as broken · 1b30dfd3
      Sinan Kaya 提交于
      Per PCIe r3.1, sec 2.2.6.2 and 7.8.4, a Requester may not use 8-bit Tags
      unless its Extended Tag Field Enable is set, but all Receivers/Completers
      must handle 8-bit Tags correctly regardless of their Extended Tag Field
      Enable.
      
      Some devices do not handle 8-bit Tags as Completers, so add a quirk for
      them.  If we find such a device, we disable Extended Tags for the entire
      hierarchy to make peer-to-peer DMA possible.
      
      The Broadcom HT1100/HT2000/HT2100 seems to have issues with handling 8-bit
      tags.  Mark it as broken.
      
      This fixes Xorg hangs and unresponsive keyboards with errors like this:
      
        radeon 0000:06:00.0: GPU lockup (current fence id 0x000000000000000e last fence id 0x0000000000000
        [drm:r600_ring_test [radeon]] *ERROR* radeon: ring 0 test failed (scratch(0x8504)=0xCAFEDEAD)
        [drm:r600_resume [radeon]] *ERROR* r600 startup failed on resume
      
      Fixes: 60db3a4d ("PCI: Enable PCIe Extended Tags if supported")
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=196197Signed-off-by: NSinan Kaya <okaya@codeaurora.org>
      Signed-off-by: NBjorn Helgaas <helgaas@kernel.org>
      CC: stable@vger.kernel.org	# v4.11: 62ce94a7 PCI: Mark Broadcom HT2100 Root Port Extended Tags as broken
      CC: stable@vger.kernel.org	# v4.11
      1b30dfd3
  26. 20 3月, 2018 1 次提交