]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.25/patches.drivers/libata-ata_piix-borked-tecra-m4-broken-suspend
Reenabled linux-xen and xen-image build
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.drivers / libata-ata_piix-borked-tecra-m4-broken-suspend
CommitLineData
00e5a55c
BS
1From: Tejun Heo <tj@kernel.org>
2Subject: ata_piix: add borked Tecra M4 to broken suspend list
3References: bnc#398270
4
5Tecra M4 sometimes forget what it is and reports bogus data via DMI
6which makes the machine evade broken suspend matching and thus fail
7suspend/resume. This patch updates piix_broken_suspend() such that it
8can match such case. As the borked DMI data is a bit generic,
9matching many entries to make the match more specific is necessary.
10As the usual DMI matching is limited to four entries, this patch uses
11hard coded manual matching.
12
13This is reported by Alexandru Romanescu.
14
15Signed-off-by: Tejun Heo <tj@kernel.org>
16Cc: Alexandru Romanescu <a_romanescu@yahoo.co.uk>
17Signed-off-by: Tejun Heo <teheo@suse.de>
18---
19 drivers/ata/ata_piix.c | 22 ++++++++++++++++++++++
20 1 file changed, 22 insertions(+)
21
22Index: linux-2.6.27/drivers/ata/ata_piix.c
23===================================================================
24--- linux-2.6.27.orig/drivers/ata/ata_piix.c
25+++ linux-2.6.27/drivers/ata/ata_piix.c
26@@ -1119,6 +1119,28 @@ static int piix_broken_suspend(void)
27 if (dmi_find_device(DMI_DEV_TYPE_OEM_STRING, oemstrs[i], NULL))
28 return 1;
29
30+ /* TECRA M4 sometimes forgets its identify and reports bogus
31+ * DMI information. As the bogus information is a bit
32+ * generic, match as many entries as possible. This manual
33+ * matching is necessary because dmi_system_id.matches is
34+ * limited to four entries.
35+ */
36+ if (dmi_get_system_info(DMI_SYS_VENDOR) &&
37+ dmi_get_system_info(DMI_PRODUCT_NAME) &&
38+ dmi_get_system_info(DMI_PRODUCT_VERSION) &&
39+ dmi_get_system_info(DMI_PRODUCT_SERIAL) &&
40+ dmi_get_system_info(DMI_BOARD_VENDOR) &&
41+ dmi_get_system_info(DMI_BOARD_NAME) &&
42+ dmi_get_system_info(DMI_BOARD_VERSION) &&
43+ !strcmp(dmi_get_system_info(DMI_SYS_VENDOR), "TOSHIBA") &&
44+ !strcmp(dmi_get_system_info(DMI_PRODUCT_NAME), "000000") &&
45+ !strcmp(dmi_get_system_info(DMI_PRODUCT_VERSION), "000000") &&
46+ !strcmp(dmi_get_system_info(DMI_PRODUCT_SERIAL), "000000") &&
47+ !strcmp(dmi_get_system_info(DMI_BOARD_VENDOR), "TOSHIBA") &&
48+ !strcmp(dmi_get_system_info(DMI_BOARD_NAME), "Portable PC") &&
49+ !strcmp(dmi_get_system_info(DMI_BOARD_VERSION), "Version A0"))
50+ return 1;
51+
52 return 0;
53 }
54