1. 14 11月, 2017 2 次提交
    • B
      PCI/ASPM: Use correct capability pointer to program LTR_L1.2_THRESHOLD · c00054f5
      Bjorn Helgaas 提交于
      Previously we programmed the LTR_L1.2_THRESHOLD in the parent (upstream)
      device using the capability pointer of the *child* (downstream) device,
      which corrupted some random word of the parent's config space.
      
      Use the parent's L1 SS capability pointer to program its
      LTR_L1.2_THRESHOLD.
      
      Fixes: aeda9ade ("PCI/ASPM: Configure L1 substate settings")
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NVidya Sagar <vidyas@nvidia.com>
      CC: stable@vger.kernel.org	# v4.11+
      CC: Rajat Jain <rajatja@google.com>
      c00054f5
    • B
      PCI/ASPM: Account for downstream device's Port Common_Mode_Restore_Time · 94ac327e
      Bjorn Helgaas 提交于
      Every Port that supports the L1.2 substate advertises its Port
      Common_Mode_Restore_Time, i.e., the time the Port requires to re-establish
      common mode when exiting L1.2 (see PCIe r3.1, sec 7.33.2).
      
      Per sec 5.5.3.3.1, when exiting L1.2, the Downstream Port (the device at
      the upstream end of the link) must send TS1 training sequences for at least
      T(COMMONMODE) after it detects electrical idle exit on the Link.  We want
      this to be long enough for both ends of the Link, so we should set it to
      the maximum of the Port Common_Mode_Restore_Time for the upstream and
      downstream components on the Link.
      
      Previously we only looked at the Port Common_Mode_Restore_Time of the
      upstream device, so if the downstream device required more time, we didn't
      program the upstream device's T(COMMONMODE) correctly.
      
      Fixes: f1f0366d ("PCI/ASPM: Calculate and save the L1.2 timing parameters")
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NVidya Sagar <vidyas@nvidia.com>
      Acked-by: NRajat Jain <rajatja@google.com>
      CC: stable@vger.kernel.org	# v4.11+
      94ac327e
  2. 06 10月, 2017 1 次提交
    • A
      PCI/ASPM: Deal with missing root ports in link state handling · ee8bdfb6
      Ard Biesheuvel 提交于
      Even though it is unconventional, some PCIe host implementations omit the
      root ports entirely, and simply consist of a host bridge (which is not
      modeled as a device in the PCI hierarchy) and a link.
      
      When the downstream device is an endpoint, our current code does not seem
      to mind this unusual configuration. However, when PCIe switches are
      involved, the ASPM code assumes that any downstream switch port has a
      parent, and blindly dereferences the bus->parent->self field of the pci_dev
      struct to chain the downstream link state to the link state of the root
      port. Given that the root port is missing, the link is not modeled at all,
      and nor is the link state, and attempting to access it results in a NULL
      pointer dereference and a crash.
      
      Avoid this by allowing the link state chain to terminate at the downstream
      port if no root port exists.
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      ee8bdfb6
  3. 26 9月, 2017 1 次提交
  4. 21 9月, 2017 1 次提交
  5. 15 9月, 2017 1 次提交
    • B
      Revert "PCI: Avoid race while enabling upstream bridges" · 0f50a49e
      Bjorn Helgaas 提交于
      This reverts commit 40f11adc.
      
      Jens found that iwlwifi firmware loading failed on a Lenovo X1 Carbon,
      gen4:
      
        iwlwifi 0000:04:00.0: Direct firmware load for iwlwifi-8000C-34.ucode failed with error -2
        iwlwifi 0000:04:00.0: Direct firmware load for iwlwifi-8000C-33.ucode failed with error -2
        iwlwifi 0000:04:00.0: Direct firmware load for iwlwifi-8000C-32.ucode failed with error -2
        iwlwifi 0000:04:00.0: loaded firmware version 31.532993.0 op_mode iwlmvm
        iwlwifi 0000:04:00.0: Detected Intel(R) Dual Band Wireless AC 8260, REV=0x208
        ...
        iwlwifi 0000:04:00.0: Failed to load firmware chunk!
        iwlwifi 0000:04:00.0: Could not load the [0] uCode section
        iwlwifi 0000:04:00.0: Failed to start INIT ucode: -110
        iwlwifi 0000:04:00.0: Failed to run INIT ucode: -110
      
      He bisected it to 40f11adc ("PCI: Avoid race while enabling upstream
      bridges").  Revert that commit to fix the regression.
      
      Link: http://lkml.kernel.org/r/4bcbcbc1-7c79-09f0-5071-bc2f53bf6574@kernel.dk
      Fixes: 40f11adc ("PCI: Avoid race while enabling upstream bridges")
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      CC: Srinath Mannam <srinath.mannam@broadcom.com>
      CC: Jens Axboe <axboe@kernel.dk>
      CC: Luca Coelho <luca@coelho.fi>
      CC: Johannes Berg <johannes@sipsolutions.net>
      CC: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
      0f50a49e
  6. 14 9月, 2017 1 次提交
  7. 07 9月, 2017 3 次提交
  8. 06 9月, 2017 11 次提交
  9. 02 9月, 2017 2 次提交
  10. 31 8月, 2017 2 次提交
  11. 30 8月, 2017 15 次提交