diff options
author | Bruno Prémont <bonbons@linux-vserver.org> | 2009-04-22 20:33:41 +0200 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-04-22 20:33:41 +0200 |
commit | b0aedb04eae79372fbe101d98513773d6b89935d (patch) | |
tree | b99caae4caa2b5973ef63c0b66f90c9695222b08 /drivers | |
parent | a1f9a89c90b4ac143c5b6054c2a157572b272cd2 (diff) | |
download | linux-b0aedb04eae79372fbe101d98513773d6b89935d.tar.bz2 |
ide: Stop disks on reboot for laptop which cuts power
My laptop (Acer Travelmate 660) always cuts the power when rebooting
which causes the disk to emergency-park it's head.
Add a dmi check to stop disk as for shutdown on this laptop.
Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ide/ide-gd.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/ide/ide-gd.c b/drivers/ide/ide-gd.c index 1aebdf1a4f58..4b6b71e2cdf5 100644 --- a/drivers/ide/ide-gd.c +++ b/drivers/ide/ide-gd.c @@ -7,6 +7,7 @@ #include <linux/mutex.h> #include <linux/ide.h> #include <linux/hdreg.h> +#include <linux/dmi.h> #if !defined(CONFIG_DEBUG_BLOCK_EXT_DEVT) #define IDE_DISK_MINORS (1 << PARTN_BITS) @@ -99,6 +100,19 @@ static void ide_gd_resume(ide_drive_t *drive) (void)drive->disk_ops->get_capacity(drive); } +static const struct dmi_system_id ide_coldreboot_table[] = { + { + /* Acer TravelMate 66x cuts power during reboot */ + .ident = "Acer TravelMate 660", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), + DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 660"), + }, + }, + + { } /* terminate list */ +}; + static void ide_gd_shutdown(ide_drive_t *drive) { #ifdef CONFIG_ALPHA @@ -115,7 +129,8 @@ static void ide_gd_shutdown(ide_drive_t *drive) the disk to expire its write cache. */ if (system_state != SYSTEM_POWER_OFF) { #else - if (system_state == SYSTEM_RESTART) { + if (system_state == SYSTEM_RESTART && + !dmi_check_system(ide_coldreboot_table)) { #endif drive->disk_ops->flush(drive); return; |