aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ata/ata_piix.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index ef773e12af79..bec35f491cb9 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -1585,12 +1585,31 @@ static void piix_ignore_devices_quirk(struct ata_host *host)
1585 }, 1585 },
1586 { } /* terminate list */ 1586 { } /* terminate list */
1587 }; 1587 };
1588 const struct dmi_system_id *dmi = dmi_first_match(ignore_hyperv); 1588 static const struct dmi_system_id allow_virtual_pc[] = {
1589 {
1590 /* In MS Virtual PC guests the DMI ident is nearly
1591 * identical to a Hyper-V guest. One difference is the
1592 * product version which is used here to identify
1593 * a Virtual PC guest. This entry allows ata_piix to
1594 * drive the emulated hardware.
1595 */
1596 .ident = "MS Virtual PC 2007",
1597 .matches = {
1598 DMI_MATCH(DMI_SYS_VENDOR,
1599 "Microsoft Corporation"),
1600 DMI_MATCH(DMI_PRODUCT_NAME, "Virtual Machine"),
1601 DMI_MATCH(DMI_PRODUCT_VERSION, "VS2005R2"),
1602 },
1603 },
1604 { } /* terminate list */
1605 };
1606 const struct dmi_system_id *ignore = dmi_first_match(ignore_hyperv);
1607 const struct dmi_system_id *allow = dmi_first_match(allow_virtual_pc);
1589 1608
1590 if (dmi && prefer_ms_hyperv) { 1609 if (ignore && !allow && prefer_ms_hyperv) {
1591 host->flags |= ATA_HOST_IGNORE_ATA; 1610 host->flags |= ATA_HOST_IGNORE_ATA;
1592 dev_info(host->dev, "%s detected, ATA device ignore set\n", 1611 dev_info(host->dev, "%s detected, ATA device ignore set\n",
1593 dmi->ident); 1612 ignore->ident);
1594 } 1613 }
1595#endif 1614#endif
1596} 1615}