Commit 6949b914 authored by Tejun Heo's avatar Tejun Heo Committed by Jeff Garzik

ahci: implement AHCI_HFLAG_NO_PMP

Of course some controllers lie about PMP support.  Black list them.
Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 417a1a6d
...@@ -176,6 +176,7 @@ enum { ...@@ -176,6 +176,7 @@ enum {
AHCI_HFLAG_32BIT_ONLY = (1 << 3), /* force 32bit */ AHCI_HFLAG_32BIT_ONLY = (1 << 3), /* force 32bit */
AHCI_HFLAG_MV_PATA = (1 << 4), /* PATA port */ AHCI_HFLAG_MV_PATA = (1 << 4), /* PATA port */
AHCI_HFLAG_NO_MSI = (1 << 5), /* no PCI MSI */ AHCI_HFLAG_NO_MSI = (1 << 5), /* no PCI MSI */
AHCI_HFLAG_NO_PMP = (1 << 6), /* no PMP */
/* ap->flags bits */ /* ap->flags bits */
AHCI_FLAG_NO_HOTPLUG = (1 << 24), /* ignore PxSERR.DIAG.N */ AHCI_FLAG_NO_HOTPLUG = (1 << 24), /* ignore PxSERR.DIAG.N */
...@@ -357,7 +358,7 @@ static const struct ata_port_info ahci_port_info[] = { ...@@ -357,7 +358,7 @@ static const struct ata_port_info ahci_port_info[] = {
}, },
/* board_ahci_vt8251 */ /* board_ahci_vt8251 */
{ {
AHCI_HFLAGS (AHCI_HFLAG_NO_NCQ), AHCI_HFLAGS (AHCI_HFLAG_NO_NCQ | AHCI_HFLAG_NO_PMP),
.flags = AHCI_FLAG_COMMON, .flags = AHCI_FLAG_COMMON,
.link_flags = AHCI_LFLAG_COMMON | ATA_LFLAG_HRST_TO_RESUME, .link_flags = AHCI_LFLAG_COMMON | ATA_LFLAG_HRST_TO_RESUME,
.pio_mask = 0x1f, /* pio0-4 */ .pio_mask = 0x1f, /* pio0-4 */
...@@ -376,7 +377,7 @@ static const struct ata_port_info ahci_port_info[] = { ...@@ -376,7 +377,7 @@ static const struct ata_port_info ahci_port_info[] = {
/* board_ahci_sb600 */ /* board_ahci_sb600 */
{ {
AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL | AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL |
AHCI_HFLAG_32BIT_ONLY), AHCI_HFLAG_32BIT_ONLY | AHCI_HFLAG_NO_PMP),
.flags = AHCI_FLAG_COMMON, .flags = AHCI_FLAG_COMMON,
.link_flags = AHCI_LFLAG_COMMON, .link_flags = AHCI_LFLAG_COMMON,
.pio_mask = 0x1f, /* pio0-4 */ .pio_mask = 0x1f, /* pio0-4 */
...@@ -578,6 +579,12 @@ static void ahci_save_initial_config(struct pci_dev *pdev, ...@@ -578,6 +579,12 @@ static void ahci_save_initial_config(struct pci_dev *pdev,
cap &= ~HOST_CAP_NCQ; cap &= ~HOST_CAP_NCQ;
} }
if ((cap && HOST_CAP_PMP) && (hpriv->flags & AHCI_HFLAG_NO_PMP)) {
dev_printk(KERN_INFO, &pdev->dev,
"controller can't do PMP, turning off CAP_PMP\n");
cap &= ~HOST_CAP_PMP;
}
/* /*
* Temporary Marvell 6145 hack: PATA port presence * Temporary Marvell 6145 hack: PATA port presence
* is asserted through the standard AHCI port * is asserted through the standard AHCI port
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment