]>
Commit | Line | Data |
---|---|---|
9659d8ac GKH |
1 | From: Corentin Chary <corentincj@iksaif.net> |
2 | Date: Wed, 6 Jan 2010 22:07:38 +0100 | |
3 | Subject: eeepc-laptop: dmi blacklist to disable pci hotplug code | |
4 | ||
5 | commit 10ae4b5663ff3092553bfbd867e7bd474ce6c553 upstream. | |
6 | ||
7 | This is a short term workaround for Eeepc 1005HA. | |
8 | ||
9 | refs: <http://bugzilla.kernel.org/show_bug.cgi?id=14570> | |
10 | ||
11 | [bwh: Backported to 2.6.32] | |
12 | ||
13 | Signed-off-by: Corentin Chary <corentincj@iksaif.net> | |
14 | Signed-off-by: Len Brown <len.brown@intel.com> | |
15 | Cc: Ben Hutchings <ben@decadent.org.uk> | |
16 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | |
17 | ||
18 | --- | |
19 | drivers/platform/x86/eeepc-laptop.c | 25 ++++++++++++++++++++----- | |
20 | 1 file changed, 20 insertions(+), 5 deletions(-) | |
21 | ||
22 | --- a/drivers/platform/x86/eeepc-laptop.c | |
23 | +++ b/drivers/platform/x86/eeepc-laptop.c | |
24 | @@ -137,6 +137,7 @@ struct eeepc_hotk { | |
25 | u32 cm_supported; /* the control methods supported | |
26 | by this BIOS */ | |
27 | bool cpufv_disabled; | |
28 | + bool hotplug_disabled; | |
29 | uint init_flag; /* Init flags */ | |
30 | u16 event_count[128]; /* count for each event */ | |
31 | struct input_dev *inputdev; | |
32 | @@ -614,6 +615,10 @@ static void eeepc_dmi_check(void) | |
33 | { | |
34 | const char *model; | |
35 | ||
36 | + model = dmi_get_system_info(DMI_PRODUCT_NAME); | |
37 | + if (!model) | |
38 | + return; | |
39 | + | |
40 | /* | |
41 | * Blacklist for setting cpufv (cpu speed). | |
42 | * | |
43 | @@ -633,17 +638,24 @@ static void eeepc_dmi_check(void) | |
44 | * substring matching. We don't want to affect the "701SD" | |
45 | * and "701SDX" models, because they do support S.H.E. | |
46 | */ | |
47 | - | |
48 | - model = dmi_get_system_info(DMI_PRODUCT_NAME); | |
49 | - if (!model) | |
50 | - return; | |
51 | - | |
52 | if (strcmp(model, "701") == 0 || strcmp(model, "702") == 0) { | |
53 | ehotk->cpufv_disabled = true; | |
54 | pr_info("model %s does not officially support setting cpu " | |
55 | "speed\n", model); | |
56 | pr_info("cpufv disabled to avoid instability\n"); | |
57 | } | |
58 | + | |
59 | + /* | |
60 | + * Blacklist for wlan hotplug | |
61 | + * | |
62 | + * Eeepc 1005HA doesn't work like others models and don't need the | |
63 | + * hotplug code. In fact, current hotplug code seems to unplug another | |
64 | + * device... | |
65 | + */ | |
66 | + if (strcmp(model, "1005HA") == 0) { | |
67 | + ehotk->hotplug_disabled = true; | |
68 | + pr_info("wlan hotplug disabled\n"); | |
69 | + } | |
70 | } | |
71 | ||
72 | static void cmsg_quirk(int cm, const char *name) | |
73 | @@ -1177,6 +1189,9 @@ static int eeepc_rfkill_init(struct devi | |
74 | if (result && result != -ENODEV) | |
75 | goto exit; | |
76 | ||
77 | + if (ehotk->hotplug_disabled) | |
78 | + return 0; | |
79 | + | |
80 | result = eeepc_setup_pci_hotplug(); | |
81 | /* | |
82 | * If we get -EBUSY then something else is handling the PCI hotplug - |