Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 130271
b: refs/heads/master
c: 1fd6843
h: refs/heads/master
i:
  130269: db55748
  130267: f548453
  130263: fe6736c
  130255: 924146e
  130239: a447147
v: v3
  • Loading branch information
Rafael J. Wysocki authored and Jeff Garzik committed Jan 27, 2009
1 parent 2d907eb commit 4093be6
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2a6e58d2731dcc05dafa7f976d935e0f0627fcd7
refs/heads/master: 1fd684346d41f6be2487c161f60d03a7feb68911
32 changes: 32 additions & 0 deletions trunk/drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2548,6 +2548,32 @@ static void ahci_p5wdh_workaround(struct ata_host *host)
}
}

static bool ahci_broken_system_poweroff(struct pci_dev *pdev)
{
static const struct dmi_system_id broken_systems[] = {
{
.ident = "HP Compaq nx6310",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq nx6310"),
},
/* PCI slot number of the controller */
.driver_data = (void *)0x1FUL,
},

{ } /* terminate list */
};
const struct dmi_system_id *dmi = dmi_first_match(broken_systems);

if (dmi) {
unsigned long slot = (unsigned long)dmi->driver_data;
/* apply the quirk only to on-board controllers */
return slot == PCI_SLOT(pdev->devfn);
}

return false;
}

static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
static int printed_version;
Expand Down Expand Up @@ -2647,6 +2673,12 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
}
}

if (ahci_broken_system_poweroff(pdev)) {
pi.flags |= ATA_FLAG_NO_POWEROFF_SPINDOWN;
dev_info(&pdev->dev,
"quirky BIOS, skipping spindown on poweroff\n");
}

/* CAP.NP sometimes indicate the index of the last enabled
* port, at other times, that of the last possible port, so
* determining the maximum port number requires looking at
Expand Down

0 comments on commit 4093be6

Please sign in to comment.