Kuan Luo wrote:
@@ -2383,6 +2383,9 @@ static int nv_init_one (struct pci_dev *pdev,
const struct pci_device_id *ent)
                type = ADMA;
        }
+ if (type == SWNCQ && !swncq_enabled)
+               type = GENERIC;
+
        ppi[0] = &nv_port_info[type];
        rc = ata_pci_prepare_sff_host(pdev, ppi, &host);
        if (rc)

I applied the attached patch.

If PCI ID revisions are still needed (please look carefully, I changed the sense of the test a bit), please send them as a separate patch.

Also, Kuan, your patch was corrupted by your email client:

@@ -365,9 +365,9 @@ static const struct pci_device_id nv_pci_tbl[] =3D {
=20     { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2),
SWNCQ },
=20     { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA),
SWNCQ },
=20     { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2),
SWNCQ },

and so it not apply-able by Linus's git tools that everybody uses.


Please make sure you get a reliable email setup, it is /critical/ for Linux development. We use email for everything... Email is a tool in our workflow almost as important as the compiler itself.

        Jeff



commit 360737a982b1ae09e1659e0bb27085c03f02f404
Author: Jeff Garzik <[EMAIL PROTECTED]>
Date:   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 file changed, 9 insertions(+), 3 deletions(-)

360737a982b1ae09e1659e0bb27085c03f02f404
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,

Reply via email to