21 Jun, 2016

1 commit

  • The save/restore buffers for VC state is first composed of a 2-byte control
    register, then a bunch of 4-byte words.

    This causes unaligned accesses which trap on platform such as sparc.

    This is easy to fix by simply moving the buffer pointer forward by 4 bytes
    instead of 2 after dealing with the control register. The length
    adjustment needs to be changed likewise as well.

    Fixes: 5f8fc43217a0 ("PCI: Include pci/pcie/Kconfig directly from pci/Kconfig")
    Reported-by: Meelis Roos
    Reported-by: Anatoly Pugachev
    Signed-off-by: David S. Miller
    Signed-off-by: Bjorn Helgaas
    CC: stable@vger.kernel.org # v4.6+

    David Miller
     

30 May, 2015

1 commit

  • Previously we assumed that PCIe Root Ports and Downstream Ports had Links
    on their secondary side. That is true in most systems, but it is possible
    to connect a switch with either an Upstream or a Downstream Port leading
    downstream.

    Instead of relying on the component type to identify devices that have
    links leading downstream, use the "dev->has_secondary_link" field.

    [bhelgaas: changelog]
    Signed-off-by: Yijing Wang
    Signed-off-by: Bjorn Helgaas

    Yijing Wang
     

18 Dec, 2013

2 commits

  • These are set of two capability registers, it's pretty much given that
    they're registers, so reflect their purpose in the name.

    Suggested-by: Bjorn Helgaas
    Signed-off-by: Alex Williamson
    Signed-off-by: Bjorn Helgaas

    Alex Williamson
     
  • While we don't really have any infrastructure for making use of VC
    support, the system BIOS can configure the topology to non-default
    VC values prior to boot. This may be due to silicon bugs, desire to
    reserve traffic classes, or perhaps just BIOS bugs. When we reset
    devices, the VC configuration may return to default values, which can
    be incompatible with devices upstream. For instance, Nvidia GRID
    cards provide a PCIe switch and some number of GPUs, all supporting
    VC. The power-on default for VC is to support TC0-7 across VC0,
    however some platforms will only enable TC0/VC0 mapping across the
    topology. When we do a secondary bus reset on the downstream switch
    port, the GPU is reset to a TC0-7/VC0 mapping while the opposite end
    of the link only enables TC0/VC0. If the GPU attempts to use TC1-7,
    it fails.

    This patch attempts to provide complete support for VC save/restore,
    even beyond the minimally required use case above. This includes
    save/restore and reload of the arbitration table, save/restore and
    reload of the port arbitration tables, and re-enabling of the
    channels for VC, VC9, and MFVC capabilities.

    Signed-off-by: Alex Williamson
    Signed-off-by: Bjorn Helgaas

    Alex Williamson