aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2010-03-15 20:50:26 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-04-01 19:02:13 -0400
commit3ecee16aa4617db7cb756ad01526d395dc86d95f (patch)
treee59fe5c6075570924fc4178afc7e189c830fabc6 /drivers
parente58bb78fcd092688765b18574ea4055c2509aee5 (diff)
ahci: use BIOS date in broken_suspend list
commit 9deb343189b3cf45e84dd08480f330575ffe2004 upstream. HP is recycling both DMI_PRODUCT_NAME and DMI_BIOS_VERSION making ahci_broken_suspend() trigger for later products which are not affected by the original problems. Match BIOS date instead of version and add references to bko's so that full information can be found easier later. This fixes http://bugzilla.kernel.org/show_bug.cgi?id=15462 Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: tigerfishdaisy@gmail.com Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/ahci.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index a6a736a7dbf2..9e2feb6ce241 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -2831,6 +2831,14 @@ static bool ahci_broken_suspend(struct pci_dev *pdev)
2831 * On HP dv[4-6] and HDX18 with earlier BIOSen, link 2831 * On HP dv[4-6] and HDX18 with earlier BIOSen, link
2832 * to the harddisk doesn't become online after 2832 * to the harddisk doesn't become online after
2833 * resuming from STR. Warn and fail suspend. 2833 * resuming from STR. Warn and fail suspend.
2834 *
2835 * http://bugzilla.kernel.org/show_bug.cgi?id=12276
2836 *
2837 * Use dates instead of versions to match as HP is
2838 * apparently recycling both product and version
2839 * strings.
2840 *
2841 * http://bugzilla.kernel.org/show_bug.cgi?id=15462
2834 */ 2842 */
2835 { 2843 {
2836 .ident = "dv4", 2844 .ident = "dv4",
@@ -2839,7 +2847,7 @@ static bool ahci_broken_suspend(struct pci_dev *pdev)
2839 DMI_MATCH(DMI_PRODUCT_NAME, 2847 DMI_MATCH(DMI_PRODUCT_NAME,
2840 "HP Pavilion dv4 Notebook PC"), 2848 "HP Pavilion dv4 Notebook PC"),
2841 }, 2849 },
2842 .driver_data = "F.30", /* cutoff BIOS version */ 2850 .driver_data = "20090105", /* F.30 */
2843 }, 2851 },
2844 { 2852 {
2845 .ident = "dv5", 2853 .ident = "dv5",
@@ -2848,7 +2856,7 @@ static bool ahci_broken_suspend(struct pci_dev *pdev)
2848 DMI_MATCH(DMI_PRODUCT_NAME, 2856 DMI_MATCH(DMI_PRODUCT_NAME,
2849 "HP Pavilion dv5 Notebook PC"), 2857 "HP Pavilion dv5 Notebook PC"),
2850 }, 2858 },
2851 .driver_data = "F.16", /* cutoff BIOS version */ 2859 .driver_data = "20090506", /* F.16 */
2852 }, 2860 },
2853 { 2861 {
2854 .ident = "dv6", 2862 .ident = "dv6",
@@ -2857,7 +2865,7 @@ static bool ahci_broken_suspend(struct pci_dev *pdev)
2857 DMI_MATCH(DMI_PRODUCT_NAME, 2865 DMI_MATCH(DMI_PRODUCT_NAME,
2858 "HP Pavilion dv6 Notebook PC"), 2866 "HP Pavilion dv6 Notebook PC"),
2859 }, 2867 },
2860 .driver_data = "F.21", /* cutoff BIOS version */ 2868 .driver_data = "20090423", /* F.21 */
2861 }, 2869 },
2862 { 2870 {
2863 .ident = "HDX18", 2871 .ident = "HDX18",
@@ -2866,7 +2874,7 @@ static bool ahci_broken_suspend(struct pci_dev *pdev)
2866 DMI_MATCH(DMI_PRODUCT_NAME, 2874 DMI_MATCH(DMI_PRODUCT_NAME,
2867 "HP HDX18 Notebook PC"), 2875 "HP HDX18 Notebook PC"),
2868 }, 2876 },
2869 .driver_data = "F.23", /* cutoff BIOS version */ 2877 .driver_data = "20090430", /* F.23 */
2870 }, 2878 },
2871 /* 2879 /*
2872 * Acer eMachines G725 has the same problem. BIOS 2880 * Acer eMachines G725 has the same problem. BIOS
@@ -2874,6 +2882,8 @@ static bool ahci_broken_suspend(struct pci_dev *pdev)
2874 * work. Inbetween, there are V1.06, V2.06 and V3.03 2882 * work. Inbetween, there are V1.06, V2.06 and V3.03
2875 * that we don't have much idea about. For now, 2883 * that we don't have much idea about. For now,
2876 * blacklist anything older than V3.04. 2884 * blacklist anything older than V3.04.
2885 *
2886 * http://bugzilla.kernel.org/show_bug.cgi?id=15104
2877 */ 2887 */
2878 { 2888 {
2879 .ident = "G725", 2889 .ident = "G725",
@@ -2881,19 +2891,21 @@ static bool ahci_broken_suspend(struct pci_dev *pdev)
2881 DMI_MATCH(DMI_SYS_VENDOR, "eMachines"), 2891 DMI_MATCH(DMI_SYS_VENDOR, "eMachines"),
2882 DMI_MATCH(DMI_PRODUCT_NAME, "eMachines G725"), 2892 DMI_MATCH(DMI_PRODUCT_NAME, "eMachines G725"),
2883 }, 2893 },
2884 .driver_data = "V3.04", /* cutoff BIOS version */ 2894 .driver_data = "20091216", /* V3.04 */
2885 }, 2895 },
2886 { } /* terminate list */ 2896 { } /* terminate list */
2887 }; 2897 };
2888 const struct dmi_system_id *dmi = dmi_first_match(sysids); 2898 const struct dmi_system_id *dmi = dmi_first_match(sysids);
2889 const char *ver; 2899 int year, month, date;
2900 char buf[9];
2890 2901
2891 if (!dmi || pdev->bus->number || pdev->devfn != PCI_DEVFN(0x1f, 2)) 2902 if (!dmi || pdev->bus->number || pdev->devfn != PCI_DEVFN(0x1f, 2))
2892 return false; 2903 return false;
2893 2904
2894 ver = dmi_get_system_info(DMI_BIOS_VERSION); 2905 dmi_get_date(DMI_BIOS_DATE, &year, &month, &date);
2906 snprintf(buf, sizeof(buf), "%04d%02d%02d", year, month, date);
2895 2907
2896 return !ver || strcmp(ver, dmi->driver_data) < 0; 2908 return strcmp(buf, dmi->driver_data) < 0;
2897} 2909}
2898 2910
2899static bool ahci_broken_online(struct pci_dev *pdev) 2911static bool ahci_broken_online(struct pci_dev *pdev)