diff options
-rw-r--r-- | Documentation/ABI/testing/sysfs-platform-eeepc-laptop | 10 | ||||
-rw-r--r-- | drivers/platform/x86/eeepc-laptop.c | 21 |
2 files changed, 25 insertions, 6 deletions
diff --git a/Documentation/ABI/testing/sysfs-platform-eeepc-laptop b/Documentation/ABI/testing/sysfs-platform-eeepc-laptop index 7445dfb321b5..5b026c69587a 100644 --- a/Documentation/ABI/testing/sysfs-platform-eeepc-laptop +++ b/Documentation/ABI/testing/sysfs-platform-eeepc-laptop | |||
@@ -1,4 +1,4 @@ | |||
1 | What: /sys/devices/platform/eeepc-laptop/disp | 1 | What: /sys/devices/platform/eeepc/disp |
2 | Date: May 2008 | 2 | Date: May 2008 |
3 | KernelVersion: 2.6.26 | 3 | KernelVersion: 2.6.26 |
4 | Contact: "Corentin Chary" <corentincj@iksaif.net> | 4 | Contact: "Corentin Chary" <corentincj@iksaif.net> |
@@ -9,21 +9,21 @@ Description: | |||
9 | - 3 = LCD+CRT | 9 | - 3 = LCD+CRT |
10 | If you run X11, you should use xrandr instead. | 10 | If you run X11, you should use xrandr instead. |
11 | 11 | ||
12 | What: /sys/devices/platform/eeepc-laptop/camera | 12 | What: /sys/devices/platform/eeepc/camera |
13 | Date: May 2008 | 13 | Date: May 2008 |
14 | KernelVersion: 2.6.26 | 14 | KernelVersion: 2.6.26 |
15 | Contact: "Corentin Chary" <corentincj@iksaif.net> | 15 | Contact: "Corentin Chary" <corentincj@iksaif.net> |
16 | Description: | 16 | Description: |
17 | Control the camera. 1 means on, 0 means off. | 17 | Control the camera. 1 means on, 0 means off. |
18 | 18 | ||
19 | What: /sys/devices/platform/eeepc-laptop/cardr | 19 | What: /sys/devices/platform/eeepc/cardr |
20 | Date: May 2008 | 20 | Date: May 2008 |
21 | KernelVersion: 2.6.26 | 21 | KernelVersion: 2.6.26 |
22 | Contact: "Corentin Chary" <corentincj@iksaif.net> | 22 | Contact: "Corentin Chary" <corentincj@iksaif.net> |
23 | Description: | 23 | Description: |
24 | Control the card reader. 1 means on, 0 means off. | 24 | Control the card reader. 1 means on, 0 means off. |
25 | 25 | ||
26 | What: /sys/devices/platform/eeepc-laptop/cpufv | 26 | What: /sys/devices/platform/eeepc/cpufv |
27 | Date: Jun 2009 | 27 | Date: Jun 2009 |
28 | KernelVersion: 2.6.31 | 28 | KernelVersion: 2.6.31 |
29 | Contact: "Corentin Chary" <corentincj@iksaif.net> | 29 | Contact: "Corentin Chary" <corentincj@iksaif.net> |
@@ -42,7 +42,7 @@ Description: | |||
42 | `------------ Availables modes | 42 | `------------ Availables modes |
43 | For example, 0x301 means: mode 1 selected, 3 available modes. | 43 | For example, 0x301 means: mode 1 selected, 3 available modes. |
44 | 44 | ||
45 | What: /sys/devices/platform/eeepc-laptop/available_cpufv | 45 | What: /sys/devices/platform/eeepc/available_cpufv |
46 | Date: Jun 2009 | 46 | Date: Jun 2009 |
47 | KernelVersion: 2.6.31 | 47 | KernelVersion: 2.6.31 |
48 | Contact: "Corentin Chary" <corentincj@iksaif.net> | 48 | Contact: "Corentin Chary" <corentincj@iksaif.net> |
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index e2be6bb33d92..9a844caa3756 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c | |||
@@ -578,6 +578,8 @@ static void eeepc_rfkill_hotplug(struct eeepc_laptop *eeepc) | |||
578 | struct pci_dev *dev; | 578 | struct pci_dev *dev; |
579 | struct pci_bus *bus; | 579 | struct pci_bus *bus; |
580 | bool blocked = eeepc_wlan_rfkill_blocked(eeepc); | 580 | bool blocked = eeepc_wlan_rfkill_blocked(eeepc); |
581 | bool absent; | ||
582 | u32 l; | ||
581 | 583 | ||
582 | if (eeepc->wlan_rfkill) | 584 | if (eeepc->wlan_rfkill) |
583 | rfkill_set_sw_state(eeepc->wlan_rfkill, blocked); | 585 | rfkill_set_sw_state(eeepc->wlan_rfkill, blocked); |
@@ -591,6 +593,22 @@ static void eeepc_rfkill_hotplug(struct eeepc_laptop *eeepc) | |||
591 | goto out_unlock; | 593 | goto out_unlock; |
592 | } | 594 | } |
593 | 595 | ||
596 | if (pci_bus_read_config_dword(bus, 0, PCI_VENDOR_ID, &l)) { | ||
597 | pr_err("Unable to read PCI config space?\n"); | ||
598 | goto out_unlock; | ||
599 | } | ||
600 | absent = (l == 0xffffffff); | ||
601 | |||
602 | if (blocked != absent) { | ||
603 | pr_warning("BIOS says wireless lan is %s, " | ||
604 | "but the pci device is %s\n", | ||
605 | blocked ? "blocked" : "unblocked", | ||
606 | absent ? "absent" : "present"); | ||
607 | pr_warning("skipped wireless hotplug as probably " | ||
608 | "inappropriate for this model\n"); | ||
609 | goto out_unlock; | ||
610 | } | ||
611 | |||
594 | if (!blocked) { | 612 | if (!blocked) { |
595 | dev = pci_get_slot(bus, 0); | 613 | dev = pci_get_slot(bus, 0); |
596 | if (dev) { | 614 | if (dev) { |
@@ -1277,7 +1295,8 @@ static void eeepc_dmi_check(struct eeepc_laptop *eeepc) | |||
1277 | * hotplug code. In fact, current hotplug code seems to unplug another | 1295 | * hotplug code. In fact, current hotplug code seems to unplug another |
1278 | * device... | 1296 | * device... |
1279 | */ | 1297 | */ |
1280 | if (strcmp(model, "1005HA") == 0 || strcmp(model, "1201N") == 0) { | 1298 | if (strcmp(model, "1005HA") == 0 || strcmp(model, "1201N") == 0 || |
1299 | strcmp(model, "1005PE") == 0) { | ||
1281 | eeepc->hotplug_disabled = true; | 1300 | eeepc->hotplug_disabled = true; |
1282 | pr_info("wlan hotplug disabled\n"); | 1301 | pr_info("wlan hotplug disabled\n"); |
1283 | } | 1302 | } |