aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_nv.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-10-29 06:49:24 -0400
committerJeff Garzik <jeff@garzik.org>2007-10-29 06:49:24 -0400
commit360737a982b1ae09e1659e0bb27085c03f02f404 (patch)
tree73fd061e06ec61fdc4a332793cf9e185ea0c31f3 /drivers/ata/sata_nv.c
parent12850ffe71c677b30f62fc054925837f1fdc4266 (diff)
[libata] sata_nv: fix SWNCQ enabling
Adapted from patches by Kuan Lou @ NVIDIA and Bartlomiej Zolnierkiewicz. Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/sata_nv.c')
-rw-r--r--drivers/ata/sata_nv.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index fea8d8d448e8..35b2df297527 100644
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -2385,6 +2385,14 @@ static int nv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
2385 type = ADMA; 2385 type = ADMA;
2386 } 2386 }
2387 2387
2388 if (type == SWNCQ) {
2389 if (swncq_enabled)
2390 dev_printk(KERN_NOTICE, &pdev->dev,
2391 "Using SWNCQ mode\n");
2392 else
2393 type = GENERIC;
2394 }
2395
2388 ppi[0] = &nv_port_info[type]; 2396 ppi[0] = &nv_port_info[type];
2389 rc = ata_pci_prepare_sff_host(pdev, ppi, &host); 2397 rc = ata_pci_prepare_sff_host(pdev, ppi, &host);
2390 if (rc) 2398 if (rc)
@@ -2426,10 +2434,8 @@ static int nv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
2426 rc = nv_adma_host_init(host); 2434 rc = nv_adma_host_init(host);
2427 if (rc) 2435 if (rc)
2428 return rc; 2436 return rc;
2429 } else if (type == SWNCQ && swncq_enabled) { 2437 } else if (type == SWNCQ)
2430 dev_printk(KERN_NOTICE, &pdev->dev, "Using SWNCQ mode\n");
2431 nv_swncq_host_init(host); 2438 nv_swncq_host_init(host);
2432 }
2433 2439
2434 pci_set_master(pdev); 2440 pci_set_master(pdev);
2435 return ata_host_activate(host, pdev->irq, ppi[0]->irq_handler, 2441 return ata_host_activate(host, pdev->irq, ppi[0]->irq_handler,