Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188199
b: refs/heads/master
c: 9deb343
h: refs/heads/master
i:
  188197: 73154bb
  188195: a15b818
  188191: 0c8b789
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Mar 17, 2010
1 parent 4fe8746 commit 85d5683
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 603037c3d1a42d5013f035355a2c60b0006a9fdf
refs/heads/master: 9deb343189b3cf45e84dd08480f330575ffe2004
28 changes: 20 additions & 8 deletions trunk/drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -3037,6 +3037,14 @@ static bool ahci_broken_suspend(struct pci_dev *pdev)
* On HP dv[4-6] and HDX18 with earlier BIOSen, link
* to the harddisk doesn't become online after
* resuming from STR. Warn and fail suspend.
*
* http://bugzilla.kernel.org/show_bug.cgi?id=12276
*
* Use dates instead of versions to match as HP is
* apparently recycling both product and version
* strings.
*
* http://bugzilla.kernel.org/show_bug.cgi?id=15462
*/
{
.ident = "dv4",
Expand All @@ -3045,7 +3053,7 @@ static bool ahci_broken_suspend(struct pci_dev *pdev)
DMI_MATCH(DMI_PRODUCT_NAME,
"HP Pavilion dv4 Notebook PC"),
},
.driver_data = "F.30", /* cutoff BIOS version */
.driver_data = "20090105", /* F.30 */
},
{
.ident = "dv5",
Expand All @@ -3054,7 +3062,7 @@ static bool ahci_broken_suspend(struct pci_dev *pdev)
DMI_MATCH(DMI_PRODUCT_NAME,
"HP Pavilion dv5 Notebook PC"),
},
.driver_data = "F.16", /* cutoff BIOS version */
.driver_data = "20090506", /* F.16 */
},
{
.ident = "dv6",
Expand All @@ -3063,7 +3071,7 @@ static bool ahci_broken_suspend(struct pci_dev *pdev)
DMI_MATCH(DMI_PRODUCT_NAME,
"HP Pavilion dv6 Notebook PC"),
},
.driver_data = "F.21", /* cutoff BIOS version */
.driver_data = "20090423", /* F.21 */
},
{
.ident = "HDX18",
Expand All @@ -3072,34 +3080,38 @@ static bool ahci_broken_suspend(struct pci_dev *pdev)
DMI_MATCH(DMI_PRODUCT_NAME,
"HP HDX18 Notebook PC"),
},
.driver_data = "F.23", /* cutoff BIOS version */
.driver_data = "20090430", /* F.23 */
},
/*
* Acer eMachines G725 has the same problem. BIOS
* V1.03 is known to be broken. V3.04 is known to
* work. Inbetween, there are V1.06, V2.06 and V3.03
* that we don't have much idea about. For now,
* blacklist anything older than V3.04.
*
* http://bugzilla.kernel.org/show_bug.cgi?id=15104
*/
{
.ident = "G725",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "eMachines"),
DMI_MATCH(DMI_PRODUCT_NAME, "eMachines G725"),
},
.driver_data = "V3.04", /* cutoff BIOS version */
.driver_data = "20091216", /* V3.04 */
},
{ } /* terminate list */
};
const struct dmi_system_id *dmi = dmi_first_match(sysids);
const char *ver;
int year, month, date;
char buf[9];

if (!dmi || pdev->bus->number || pdev->devfn != PCI_DEVFN(0x1f, 2))
return false;

ver = dmi_get_system_info(DMI_BIOS_VERSION);
dmi_get_date(DMI_BIOS_DATE, &year, &month, &date);
snprintf(buf, sizeof(buf), "%04d%02d%02d", year, month, date);

return !ver || strcmp(ver, dmi->driver_data) < 0;
return strcmp(buf, dmi->driver_data) < 0;
}

static bool ahci_broken_online(struct pci_dev *pdev)
Expand Down

0 comments on commit 85d5683

Please sign in to comment.