Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[libata] sata_nv: fix SWNCQ enabling

Adapted from patches by Kuan Lou @ NVIDIA and Bartlomiej Zolnierkiewicz.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>

+9 -3
+9 -3
drivers/ata/sata_nv.c
··· 2385 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 2396 ppi[0] = &nv_port_info[type]; 2389 2397 rc = ata_pci_prepare_sff_host(pdev, ppi, &host); 2390 2398 if (rc) ··· 2434 2426 rc = nv_adma_host_init(host); 2435 2427 if (rc) 2436 2428 return rc; 2437 - } else if (type == SWNCQ && swncq_enabled) { 2438 - dev_printk(KERN_NOTICE, &pdev->dev, "Using SWNCQ mode\n"); 2429 + } else if (type == SWNCQ) 2439 2430 nv_swncq_host_init(host); 2440 - } 2441 2431 2442 2432 pci_set_master(pdev); 2443 2433 return ata_host_activate(host, pdev->irq, ppi[0]->irq_handler,