diff options
Diffstat (limited to 'drivers/ata/ata_piix.c')
-rw-r--r-- | drivers/ata/ata_piix.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index 887d8f46a287..54961c0b2c73 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c | |||
@@ -1387,6 +1387,32 @@ static void piix_iocfg_bit18_quirk(struct ata_host *host) | |||
1387 | } | 1387 | } |
1388 | } | 1388 | } |
1389 | 1389 | ||
1390 | static bool piix_broken_system_poweroff(struct pci_dev *pdev) | ||
1391 | { | ||
1392 | static const struct dmi_system_id broken_systems[] = { | ||
1393 | { | ||
1394 | .ident = "HP Compaq 2510p", | ||
1395 | .matches = { | ||
1396 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), | ||
1397 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq 2510p"), | ||
1398 | }, | ||
1399 | /* PCI slot number of the controller */ | ||
1400 | .driver_data = (void *)0x1FUL, | ||
1401 | }, | ||
1402 | |||
1403 | { } /* terminate list */ | ||
1404 | }; | ||
1405 | const struct dmi_system_id *dmi = dmi_first_match(broken_systems); | ||
1406 | |||
1407 | if (dmi) { | ||
1408 | unsigned long slot = (unsigned long)dmi->driver_data; | ||
1409 | /* apply the quirk only to on-board controllers */ | ||
1410 | return slot == PCI_SLOT(pdev->devfn); | ||
1411 | } | ||
1412 | |||
1413 | return false; | ||
1414 | } | ||
1415 | |||
1390 | /** | 1416 | /** |
1391 | * piix_init_one - Register PIIX ATA PCI device with kernel services | 1417 | * piix_init_one - Register PIIX ATA PCI device with kernel services |
1392 | * @pdev: PCI device to register | 1418 | * @pdev: PCI device to register |
@@ -1422,6 +1448,14 @@ static int __devinit piix_init_one(struct pci_dev *pdev, | |||
1422 | if (!in_module_init) | 1448 | if (!in_module_init) |
1423 | return -ENODEV; | 1449 | return -ENODEV; |
1424 | 1450 | ||
1451 | if (piix_broken_system_poweroff(pdev)) { | ||
1452 | piix_port_info[ent->driver_data].flags |= | ||
1453 | ATA_FLAG_NO_POWEROFF_SPINDOWN | | ||
1454 | ATA_FLAG_NO_HIBERNATE_SPINDOWN; | ||
1455 | dev_info(&pdev->dev, "quirky BIOS, skipping spindown " | ||
1456 | "on poweroff and hibernation\n"); | ||
1457 | } | ||
1458 | |||
1425 | port_info[0] = piix_port_info[ent->driver_data]; | 1459 | port_info[0] = piix_port_info[ent->driver_data]; |
1426 | port_info[1] = piix_port_info[ent->driver_data]; | 1460 | port_info[1] = piix_port_info[ent->driver_data]; |
1427 | 1461 | ||