X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fpci%2Fhotplug%2Fpciehp.h;h=0aac6a61337d166c0d8c10f2a8e9e32aa6f2705d;hb=987b0145d94eecf292d8b301228356f44611ab7c;hp=92c1f0f1e1ad606ca671e0246c149235acd9f0c8;hpb=f7ed79d23a47594e7834d66a8f14449796d4f3e6;p=linux-2.6.git diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h index 92c1f0f1e..0aac6a613 100644 --- a/drivers/pci/hotplug/pciehp.h +++ b/drivers/pci/hotplug/pciehp.h @@ -34,7 +34,6 @@ #include #include /* signal_pending() */ #include -#include #include "pci_hotplug.h" #define MY_NAME "pciehp" @@ -50,6 +49,12 @@ extern int pciehp_force; #define info(format, arg...) printk(KERN_INFO "%s: " format, MY_NAME , ## arg) #define warn(format, arg...) printk(KERN_WARNING "%s: " format, MY_NAME , ## arg) +struct hotplug_params { + u8 cache_line_size; + u8 latency_timer; + u8 enable_serr; + u8 enable_perr; +}; struct slot { struct slot *next; @@ -91,7 +96,7 @@ struct php_ctlr_state_s { #define MAX_EVENTS 10 struct controller { struct controller *next; - struct mutex crit_sect; /* critical section mutex */ + struct semaphore crit_sect; /* critical section semaphore */ struct php_ctlr_state_s *hpc_ctlr_handle; /* HPC controller handle */ int num_slots; /* Number of slots on ctlr */ int slot_num_inc; /* 1 or -1 */ @@ -186,6 +191,9 @@ extern u8 pciehp_handle_power_fault (u8 hp_slot, void *inst_id); /* pci functions */ extern int pciehp_configure_device (struct slot *p_slot); extern int pciehp_unconfigure_device (struct slot *p_slot); +extern int pciehp_get_hp_hw_control_from_firmware(struct pci_dev *dev); +extern void pciehp_get_hp_params_from_firmware(struct pci_dev *dev, + struct hotplug_params *hpp); @@ -277,19 +285,4 @@ struct hpc_ops { int (*check_lnk_status) (struct controller *ctrl); }; - -#ifdef CONFIG_ACPI -#define pciehp_get_hp_hw_control_from_firmware(dev) \ - pciehp_acpi_get_hp_hw_control_from_firmware(dev) -static inline int pciehp_get_hp_params_from_firmware(struct pci_dev *dev, - struct hotplug_params *hpp) -{ - if (ACPI_FAILURE(acpi_get_hp_params_from_firmware(dev, hpp))) - return -ENODEV; - return 0; -} -#else -#define pciehp_get_hp_hw_control_from_firmware(dev) 0 -#define pciehp_get_hp_params_from_firmware(dev, hpp) (-ENODEV) -#endif /* CONFIG_ACPI */ #endif /* _PCIEHP_H */