Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 144000
b: refs/heads/master
c: b0aedb0
h: refs/heads/master
v: v3
  • Loading branch information
Bruno Prémont authored and Bartlomiej Zolnierkiewicz committed Apr 22, 2009
1 parent 0dea0a9 commit b12ffa6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a1f9a89c90b4ac143c5b6054c2a157572b272cd2
refs/heads/master: b0aedb04eae79372fbe101d98513773d6b89935d
17 changes: 16 additions & 1 deletion trunk/drivers/ide/ide-gd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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;
Expand Down

0 comments on commit b12ffa6

Please sign in to comment.