]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/suse-2.6.27.39/patches.drivers/libata-ata_piix-borked-tecra-m4-broken-suspend
Fix oinkmaster patch.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.drivers / libata-ata_piix-borked-tecra-m4-broken-suspend
1 From: Tejun Heo <tj@kernel.org>
2 Subject: ata_piix: add borked Tecra M4 to broken suspend list
3 References: bnc#398270
4
5 Tecra M4 sometimes forget what it is and reports bogus data via DMI
6 which makes the machine evade broken suspend matching and thus fail
7 suspend/resume. This patch updates piix_broken_suspend() such that it
8 can match such case. As the borked DMI data is a bit generic,
9 matching many entries to make the match more specific is necessary.
10 As the usual DMI matching is limited to four entries, this patch uses
11 hard coded manual matching.
12
13 This is reported by Alexandru Romanescu.
14
15 Signed-off-by: Tejun Heo <tj@kernel.org>
16 Cc: Alexandru Romanescu <a_romanescu@yahoo.co.uk>
17 Signed-off-by: Tejun Heo <teheo@suse.de>
18 ---
19 drivers/ata/ata_piix.c | 22 ++++++++++++++++++++++
20 1 file changed, 22 insertions(+)
21
22 Index: 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