1. 08 12月, 2016 1 次提交
    • A
      PCI: pciehp: Prioritize data-link event over presence detect · 385895fe
      Ashok Raj 提交于
      If Slot Status indicates changes in both Data Link Layer Status and
      Presence Detect, prioritize the Link status change.
      
      When both events are observed, pciehp currently relies on the Slot Status
      Presence Detect State (PDS) to agree with the Link Status Data Link Layer
      Active status.  The Presence Detect State, however, may be set to 1 through
      out-of-band presence detect even if the link is down, which creates
      conflicting events.
      
      Since the Link Status accurately reflects the reachability of the
      downstream bus, the Link Status event should take precedence over a
      Presence Detect event.  Skip checking the PDC status if we handled a link
      event in the same handler.
      Signed-off-by: NAshok Raj <ashok.raj@intel.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NKeith Busch <keith.busch@intel.com>
      385895fe
  2. 24 11月, 2016 1 次提交
  3. 04 10月, 2016 1 次提交
  4. 29 9月, 2016 2 次提交
  5. 23 9月, 2016 1 次提交
    • K
      PCI: pciehp: Allow exclusive userspace control of indicators · 576243b3
      Keith Busch 提交于
      PCIe hotplug supports optional Attention and Power Indicators, which are
      used internally by pciehp.  Users can't control the Power Indicator, but
      they can control the Attention Indicator by writing to a sysfs "attention"
      file.
      
      The Slot Control register has two bits for each indicator, and the PCIe
      spec defines the encodings for each as (Reserved/On/Blinking/Off).  For
      sysfs "attention" writes, pciehp_set_attention_status() maps into these
      encodings, so the only useful write values are 0 (Off), 1 (On), and 2
      (Blinking).
      
      However, some platforms use all four bits for platform-specific indicators,
      and they need to allow direct user control of them while preventing pciehp
      from using them at all.
      
      Add a "hotplug_user_indicators" flag to the pci_dev structure.  When set,
      pciehp does not use either the Attention Indicator or the Power Indicator,
      and the low four bits (values 0x0 - 0xf) of sysfs "attention" write values
      are written directly to the Attention Indicator Control and Power Indicator
      Control fields.
      
      [bhelgaas: changelog, rename flag and accessors to s/attention/indicator/]
      Signed-off-by: NKeith Busch <keith.busch@intel.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      576243b3
  6. 15 9月, 2016 7 次提交
  7. 13 9月, 2016 1 次提交
  8. 25 8月, 2016 2 次提交
    • P
      PCI: pciehp: Make explicitly non-modular · 70626d88
      Paul Gortmaker 提交于
      This code is not being built as a module by anyone:
      
        obj-$(CONFIG_HOTPLUG_PCI_PCIE)          += pciehp.o
        pciehp-objs                             := pciehp_core.o   \
      
        drivers/pci/pcie/Kconfig:config HOTPLUG_PCI_PCIE
        drivers/pci/pcie/Kconfig:  bool "PCI Express Hotplug driver"
      
      Remove uses of MODULE_DESCRIPTION(), MODULE_AUTHOR(), MODULE_LICENSE(),
      etc., so that when reading the driver there is no doubt it is builtin-only.
      The information is preserved in comments at the top of the file.
      
      Note that for non-modular code, module_init() translates to
      device_initcall().  One could argue that we should use subsys_initcall()
      here, but for now we stick with runtime equivalence.
      
      We delete module.h but we keep the moduleparam.h include, since we are
      keeping the module_param() that the file has as-is for now.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      CC: Kristen Carlson Accardi <kristen@linux.intel.com>
      70626d88
    • P
      PCI: hotplug: Make core explicitly non-modular · 57b51b9a
      Paul Gortmaker 提交于
      This code is not being built as a module by anyone:
      
        obj-$(CONFIG_HOTPLUG_PCI)           += pci_hotplug.o
        [...]
        pci_hotplug-objs                    := pci_hotplug_core.o
      
        drivers/pci/hotplug/Kconfig:menuconfig HOTPLUG_PCI
        drivers/pci/hotplug/Kconfig:  bool "Support for PCI Hotplug"
      
      Remove uses of MODULE_DESCRIPTION(), MODULE_AUTHOR(), MODULE_LICENSE(),
      etc., so that when reading the driver there is no doubt it is builtin-only.
      The information is preserved in comments at the top of the file.
      
      Remove orphaned exit function in cpci_hotplug_core.c.
      
      Note that for non-modular code, module_init() translates to
      device_initcall().  One could argue that we should use subsys_initcall()
      here, but for now we stick with runtime equivalence.
      
      We would delete module.h and just keep the moduleparam.h include (since the
      file does use module_param), but there is a try_module_get and module_put
      pairing that prevents us from doing that.
      
      [bhelgaas: changelog]
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      CC: Scott Murray <scott@spiteful.org>
      CC: Kristen Carlson Accardi <kristen@linux.intel.com>
      57b51b9a
  9. 23 8月, 2016 1 次提交
  10. 05 8月, 2016 1 次提交
  11. 04 8月, 2016 1 次提交
  12. 20 7月, 2016 1 次提交
    • T
      PCI: rpaphp: Fix slot registration for multiple slots under a PHB · e2413a7d
      Tyrel Datwyler 提交于
      The underlying slot hotplug registration code assumed multiple slots, but
      the actual implementation is broken for multiple slots.
      
      This went unnoticed for years do to the fact that PowerVM seems to only
      ever provide a single hotplug slot per PHB.
      
      Under qemu/kvm the hotplug slot model aligns more with x86 where
      multiple slots are presented under a single PHB. As seen in the
      following each additional slot after the first fails to register due to
      each slot always being compared against the first child node of the PHB
      in the device tree.
      
        rpaphp: RPA HOT Plug PCI Controller Driver version: 0.1
        rpaphp: Slot [Slot 0] registered
        rpaphp: pci_hp_register failed with error -16
        rpaphp: pci_hp_register failed with error -16
        rpaphp: pci_hp_register failed with error -16
        rpaphp: pci_hp_register failed with error -16
      
      The registration logic is fixed so that each slot is compared
      against the existing child devices of the PHB in the device tree to
      determine present slots vs empty slots.
      
        rpaphp: RPA HOT Plug PCI Controller Driver version: 0.1
        rpaphp: Slot [C0] registered
        rpaphp: Slot [C1] registered
        rpaphp: Slot [C2] registered
        rpaphp: Slot [C3] registered
        rpaphp: Slot [C4] registered
      Signed-off-by: NTyrel Datwyler <tyreld@linux.vnet.ibm.com>
      Reviewed-by: NNathan Fontenot <nfont@linux.vnet.ibm.com>
      [mpe: Massage changelog]
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      e2413a7d
  13. 14 7月, 2016 2 次提交
  14. 21 6月, 2016 2 次提交
    • G
      PCI/hotplug: PowerPC PowerNV PCI hotplug driver · 66725152
      Gavin Shan 提交于
      This adds standalone driver to support PCI hotplug for PowerPC PowerNV
      platform that runs on top of skiboot firmware. The firmware identifies
      hotpluggable slots and marked their device tree node with proper
      "ibm,slot-pluggable" and "ibm,reset-by-firmware". The driver scans
      device tree nodes to create/register PCI hotplug slot accordingly.
      
      The PCI slots are organized in fashion of tree, which means one
      PCI slot might have parent PCI slot and parent PCI slot possibly
      contains multiple child PCI slots. At the plugging time, the parent
      PCI slot is populated before its children. The child PCI slots are
      removed before their parent PCI slot can be removed from the system.
      
      If the skiboot firmware doesn't support slot status retrieval, the PCI
      slot device node shouldn't have property "ibm,reset-by-firmware". In
      that case, none of valid PCI slots will be detected from device tree.
      The skiboot firmware doesn't export the capability to access attention
      LEDs yet and it's something for TBD.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Acked-by: NBjorn Helgaas <bhelgaas@google.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      66725152
    • L
      PCI: pciehp: Ignore interrupts during D3cold · ed91de7e
      Lukas Wunner 提交于
      If a hotplug port is suspended to D3cold, its slot status register cannot
      be read.  If that hotplug port happens to share its IRQ with other devices,
      whenever an interrupt occurs for one of these devices, pciehp logs a
      "no response from device" message and tries to read the PCI_EXP_SLTSTA
      register, even though we know that will fail.
      
      Ignore interrupts while we're in D3cold.
      
      [bhelgaas: changelog]
      Signed-off-by: NLukas Wunner <lukas@wunner.de>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      ed91de7e
  15. 14 6月, 2016 1 次提交
  16. 11 5月, 2016 2 次提交
  17. 15 4月, 2016 1 次提交
  18. 23 2月, 2016 1 次提交
  19. 24 1月, 2016 1 次提交
  20. 11 1月, 2016 2 次提交
  21. 09 1月, 2016 4 次提交
  22. 11 12月, 2015 1 次提交
    • B
      PCI: Check for PCI_HEADER_TYPE_BRIDGE equality, not bitmask · 93de6901
      Bjorn Helgaas 提交于
      Bit 7 of the "Header Type" register indicates a multi-function device when
      set.  Bits 0-6 contain encoded values, where 0x1 indicates a PCI-PCI
      bridge.  It is incorrect to test this as though it were a mask.
      
      For example, while the PCI 3.0 spec only defines values 0x0, 0x1, and 0x2,
      it's conceivable that a future spec could define 0x3 to mean something
      else; then tests for "(hdr_type & 0x7f) & PCI_HEADER_TYPE_BRIDGE" would
      incorrectly succeed for this new 0x3 header type.
      
      Test bits 0-6 of the Header Type for equality with PCI_HEADER_TYPE_BRIDGE.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      93de6901
  23. 26 11月, 2015 1 次提交
  24. 22 10月, 2015 1 次提交
    • G
      PCI: pciehp: Queue power work requests in dedicated function · bee67756
      Guenter Roeck 提交于
      Up to now, work items to be queued to be handled by pciehp_power_thread()
      are allocated using kmalloc() in three different locations.  If not needed,
      kfree() is called to free the allocated data.
      
      Introduce a separate function to allocate the work item and queue it, and
      call it only if needed.  This reduces code duplication and avoids having to
      free memory if the work item does not need to get executed.
      
      [bhelgaas: tweak "no memory" message, make pciehp_queue_power_work() static]
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      bee67756
  25. 11 8月, 2015 1 次提交