diff options
Diffstat (limited to 'drivers/pci/hotplug/pciehp.h')
| -rw-r--r-- | drivers/pci/hotplug/pciehp.h | 26 | 
1 files changed, 14 insertions, 12 deletions
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h index 541bbe6d534..8e9012dca45 100644 --- a/drivers/pci/hotplug/pciehp.h +++ b/drivers/pci/hotplug/pciehp.h @@ -43,7 +43,6 @@  extern bool pciehp_poll_mode;  extern int pciehp_poll_time;  extern bool pciehp_debug; -extern bool pciehp_force;  #define dbg(format, arg...)						\  do {									\ @@ -77,6 +76,7 @@ struct slot {  	struct hotplug_slot *hotplug_slot;  	struct delayed_work work;	/* work for button event */  	struct mutex lock; +	struct mutex hotplug_lock;  	struct workqueue_struct *wq;  }; @@ -110,6 +110,8 @@ struct controller {  #define INT_BUTTON_PRESS		7  #define INT_BUTTON_RELEASE		8  #define INT_BUTTON_CANCEL		9 +#define INT_LINK_UP			10 +#define INT_LINK_DOWN			11  #define STATIC_STATE			0  #define BLINKINGON_STATE		1 @@ -125,7 +127,7 @@ struct controller {  #define HP_SUPR_RM(ctrl)	((ctrl)->slot_cap & PCI_EXP_SLTCAP_HPS)  #define EMI(ctrl)		((ctrl)->slot_cap & PCI_EXP_SLTCAP_EIP)  #define NO_CMD_CMPL(ctrl)	((ctrl)->slot_cap & PCI_EXP_SLTCAP_NCCS) -#define PSN(ctrl)		((ctrl)->slot_cap >> 19) +#define PSN(ctrl)		(((ctrl)->slot_cap & PCI_EXP_SLTCAP_PSN) >> 19)  int pciehp_sysfs_enable_slot(struct slot *slot);  int pciehp_sysfs_disable_slot(struct slot *slot); @@ -133,6 +135,7 @@ u8 pciehp_handle_attention_button(struct slot *p_slot);  u8 pciehp_handle_switch_change(struct slot *p_slot);  u8 pciehp_handle_presence_change(struct slot *p_slot);  u8 pciehp_handle_power_fault(struct slot *p_slot); +void pciehp_handle_linkstate_change(struct slot *p_slot);  int pciehp_configure_device(struct slot *p_slot);  int pciehp_unconfigure_device(struct slot *p_slot);  void pciehp_queue_pushbutton_work(struct work_struct *work); @@ -140,20 +143,21 @@ struct controller *pcie_init(struct pcie_device *dev);  int pcie_init_notification(struct controller *ctrl);  int pciehp_enable_slot(struct slot *p_slot);  int pciehp_disable_slot(struct slot *p_slot); -int pcie_enable_notification(struct controller *ctrl); +void pcie_enable_notification(struct controller *ctrl);  int pciehp_power_on_slot(struct slot *slot); -int pciehp_power_off_slot(struct slot *slot); -int pciehp_get_power_status(struct slot *slot, u8 *status); -int pciehp_get_attention_status(struct slot *slot, u8 *status); +void pciehp_power_off_slot(struct slot *slot); +void pciehp_get_power_status(struct slot *slot, u8 *status); +void pciehp_get_attention_status(struct slot *slot, u8 *status); -int pciehp_set_attention_status(struct slot *slot, u8 status); -int pciehp_get_latch_status(struct slot *slot, u8 *status); -int pciehp_get_adapter_status(struct slot *slot, u8 *status); +void pciehp_set_attention_status(struct slot *slot, u8 status); +void pciehp_get_latch_status(struct slot *slot, u8 *status); +void pciehp_get_adapter_status(struct slot *slot, u8 *status);  int pciehp_query_power_fault(struct slot *slot);  void pciehp_green_led_on(struct slot *slot);  void pciehp_green_led_off(struct slot *slot);  void pciehp_green_led_blink(struct slot *slot);  int pciehp_check_link_status(struct controller *ctrl); +bool pciehp_check_link_active(struct controller *ctrl);  void pciehp_release_ctrl(struct controller *ctrl);  int pciehp_reset_slot(struct slot *slot, int probe); @@ -163,8 +167,6 @@ static inline const char *slot_name(struct slot *slot)  }  #ifdef CONFIG_ACPI -#include <acpi/acpi.h> -#include <acpi/acpi_bus.h>  #include <linux/pci-acpi.h>  void __init pciehp_acpi_slot_detection_init(void); @@ -180,5 +182,5 @@ static inline int pciehp_acpi_slot_detection_check(struct pci_dev *dev)  {  	return 0;  } -#endif 				/* CONFIG_ACPI */ +#endif				/* CONFIG_ACPI */  #endif				/* _PCIEHP_H */  | 
