]> git.baikalelectronics.ru Git - kernel.git/commit
libata: Implement disk shock protection support
authorElias Oltmanns <eo@nebensachen.de>
Sun, 21 Sep 2008 09:54:08 +0000 (11:54 +0200)
committerJeff Garzik <jgarzik@redhat.com>
Mon, 29 Sep 2008 04:27:54 +0000 (00:27 -0400)
commita51a59010fda267e35b552a01233942213e69f48
tree0e98efc190b25a11f84b8ae7d1ee0a17c41d3da8
parent223736e82eb6eff04078e9941d2f067d9434efdd
libata: Implement disk shock protection support

On user request (through sysfs), the IDLE IMMEDIATE command with UNLOAD
FEATURE as specified in ATA-7 is issued to the device and processing of
the request queue is stopped thereafter until the specified timeout
expires or user space asks to resume normal operation. This is supposed
to prevent the heads of a hard drive from accidentally crashing onto the
platter when a heavy shock is anticipated (like a falling laptop
expected to hit the floor). In fact, the whole port stops processing
commands until the timeout has expired in order to avoid any resets due
to failed commands on another device.

Signed-off-by: Elias Oltmanns <eo@nebensachen.de>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/ahci.c
drivers/ata/libata-core.c
drivers/ata/libata-eh.c
drivers/ata/libata-scsi.c
include/linux/libata.h