diff options
author | Tejun Heo <htejun@gmail.com> | 2007-07-27 01:53:28 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-08-01 10:00:56 -0400 |
commit | 8c3832ebeb049c5744ece888daae253c683257c3 (patch) | |
tree | f03eaab444be5d8e4d8c3bc229fc052ee4b791b9 /drivers/ata/ata_piix.c | |
parent | 0b62e13b5c9b4871641973e024cc9dd440b5bb58 (diff) |
ata_piix: implement piix_borken_suspend()
Separate out broken suspend blacklist matching into
piix_broken_suspend().
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/ata_piix.c')
-rw-r--r-- | drivers/ata/ata_piix.c | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index 6089fbc5b89f..fb3b9594651d 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c | |||
@@ -890,37 +890,38 @@ static void ich_set_dmamode (struct ata_port *ap, struct ata_device *adev) | |||
890 | } | 890 | } |
891 | 891 | ||
892 | #ifdef CONFIG_PM | 892 | #ifdef CONFIG_PM |
893 | static struct dmi_system_id piix_broken_suspend_dmi_table[] = { | 893 | static int piix_broken_suspend(void) |
894 | { | 894 | { |
895 | .ident = "TECRA M5", | 895 | static struct dmi_system_id sysids[] = { |
896 | .matches = { | 896 | { |
897 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | 897 | .ident = "TECRA M5", |
898 | DMI_MATCH(DMI_PRODUCT_NAME, "TECRA M5"), | 898 | .matches = { |
899 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | ||
900 | DMI_MATCH(DMI_PRODUCT_NAME, "TECRA M5"), | ||
901 | }, | ||
899 | }, | 902 | }, |
900 | }, | 903 | { |
901 | { | 904 | .ident = "Satellite U205", |
902 | .ident = "Satellite U200", | 905 | .matches = { |
903 | .matches = { | 906 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), |
904 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | 907 | DMI_MATCH(DMI_PRODUCT_NAME, "Satellite U205"), |
905 | DMI_MATCH(DMI_PRODUCT_NAME, "Satellite U200"), | 908 | }, |
906 | }, | 909 | }, |
907 | }, | 910 | { |
908 | { | 911 | .ident = "Portege M500", |
909 | .ident = "Satellite U205", | 912 | .matches = { |
910 | .matches = { | 913 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), |
911 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | 914 | DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE M500"), |
912 | DMI_MATCH(DMI_PRODUCT_NAME, "Satellite U205"), | 915 | }, |
913 | }, | 916 | }, |
914 | }, | 917 | { } |
915 | { | 918 | }; |
916 | .ident = "Portege M500", | 919 | |
917 | .matches = { | 920 | if (dmi_check_system(sysids)) |
918 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | 921 | return 1; |
919 | DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE M500"), | 922 | |
920 | }, | 923 | return 0; |
921 | }, | 924 | } |
922 | { } | ||
923 | }; | ||
924 | 925 | ||
925 | static int piix_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) | 926 | static int piix_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) |
926 | { | 927 | { |
@@ -937,8 +938,7 @@ static int piix_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) | |||
937 | * cycles and power trying to do something to the sleeping | 938 | * cycles and power trying to do something to the sleeping |
938 | * beauty. | 939 | * beauty. |
939 | */ | 940 | */ |
940 | if (dmi_check_system(piix_broken_suspend_dmi_table) && | 941 | if (piix_broken_suspend() && mesg.event == PM_EVENT_SUSPEND) { |
941 | mesg.event == PM_EVENT_SUSPEND) { | ||
942 | pci_save_state(pdev); | 942 | pci_save_state(pdev); |
943 | 943 | ||
944 | /* mark its power state as "unknown", since we don't | 944 | /* mark its power state as "unknown", since we don't |