Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23212
b: refs/heads/master
c: 20416ea
h: refs/heads/master
v: v3
  • Loading branch information
Kristen Accardi authored and Greg Kroah-Hartman committed Mar 23, 2006
1 parent e40edc2 commit dfaf1f0
Show file tree
Hide file tree
Showing 6 changed files with 546 additions and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ceaba663055e38226a070a9668eac5881d65a2cc
refs/heads/master: 20416ea54087c25502d6fb973b8e119973e16341
3 changes: 2 additions & 1 deletion trunk/drivers/pci/hotplug/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ ibmphp-objs := ibmphp_core.o \
ibmphp_hpc.o

acpiphp-objs := acpiphp_core.o \
acpiphp_glue.o
acpiphp_glue.o \
acpiphp_dock.o

rpaphp-objs := rpaphp_core.o \
rpaphp_pci.o \
Expand Down
36 changes: 36 additions & 0 deletions trunk/drivers/pci/hotplug/acpiphp.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,25 @@ struct acpiphp_attention_info
struct module *owner;
};


struct dependent_device {
struct list_head device_list;
struct list_head pci_list;
acpi_handle handle;
struct acpiphp_func *func;
};


struct acpiphp_dock_station {
acpi_handle handle;
u32 last_dock_time;
u32 flags;
struct acpiphp_func *dock_bridge;
struct list_head dependent_devices;
struct list_head pci_dependent_devices;
};


/* PCI bus bridge HID */
#define ACPI_PCI_HOST_HID "PNP0A03"

Expand Down Expand Up @@ -198,6 +217,12 @@ struct acpiphp_attention_info
#define FUNC_HAS_PS1 (0x00000020)
#define FUNC_HAS_PS2 (0x00000040)
#define FUNC_HAS_PS3 (0x00000080)
#define FUNC_HAS_DCK (0x00000100)
#define FUNC_IS_DD (0x00000200)

/* dock station flags */
#define DOCK_DOCKING (0x00000001)
#define DOCK_HAS_BRIDGE (0x00000002)

/* function prototypes */

Expand All @@ -211,6 +236,7 @@ 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*);

extern int acpiphp_enable_slot (struct acpiphp_slot *slot);
extern int acpiphp_disable_slot (struct acpiphp_slot *slot);
Expand All @@ -220,6 +246,16 @@ extern u8 acpiphp_get_latch_status (struct acpiphp_slot *slot);
extern u8 acpiphp_get_adapter_status (struct acpiphp_slot *slot);
extern u32 acpiphp_get_address (struct acpiphp_slot *slot);

/* acpiphp_dock.c */
extern int find_dock_station(void);
extern void remove_dock_station(void);
extern void add_dependent_device(struct dependent_device *new_dd);
extern void add_pci_dependent_device(struct dependent_device *new_dd);
extern struct dependent_device *get_dependent_device(acpi_handle handle);
extern int is_dependent_device(acpi_handle handle);
extern int detect_dependent_devices(acpi_handle *bridge_handle);
extern struct dependent_device *alloc_dependent_device(acpi_handle handle);

/* variables */
extern int acpiphp_debug;

Expand Down
7 changes: 6 additions & 1 deletion trunk/drivers/pci/hotplug/acpiphp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,14 +429,17 @@ static void __exit cleanup_slots (void)
static int __init acpiphp_init(void)
{
int retval;
int docking_station;

info(DRIVER_DESC " version: " DRIVER_VERSION "\n");

acpiphp_debug = debug;

docking_station = find_dock_station();

/* read all the ACPI info from the system */
retval = init_acpi();
if (retval)
if (retval && !(docking_station))
return retval;

return init_slots();
Expand All @@ -448,6 +451,8 @@ static void __exit acpiphp_exit(void)
cleanup_slots();
/* deallocate internal data structures etc. */
acpiphp_glue_exit();

remove_dock_station();
}

module_init(acpiphp_init);
Expand Down
Loading

0 comments on commit dfaf1f0

Please sign in to comment.