Skip to contentSkip to conversation

acpiphp - slot management fix - V3.1

PATCH New Kristen Accardi 1 participant 1 message Feb 23, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 acpiphp - slot management fix - V3.1

o This patch removes IDs (for slots management).
o This patch removes the slot register/unregister processes from the init/exit phases. Instead, adds these processes in the bridge add/cleanup phases.
o Currently, this change doesn't have any meanings. But these changes are needed to support p2p bridge(with hotplug slot)

---
This patch will apply to 2.6.16-rc4-mm1+acpiphp dock patches submitted 2/22.

 drivers/pci/hotplug/acpiphp.h      |    8 --
 drivers/pci/hotplug/acpiphp_core.c |  127 +++++++++++++++++--------------------
 drivers/pci/hotplug/acpiphp_glue.c |   48 ++++++-------
 3 files changed, 86 insertions(+), 97 deletions(-)
drivers/pci/hotplug/acpiphp.h +3 -5
@@ -60,10 +60,7 @@ struct acpiphp_slot;
  * struct slot - slot information for each *physical* slot
  */
 struct slot {
-	u8 number;
 	struct hotplug_slot	*hotplug_slot;
-	struct list_head	slot_list;
-
 	struct acpiphp_slot	*acpi_slot;
 };
 
@@ -119,9 +116,9 @@ struct acpiphp_slot {
 	struct acpiphp_bridge *bridge;	/* parent */
 	struct list_head funcs;		/* one slot may have different
 					   objects (i.e. for each function) */
+	struct slot *slot;
 	struct mutex crit_sect;
 
-	u32		id;		/* slot id (serial #) for hotplug core */
 	u8		device;		/* pci device# */
 
 	u32		sun;		/* ACPI _SUN (slot unique number) */
@@ -229,12 +226,13 @@ struct acpiphp_dock_station {
 /* acpiphp_core.c */
 extern int acpiphp_register_attention(struct acpiphp_attention_info*info);
 extern int acpiphp_unregister_attention(struct acpiphp_attention_info *info);
+extern int acpiphp_register_hotplug_slot(struct acpiphp_slot *slot);
+extern void acpiphp_unregister_hotplug_slot(struct acpiphp_slot *slot);
 
 /* acpiphp_glue.c */
 extern int acpiphp_glue_init (void);
 extern void acpiphp_glue_exit (void);
 extern int acpiphp_get_num_slots (void);
-extern struct acpiphp_slot *get_slot_from_id (int id);
 typedef int (*acpiphp_callback)(struct acpiphp_slot *slot, void *data);
 void handle_hotplug_event_func(acpi_handle, u32, void*);
 
drivers/pci/hotplug/acpiphp_core.c +60 -67

163 lines not on this page · raw message

drivers/pci/hotplug/acpiphp_glue.c +23 -25

99 lines not on this page · raw message