pnpbios: bail out on strange errors
authorAlan Cox <alan@linux.intel.com>
Tue, 20 Jan 2015 12:54:50 +0000 (12:54 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Jan 2015 17:17:59 +0000 (09:17 -0800)
A small number of systems respond to PnP dock queries with bogus values.
This causes us to keep logging an error every 2 seconds. Instead of trying
again just assume the BIOS is crapware and doesn't actually have dock
functionality.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pnp/pnpbios/core.c

index 074569e77d22ef09784aca56d63714fbf051afcc..facd43b8516cf7af1178772f9e62fc9054fcd82a 100644 (file)
@@ -181,7 +181,8 @@ static int pnp_dock_thread(void *unused)
                        break;
                default:
                        pnpbios_print_status("pnp_dock_thread", status);
-                       continue;
+                       printk(KERN_WARNING "PnPBIOS: disabling dock monitoring.\n");
+                       complete_and_exit(&unload_sem, 0);
                }
                if (d != docked) {
                        if (pnp_dock_event(d, &now) == 0) {