diff options
author | Tejun Heo <tj@kernel.org> | 2010-03-15 20:50:26 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2010-03-17 13:47:20 -0400 |
commit | 9deb343189b3cf45e84dd08480f330575ffe2004 (patch) | |
tree | dd58ef520b6ed1d47a675e4515d2bcc4e28a1ad6 /drivers/ata | |
parent | 603037c3d1a42d5013f035355a2c60b0006a9fdf (diff) |
ahci: use BIOS date in broken_suspend list
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>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/ahci.c | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 9e5b121fb0cb..e7e2c7a147f1 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -3037,6 +3037,14 @@ static bool ahci_broken_suspend(struct pci_dev *pdev) | |||
3037 | * On HP dv[4-6] and HDX18 with earlier BIOSen, link | 3037 | * On HP dv[4-6] and HDX18 with earlier BIOSen, link |
3038 | * to the harddisk doesn't become online after | 3038 | * to the harddisk doesn't become online after |
3039 | * resuming from STR. Warn and fail suspend. | 3039 | * resuming from STR. Warn and fail suspend. |
3040 | * | ||
3041 | * http://bugzilla.kernel.org/show_bug.cgi?id=12276 | ||
3042 | * | ||
3043 | * Use dates instead of versions to match as HP is | ||
3044 | * apparently recycling both product and version | ||
3045 | * strings. | ||
3046 | * | ||
3047 | * http://bugzilla.kernel.org/show_bug.cgi?id=15462 | ||
3040 | */ | 3048 | */ |
3041 | { | 3049 | { |
3042 | .ident = "dv4", | 3050 | .ident = "dv4", |
@@ -3045,7 +3053,7 @@ static bool ahci_broken_suspend(struct pci_dev *pdev) | |||
3045 | DMI_MATCH(DMI_PRODUCT_NAME, | 3053 | DMI_MATCH(DMI_PRODUCT_NAME, |
3046 | "HP Pavilion dv4 Notebook PC"), | 3054 | "HP Pavilion dv4 Notebook PC"), |
3047 | }, | 3055 | }, |
3048 | .driver_data = "F.30", /* cutoff BIOS version */ | 3056 | .driver_data = "20090105", /* F.30 */ |
3049 | }, | 3057 | }, |
3050 | { | 3058 | { |
3051 | .ident = "dv5", | 3059 | .ident = "dv5", |
@@ -3054,7 +3062,7 @@ static bool ahci_broken_suspend(struct pci_dev *pdev) | |||
3054 | DMI_MATCH(DMI_PRODUCT_NAME, | 3062 | DMI_MATCH(DMI_PRODUCT_NAME, |
3055 | "HP Pavilion dv5 Notebook PC"), | 3063 | "HP Pavilion dv5 Notebook PC"), |
3056 | }, | 3064 | }, |
3057 | .driver_data = "F.16", /* cutoff BIOS version */ | 3065 | .driver_data = "20090506", /* F.16 */ |
3058 | }, | 3066 | }, |
3059 | { | 3067 | { |
3060 | .ident = "dv6", | 3068 | .ident = "dv6", |
@@ -3063,7 +3071,7 @@ static bool ahci_broken_suspend(struct pci_dev *pdev) | |||
3063 | DMI_MATCH(DMI_PRODUCT_NAME, | 3071 | DMI_MATCH(DMI_PRODUCT_NAME, |
3064 | "HP Pavilion dv6 Notebook PC"), | 3072 | "HP Pavilion dv6 Notebook PC"), |
3065 | }, | 3073 | }, |
3066 | .driver_data = "F.21", /* cutoff BIOS version */ | 3074 | .driver_data = "20090423", /* F.21 */ |
3067 | }, | 3075 | }, |
3068 | { | 3076 | { |
3069 | .ident = "HDX18", | 3077 | .ident = "HDX18", |
@@ -3072,7 +3080,7 @@ static bool ahci_broken_suspend(struct pci_dev *pdev) | |||
3072 | DMI_MATCH(DMI_PRODUCT_NAME, | 3080 | DMI_MATCH(DMI_PRODUCT_NAME, |
3073 | "HP HDX18 Notebook PC"), | 3081 | "HP HDX18 Notebook PC"), |
3074 | }, | 3082 | }, |
3075 | .driver_data = "F.23", /* cutoff BIOS version */ | 3083 | .driver_data = "20090430", /* F.23 */ |
3076 | }, | 3084 | }, |
3077 | /* | 3085 | /* |
3078 | * Acer eMachines G725 has the same problem. BIOS | 3086 | * Acer eMachines G725 has the same problem. BIOS |
@@ -3080,6 +3088,8 @@ static bool ahci_broken_suspend(struct pci_dev *pdev) | |||
3080 | * work. Inbetween, there are V1.06, V2.06 and V3.03 | 3088 | * work. Inbetween, there are V1.06, V2.06 and V3.03 |
3081 | * that we don't have much idea about. For now, | 3089 | * that we don't have much idea about. For now, |
3082 | * blacklist anything older than V3.04. | 3090 | * blacklist anything older than V3.04. |
3091 | * | ||
3092 | * http://bugzilla.kernel.org/show_bug.cgi?id=15104 | ||
3083 | */ | 3093 | */ |
3084 | { | 3094 | { |
3085 | .ident = "G725", | 3095 | .ident = "G725", |
@@ -3087,19 +3097,21 @@ static bool ahci_broken_suspend(struct pci_dev *pdev) | |||
3087 | DMI_MATCH(DMI_SYS_VENDOR, "eMachines"), | 3097 | DMI_MATCH(DMI_SYS_VENDOR, "eMachines"), |
3088 | DMI_MATCH(DMI_PRODUCT_NAME, "eMachines G725"), | 3098 | DMI_MATCH(DMI_PRODUCT_NAME, "eMachines G725"), |
3089 | }, | 3099 | }, |
3090 | .driver_data = "V3.04", /* cutoff BIOS version */ | 3100 | .driver_data = "20091216", /* V3.04 */ |
3091 | }, | 3101 | }, |
3092 | { } /* terminate list */ | 3102 | { } /* terminate list */ |
3093 | }; | 3103 | }; |
3094 | const struct dmi_system_id *dmi = dmi_first_match(sysids); | 3104 | const struct dmi_system_id *dmi = dmi_first_match(sysids); |
3095 | const char *ver; | 3105 | int year, month, date; |
3106 | char buf[9]; | ||
3096 | 3107 | ||
3097 | if (!dmi || pdev->bus->number || pdev->devfn != PCI_DEVFN(0x1f, 2)) | 3108 | if (!dmi || pdev->bus->number || pdev->devfn != PCI_DEVFN(0x1f, 2)) |
3098 | return false; | 3109 | return false; |
3099 | 3110 | ||
3100 | ver = dmi_get_system_info(DMI_BIOS_VERSION); | 3111 | dmi_get_date(DMI_BIOS_DATE, &year, &month, &date); |
3112 | snprintf(buf, sizeof(buf), "%04d%02d%02d", year, month, date); | ||
3101 | 3113 | ||
3102 | return !ver || strcmp(ver, dmi->driver_data) < 0; | 3114 | return strcmp(buf, dmi->driver_data) < 0; |
3103 | } | 3115 | } |
3104 | 3116 | ||
3105 | static bool ahci_broken_online(struct pci_dev *pdev) | 3117 | static bool ahci_broken_online(struct pci_dev *pdev) |