Commit 360737a9 authored by Jeff Garzik's avatar Jeff Garzik

[libata] sata_nv: fix SWNCQ enabling

Adapted from patches by Kuan Lou @ NVIDIA and Bartlomiej Zolnierkiewicz.
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 12850ffe
...@@ -2385,6 +2385,14 @@ static int nv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -2385,6 +2385,14 @@ static int nv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
type = ADMA; type = ADMA;
} }
if (type == SWNCQ) {
if (swncq_enabled)
dev_printk(KERN_NOTICE, &pdev->dev,
"Using SWNCQ mode\n");
else
type = GENERIC;
}
ppi[0] = &nv_port_info[type]; ppi[0] = &nv_port_info[type];
rc = ata_pci_prepare_sff_host(pdev, ppi, &host); rc = ata_pci_prepare_sff_host(pdev, ppi, &host);
if (rc) if (rc)
...@@ -2426,10 +2434,8 @@ static int nv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -2426,10 +2434,8 @@ static int nv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
rc = nv_adma_host_init(host); rc = nv_adma_host_init(host);
if (rc) if (rc)
return rc; return rc;
} else if (type == SWNCQ && swncq_enabled) { } else if (type == SWNCQ)
dev_printk(KERN_NOTICE, &pdev->dev, "Using SWNCQ mode\n");
nv_swncq_host_init(host); nv_swncq_host_init(host);
}
pci_set_master(pdev); pci_set_master(pdev);
return ata_host_activate(host, pdev->irq, ppi[0]->irq_handler, return ata_host_activate(host, pdev->irq, ppi[0]->irq_handler,
......
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