diff options
author | Henrique de Moraes Holschuh <hmh@hmh.eng.br> | 2010-02-25 21:28:56 -0300 |
---|---|---|
committer | Henrique de Moraes Holschuh <hmh@hmh.eng.br> | 2010-02-25 21:28:56 -0300 |
commit | bf8b29c8f7f8269e99eca8b19048ed5b34b51810 (patch) | |
tree | 05469e38524f6c1b2bbaf7be7b83bb9e786e12a6 | |
parent | 60b341b778cc2929df16c0a504c91621b3c6a4ad (diff) | |
download | linux-stable-bf8b29c8f7f8269e99eca8b19048ed5b34b51810.tar.gz linux-stable-bf8b29c8f7f8269e99eca8b19048ed5b34b51810.tar.bz2 linux-stable-bf8b29c8f7f8269e99eca8b19048ed5b34b51810.zip |
thinkpad-acpi: document HKEY event 3006
Event 0x3006 is used to help power management of the ODD in the
UltraBay. The EC generates this event when the ODD eject button is
pressed (even if the bay is powered down).
Normally, Linux doesn't need this as we keep the SATA link powered
up (which wastes power). The EC powers up the bay by itself when the
ODD eject button is pressed, and the SATA PHY reports the hotplug.
However, we could also power that SATA link down (and for that matter,
also power down the Ultrabay) if the ODD is left idle for a while with
no disk inside, and use event 0x3006 to know when we need that SATA link
powered back up.
For now, just stop asking for more information when event 0x3006 is
seen, there is no point in pestering users about it anymore.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: stable@kernel.org
-rw-r--r-- | drivers/platform/x86/thinkpad_acpi.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index eb603f1d55ca..049041a47f8d 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -3655,13 +3655,19 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event) break; case 3: /* 0x3000-0x3FFF: bay-related wakeups */ - if (hkey == TP_HKEY_EV_BAYEJ_ACK) { + switch (hkey) { + case TP_HKEY_EV_BAYEJ_ACK: hotkey_autosleep_ack = 1; printk(TPACPI_INFO "bay ejected\n"); hotkey_wakeup_hotunplug_complete_notify_change(); known_ev = true; - } else { + break; + case TP_HKEY_EV_OPTDRV_EJ: + /* FIXME: kick libata if SATA link offline */ + known_ev = true; + break; + default: known_ev = false; } break; |