From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Andrew <andrew@nelless.net>
Cc: linux-ide@vger.kernel.org, Kuan Luo <kluo@nvidia.com>,
Jeff Garzik <jeff@garzik.org>
Subject: Re: 2.6.24-rc1, sata_nv: MCP51 is boned with SWNCQ too
Date: Thu, 25 Oct 2007 14:11:42 +0200 [thread overview]
Message-ID: <200710251411.42546.bzolnier@gmail.com> (raw)
In-Reply-To: <200710251406.05804.bzolnier@gmail.com>
On Thursday 25 October 2007, Bartlomiej Zolnierkiewicz wrote:
>
> [ adding Kuan and Jeff back to cc: ]
>
> On Thursday 25 October 2007, Andrew wrote:
> > On Thu, October 25, 2007 12:43, Bartlomiej Zolnierkiewicz wrote:
> > >
> > >
> > > From the quick look:
> > >
> > >
> > > static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) ...
> > > ppi[0] = &nv_port_info[type]; ...
> > > if (type == ADMA) { rc = nv_adma_host_init(host); if (rc) return rc; } else if (type ==
> > SWNCQ &&
> > > swncq_enabled) {
> > >
> > > --> this is the only place when swncq_enabled is read
> > >
> > >
> > > dev_printk(KERN_NOTICE, &pdev->dev, "Using SWNCQ mode\n"); nv_swncq_host_init(host);
> > >
> > > --> nw_swncq_host_init() controls only _hardware_ side of SWNCQ enable
> > > }
> > >
> > >
> > > pci_set_master(pdev); return ata_host_activate(host, pdev->irq, ppi[0]->irq_handler,
> > > IRQF_SHARED, ppi[0]->sht);
> > >
> > >
> > > --> since ppi[0] _always_ points nv_port_info[SWNCQ], it could happen
> > > that if SWNCQ has already been enabled by BIOS/firmware swncq_enabled setting will be ignored
>
> Update: BIOS/firmware doesn't matter -> SWNCQ methods will be used anyway
>
> > > ...
> > >
> > >
> > > If this is the case the obvious fix will be to s/SWNCQ/GENERIC/ in
> > > nv_pci_tbl[] and assign ppi[0] to nv_port_info[SWNCQ] in nv_init_one() only if (type == GENERIC
> > > && swncq_enabled).
> > >
> > >
> > > Thanks,
> > > Bart
> > >
> > >
> >
> > Hi,
> >
> > I think my netconsole log will confirm your analysis.
> >
> > It's available here:
> > http://andotnet.nfshost.com/linux/2.6.24-rc1-swncq.txt
> >
> > Notice that "Using SWNCQ mode" is not printed.
>
> Thanks, could you try this patch?
[ ... ]
a better version
[PATCH] sata_nv: respect swncq_enabled setting
SWNCQ is always used despite swncq_enabled setting (which is disabled by
default). Fix it by using GENERIC nv_port_info[] entry for SWNCQ controllers
if swncq_enabled is not enabled.
Thanks to Andrew for bisecting the problem to commit
f140f0f12fc8dc7264d2f97cbe663564e7d24f6d.
Cc: Kuan Luo <kluo@nvidia.com>
Cc: Andrew <andrew@nelless.net>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ata/sata_nv.c | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
Index: b/drivers/ata/sata_nv.c
===================================================================
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -49,7 +49,7 @@
#include <linux/libata.h>
#define DRV_NAME "sata_nv"
-#define DRV_VERSION "3.5"
+#define DRV_VERSION "3.6"
#define NV_ADMA_DMA_BOUNDARY 0xffffffffUL
@@ -361,13 +361,13 @@ static const struct pci_device_id nv_pci
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2), CK804 },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA), CK804 },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2), CK804 },
- { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA), SWNCQ },
- { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2), SWNCQ },
- { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA), SWNCQ },
- { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2), SWNCQ },
- { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA), SWNCQ },
- { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA2), SWNCQ },
- { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA3), SWNCQ },
+ { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA), GENERIC },
+ { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2), GENERIC },
+ { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA), GENERIC },
+ { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2), GENERIC },
+ { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA), GENERIC },
+ { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA2), GENERIC },
+ { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA3), GENERIC },
{ } /* terminate list */
};
@@ -2379,9 +2379,13 @@ static int nv_init_one (struct pci_dev *
if (type == CK804 && adma_enabled) {
dev_printk(KERN_NOTICE, &pdev->dev, "Using ADMA mode\n");
type = ADMA;
+ } else if (type == GENERIC && swncq_enabled) {
+ dev_printk(KERN_NOTICE, &pdev->dev, "Using SWNCQ mode\n");
+ type = SWNCQ;
}
ppi[0] = &nv_port_info[type];
+
rc = ata_pci_prepare_sff_host(pdev, ppi, &host);
if (rc)
return rc;
@@ -2422,10 +2426,8 @@ static int nv_init_one (struct pci_dev *
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,
next prev parent reply other threads:[~2007-10-25 12:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-25 9:54 2.6.24-rc1, sata_nv: MCP51 is boned with SWNCQ too Andrew
2007-10-25 10:48 ` Jeff Garzik
2007-10-25 11:13 ` Andrew Nelless
2007-10-25 11:43 ` Bartlomiej Zolnierkiewicz
2007-10-25 11:47 ` Andrew
2007-10-25 12:06 ` Bartlomiej Zolnierkiewicz
2007-10-25 12:11 ` Bartlomiej Zolnierkiewicz [this message]
2007-10-25 12:35 ` Jeff Garzik
2007-10-25 14:03 ` Bartlomiej Zolnierkiewicz
2007-10-25 20:58 ` Andrew
2007-10-26 5:18 ` Kuan Luo
2007-10-26 13:26 ` Andrew
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200710251411.42546.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=andrew@nelless.net \
--cc=jeff@garzik.org \
--cc=kluo@nvidia.com \
--cc=linux-ide@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).