aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/acpiphp.h
diff options
context:
space:
mode:
authorKristen Accardi <kristen.c.accardi@intel.com>2006-02-23 20:56:03 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-23 17:35:15 -0500
commit20416ea54087c25502d6fb973b8e119973e16341 (patch)
tree47ca50997cbb408852021315ff4da315292467c2 /drivers/pci/hotplug/acpiphp.h
parentceaba663055e38226a070a9668eac5881d65a2cc (diff)
[PATCH] acpiphp: add dock event handling
These patches add generic dock event handling to acpiphp. If there are pci devices that need to be inserted/removed after the dock event, the event notification will be handed down to the normal pci hotplug event handler in acpiphp so that new bridges/devices can be enumerated. Because some dock stations do not have pci bridges or pci devices that need to be inserted after a dock, acpiphp will remain loaded to handle dock events even if no hotpluggable pci slots are discovered. You probably need to have the pci=assign-busses kernel parameter enabled to use these patches, and you may not allow ibm_acpi to handle docking notifications and use this patch. This patch incorporates feedback provided by many. Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug/acpiphp.h')
-rw-r--r--drivers/pci/hotplug/acpiphp.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/drivers/pci/hotplug/acpiphp.h b/drivers/pci/hotplug/acpiphp.h
index 6a91cfb0f68..885838a2e93 100644
--- a/drivers/pci/hotplug/acpiphp.h
+++ b/drivers/pci/hotplug/acpiphp.h
@@ -161,6 +161,25 @@ struct acpiphp_attention_info
161 struct module *owner; 161 struct module *owner;
162}; 162};
163 163
164
165struct dependent_device {
166 struct list_head device_list;
167 struct list_head pci_list;
168 acpi_handle handle;
169 struct acpiphp_func *func;
170};
171
172
173struct acpiphp_dock_station {
174 acpi_handle handle;
175 u32 last_dock_time;
176 u32 flags;
177 struct acpiphp_func *dock_bridge;
178 struct list_head dependent_devices;
179 struct list_head pci_dependent_devices;
180};
181
182
164/* PCI bus bridge HID */ 183/* PCI bus bridge HID */
165#define ACPI_PCI_HOST_HID "PNP0A03" 184#define ACPI_PCI_HOST_HID "PNP0A03"
166 185
@@ -198,6 +217,12 @@ struct acpiphp_attention_info
198#define FUNC_HAS_PS1 (0x00000020) 217#define FUNC_HAS_PS1 (0x00000020)
199#define FUNC_HAS_PS2 (0x00000040) 218#define FUNC_HAS_PS2 (0x00000040)
200#define FUNC_HAS_PS3 (0x00000080) 219#define FUNC_HAS_PS3 (0x00000080)
220#define FUNC_HAS_DCK (0x00000100)
221#define FUNC_IS_DD (0x00000200)
222
223/* dock station flags */
224#define DOCK_DOCKING (0x00000001)
225#define DOCK_HAS_BRIDGE (0x00000002)
201 226
202/* function prototypes */ 227/* function prototypes */
203 228
@@ -211,6 +236,7 @@ extern void acpiphp_glue_exit (void);
211extern int acpiphp_get_num_slots (void); 236extern int acpiphp_get_num_slots (void);
212extern struct acpiphp_slot *get_slot_from_id (int id); 237extern struct acpiphp_slot *get_slot_from_id (int id);
213typedef int (*acpiphp_callback)(struct acpiphp_slot *slot, void *data); 238typedef int (*acpiphp_callback)(struct acpiphp_slot *slot, void *data);
239void handle_hotplug_event_func(acpi_handle, u32, void*);
214 240
215extern int acpiphp_enable_slot (struct acpiphp_slot *slot); 241extern int acpiphp_enable_slot (struct acpiphp_slot *slot);
216extern int acpiphp_disable_slot (struct acpiphp_slot *slot); 242extern int acpiphp_disable_slot (struct acpiphp_slot *slot);
@@ -220,6 +246,16 @@ extern u8 acpiphp_get_latch_status (struct acpiphp_slot *slot);
220extern u8 acpiphp_get_adapter_status (struct acpiphp_slot *slot); 246extern u8 acpiphp_get_adapter_status (struct acpiphp_slot *slot);
221extern u32 acpiphp_get_address (struct acpiphp_slot *slot); 247extern u32 acpiphp_get_address (struct acpiphp_slot *slot);
222 248
249/* acpiphp_dock.c */
250extern int find_dock_station(void);
251extern void remove_dock_station(void);
252extern void add_dependent_device(struct dependent_device *new_dd);
253extern void add_pci_dependent_device(struct dependent_device *new_dd);
254extern struct dependent_device *get_dependent_device(acpi_handle handle);
255extern int is_dependent_device(acpi_handle handle);
256extern int detect_dependent_devices(acpi_handle *bridge_handle);
257extern struct dependent_device *alloc_dependent_device(acpi_handle handle);
258
223/* variables */ 259/* variables */
224extern int acpiphp_debug; 260extern int acpiphp_debug;
225 261