]> pilppa.com Git - linux-2.6-omap-h63xx.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)
commit45fabbb77bd95adff7a80bde1c7a0ace1075fde6
tree0e98efc190b25a11f84b8ae7d1ee0a17c41d3da8
parentea6ce53cd5d005455ec0a3cc1d45d3af0cb90919
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