Commit 8c3832eb authored by Tejun Heo's avatar Tejun Heo Committed by Jeff Garzik

ata_piix: implement piix_borken_suspend()

Separate out broken suspend blacklist matching into
piix_broken_suspend().
Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 0b62e13b
...@@ -890,37 +890,38 @@ static void ich_set_dmamode (struct ata_port *ap, struct ata_device *adev) ...@@ -890,37 +890,38 @@ static void ich_set_dmamode (struct ata_port *ap, struct ata_device *adev)
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM
static struct dmi_system_id piix_broken_suspend_dmi_table[] = { static int piix_broken_suspend(void)
{ {
.ident = "TECRA M5", static struct dmi_system_id sysids[] = {
.matches = { {
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), .ident = "TECRA M5",
DMI_MATCH(DMI_PRODUCT_NAME, "TECRA M5"), .matches = {
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
DMI_MATCH(DMI_PRODUCT_NAME, "TECRA M5"),
},
}, },
}, {
{ .ident = "Satellite U205",
.ident = "Satellite U200", .matches = {
.matches = { DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), DMI_MATCH(DMI_PRODUCT_NAME, "Satellite U205"),
DMI_MATCH(DMI_PRODUCT_NAME, "Satellite U200"), },
}, },
}, {
{ .ident = "Portege M500",
.ident = "Satellite U205", .matches = {
.matches = { DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE M500"),
DMI_MATCH(DMI_PRODUCT_NAME, "Satellite U205"), },
}, },
}, { }
{ };
.ident = "Portege M500",
.matches = { if (dmi_check_system(sysids))
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), return 1;
DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE M500"),
}, return 0;
}, }
{ }
};
static int piix_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) static int piix_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)
{ {
...@@ -937,8 +938,7 @@ static int piix_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) ...@@ -937,8 +938,7 @@ static int piix_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)
* cycles and power trying to do something to the sleeping * cycles and power trying to do something to the sleeping
* beauty. * beauty.
*/ */
if (dmi_check_system(piix_broken_suspend_dmi_table) && if (piix_broken_suspend() && mesg.event == PM_EVENT_SUSPEND) {
mesg.event == PM_EVENT_SUSPEND) {
pci_save_state(pdev); pci_save_state(pdev);
/* mark its power state as "unknown", since we don't /* mark its power state as "unknown", since we don't
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment