Skip to content

Commit

Permalink
ACPI: dock: avoid check _STA method
Browse files Browse the repository at this point in the history
In some BIOSes, every _STA method call will send a notification again,
this cause freeze. And in some BIOSes, it appears _STA should be called
after _DCK. This tries to avoid calls _STA, and still keep the device
present check.

http://bugzilla.kernel.org/show_bug.cgi?id=10431

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Shaohua Li authored and Len Brown committed Sep 24, 2008
1 parent 72d3105 commit 8b59560
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/acpi/dock.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,14 +604,17 @@ static int handle_eject_request(struct dock_station *ds, u32 event)
static void dock_notify(acpi_handle handle, u32 event, void *data)
{
struct dock_station *ds = data;
struct acpi_device *tmp;

switch (event) {
case ACPI_NOTIFY_BUS_CHECK:
if (!dock_in_progress(ds) && dock_present(ds)) {
if (!dock_in_progress(ds) && acpi_bus_get_device(ds->handle,
&tmp)) {
begin_dock(ds);
dock(ds);
if (!dock_present(ds)) {
printk(KERN_ERR PREFIX "Unable to dock!\n");
complete_dock(ds);
break;
}
atomic_notifier_call_chain(&dock_notifier_list,
Expand Down

0 comments on commit 8b59560

Please sign in to comment.