Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=360737a982b1ae09e1659e0bb27085c03f02f404
Commit:     360737a982b1ae09e1659e0bb27085c03f02f404
Parent:     12850ffe71c677b30f62fc054925837f1fdc4266
Author:     Jeff Garzik <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 29 06:49:24 2007 -0400
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Mon Oct 29 06:49:24 2007 -0400

    [libata] sata_nv: fix SWNCQ enabling
    
    Adapted from patches by Kuan Lou @ NVIDIA and Bartlomiej Zolnierkiewicz.
    
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/ata/sata_nv.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index fea8d8d..35b2df2 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)
                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];
        rc = ata_pci_prepare_sff_host(pdev, ppi, &host);
        if (rc)
@@ -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);
                if (rc)
                        return rc;
-       } else if (type == SWNCQ && swncq_enabled) {
-               dev_printk(KERN_NOTICE, &pdev->dev, "Using SWNCQ mode\n");
+       } else if (type == SWNCQ)
                nv_swncq_host_init(host);
-       }
 
        pci_set_master(pdev);
        return ata_host_activate(host, pdev->irq, ppi[0]->irq_handler,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to