]> git.karo-electronics.de Git - linux-beck.git/commitdiff
PCI: Add hotplug_slot_ops.reset_slot()
authorAlex Williamson <alex.williamson@redhat.com>
Thu, 8 Aug 2013 20:09:31 +0000 (14:09 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 14 Aug 2013 20:55:04 +0000 (14:55 -0600)
This optional callback allows hotplug controllers to perform slot
specific resets.  These may be necessary in cases where a normal
secondary bus reset can interact with controller logic and expose
spurious hotplugs.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
include/linux/pci_hotplug.h

index 8db71dcd633740a8a7290aff4a99f6a23ee8e366..bd32109e607e9769ac2e972ced22da8650f1fcfe 100644 (file)
@@ -63,6 +63,9 @@ enum pcie_link_width {
  * @get_adapter_status: Called to get see if an adapter is present in the slot or not.
  *     If this field is NULL, the value passed in the struct hotplug_slot_info
  *     will be used when this value is requested by a user.
+ * @reset_slot: Optional interface to allow override of a bus reset for the
+ *     slot for cases where a secondary bus reset can result in spurious
+ *     hotplug events or where a slot can be reset independent of the bus.
  *
  * The table of function pointers that is passed to the hotplug pci core by a
  * hotplug pci driver.  These functions are called by the hotplug pci core when
@@ -80,6 +83,7 @@ struct hotplug_slot_ops {
        int (*get_attention_status)     (struct hotplug_slot *slot, u8 *value);
        int (*get_latch_status)         (struct hotplug_slot *slot, u8 *value);
        int (*get_adapter_status)       (struct hotplug_slot *slot, u8 *value);
+       int (*reset_slot)               (struct hotplug_slot *slot, int probe);
 };
 
 /**