* 2.6.24-rc1, sata_nv: MCP51 is boned with SWNCQ too
@ 2007-10-25 9:54 Andrew
2007-10-25 10:48 ` Jeff Garzik
0 siblings, 1 reply; 12+ messages in thread
From: Andrew @ 2007-10-25 9:54 UTC (permalink / raw)
To: linux-ide
Hi,
I've noticed a thread reporting that SWNCQ can't be disabled
on the sata_nv.
Gerhard Dirschl
* BUG: sata_nv swncq cannot be disabled
and another with a patch switching MCP61 to GENERIC instead
of SWNCQ
Kuan Luo
* [PATCH] ata: sata_nv MCP61 using GENERIC instead of SWNCQ
I would like to to report that the MCP51 on my Asus A8NVM CSM
mainboard is dead due to timeouts with SWNCQ. Reverting sata_nv.c
to the version prior to git commit
f140f0f12fc8dc7264d2f97cbe663564e7d24f6d works around the problem.
My drives are all Seagate drives, ST3320620AS, ST3500630AS,
ST3300831AS.
Not subscribed, please CC.
Andrew
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: 2.6.24-rc1, sata_nv: MCP51 is boned with SWNCQ too
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
0 siblings, 2 replies; 12+ messages in thread
From: Jeff Garzik @ 2007-10-25 10:48 UTC (permalink / raw)
To: Andrew; +Cc: linux-ide, Kuan Luo
Andrew wrote:
> Hi,
>
> I've noticed a thread reporting that SWNCQ can't be disabled
> on the sata_nv.
>
> Gerhard Dirschl
> * BUG: sata_nv swncq cannot be disabled
>
> and another with a patch switching MCP61 to GENERIC instead
> of SWNCQ
>
> Kuan Luo
> * [PATCH] ata: sata_nv MCP61 using GENERIC instead of SWNCQ
>
>
> I would like to to report that the MCP51 on my Asus A8NVM CSM
> mainboard is dead due to timeouts with SWNCQ. Reverting sata_nv.c
> to the version prior to git commit
> f140f0f12fc8dc7264d2f97cbe663564e7d24f6d works around the problem.
>
> My drives are all Seagate drives, ST3320620AS, ST3500630AS,
> ST3300831AS.
Really? That's a showstopper bug, as swncq is supposed to be disabled
by default.
Jeff
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: 2.6.24-rc1, sata_nv: MCP51 is boned with SWNCQ too
2007-10-25 10:48 ` Jeff Garzik
@ 2007-10-25 11:13 ` Andrew Nelless
2007-10-25 11:43 ` Bartlomiej Zolnierkiewicz
1 sibling, 0 replies; 12+ messages in thread
From: Andrew Nelless @ 2007-10-25 11:13 UTC (permalink / raw)
To: Jeff Garzik; +Cc: linux-ide
On Thu, October 25, 2007 11:48, Jeff Garzik wrote:
> Really? That's a showstopper bug, as swncq is supposed to be disabled
> by default.
>
> Jeff
>
Well I have sata_nv compiled in rather than a module loaded by initrd
(If thats even possible?) and passing "sata_nv.swncq=0" or "swncq=0"
to the kernel did nothing ("Gaah, my kernel params, they do nothing!")
I will post again shortly with a netconsole log from a fresh 2.6.24-rc1
build.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: 2.6.24-rc1, sata_nv: MCP51 is boned with SWNCQ too
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
1 sibling, 1 reply; 12+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-10-25 11:43 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Andrew, linux-ide, Kuan Luo
Hi,
On Thursday 25 October 2007, Jeff Garzik wrote:
> Andrew wrote:
> > Hi,
> >
> > I've noticed a thread reporting that SWNCQ can't be disabled
> > on the sata_nv.
> >
> > Gerhard Dirschl
> > * BUG: sata_nv swncq cannot be disabled
> >
> > and another with a patch switching MCP61 to GENERIC instead
> > of SWNCQ
> >
> > Kuan Luo
> > * [PATCH] ata: sata_nv MCP61 using GENERIC instead of SWNCQ
> >
> >
> > I would like to to report that the MCP51 on my Asus A8NVM CSM
> > mainboard is dead due to timeouts with SWNCQ. Reverting sata_nv.c
> > to the version prior to git commit
> > f140f0f12fc8dc7264d2f97cbe663564e7d24f6d works around the problem.
> >
> > My drives are all Seagate drives, ST3320620AS, ST3500630AS,
> > ST3300831AS.
>
>
> Really? That's a showstopper bug, as swncq is supposed to be disabled
> by default.
>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
...
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: 2.6.24-rc1, sata_nv: MCP51 is boned with SWNCQ too
2007-10-25 11:43 ` Bartlomiej Zolnierkiewicz
@ 2007-10-25 11:47 ` Andrew
2007-10-25 12:06 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 12+ messages in thread
From: Andrew @ 2007-10-25 11:47 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide
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
> ...
>
>
> 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.
Andrew.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: 2.6.24-rc1, sata_nv: MCP51 is boned with SWNCQ too
2007-10-25 11:47 ` Andrew
@ 2007-10-25 12:06 ` Bartlomiej Zolnierkiewicz
2007-10-25 12:11 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 12+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-10-25 12:06 UTC (permalink / raw)
To: Andrew; +Cc: linux-ide, Kuan Luo, Jeff Garzik
[ 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?
[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 | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 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 */
};
@@ -2381,7 +2381,11 @@ static int nv_init_one (struct pci_dev *
type = ADMA;
}
+ if (type == GENERIC && swncq_enabled)
+ type = SWNCQ;
+
ppi[0] = &nv_port_info[type];
+
rc = ata_pci_prepare_sff_host(pdev, ppi, &host);
if (rc)
return rc;
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: 2.6.24-rc1, sata_nv: MCP51 is boned with SWNCQ too
2007-10-25 12:06 ` Bartlomiej Zolnierkiewicz
@ 2007-10-25 12:11 ` Bartlomiej Zolnierkiewicz
2007-10-25 12:35 ` Jeff Garzik
2007-10-25 20:58 ` Andrew
0 siblings, 2 replies; 12+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-10-25 12:11 UTC (permalink / raw)
To: Andrew; +Cc: linux-ide, Kuan Luo, Jeff Garzik
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,
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: 2.6.24-rc1, sata_nv: MCP51 is boned with SWNCQ too
2007-10-25 12:11 ` Bartlomiej Zolnierkiewicz
@ 2007-10-25 12:35 ` Jeff Garzik
2007-10-25 14:03 ` Bartlomiej Zolnierkiewicz
2007-10-25 20:58 ` Andrew
1 sibling, 1 reply; 12+ messages in thread
From: Jeff Garzik @ 2007-10-25 12:35 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: Andrew, linux-ide, Kuan Luo
Bartlomiej Zolnierkiewicz wrote:
> @@ -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;
> }
>
If we want to start putting PCI_ANY_ID entries in the pci_device_id
table (as other NVIDIA patches have proposed), I don't think it's safe
to assume that all devices marked GENERIC can do SWNCQ, while it should
be safe to fall back from SWNCQ to GENERIC. GENERIC is the selection
being considered for use as being compatible with future chips.
But overall both patches look straightforward...
Jeff
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: 2.6.24-rc1, sata_nv: MCP51 is boned with SWNCQ too
2007-10-25 12:35 ` Jeff Garzik
@ 2007-10-25 14:03 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 12+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-10-25 14:03 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Andrew, linux-ide, Kuan Luo
On 10/25/07, Jeff Garzik <jeff@garzik.org> wrote:
> Bartlomiej Zolnierkiewicz wrote:
> > @@ -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;
> > }
> >
>
>
> If we want to start putting PCI_ANY_ID entries in the pci_device_id
> table (as other NVIDIA patches have proposed), I don't think it's safe
> to assume that all devices marked GENERIC can do SWNCQ, while it should
> be safe to fall back from SWNCQ to GENERIC. GENERIC is the selection
> being considered for use as being compatible with future chips.
This is up to nVidia people and may as well be dealt with in the future
patches. The only goal of this patch was to fix "a showstopper bug".
> But overall both patches look straightforward...
Thanks,
Bart
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: 2.6.24-rc1, sata_nv: MCP51 is boned with SWNCQ too
2007-10-25 12:11 ` Bartlomiej Zolnierkiewicz
2007-10-25 12:35 ` Jeff Garzik
@ 2007-10-25 20:58 ` Andrew
2007-10-26 5:18 ` Kuan Luo
1 sibling, 1 reply; 12+ messages in thread
From: Andrew @ 2007-10-25 20:58 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide, kluo, jeff
On Thu, October 25, 2007 13:11, Bartlomiej Zolnierkiewicz wrote:
>
>
> 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.
>
This patch worked a treat, thanks.
-
Andrew
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: 2.6.24-rc1, sata_nv: MCP51 is boned with SWNCQ too
2007-10-25 20:58 ` Andrew
@ 2007-10-26 5:18 ` Kuan Luo
2007-10-26 13:26 ` Andrew
0 siblings, 1 reply; 12+ messages in thread
From: Kuan Luo @ 2007-10-26 5:18 UTC (permalink / raw)
To: jeff, Andrew; +Cc: Bartlomiej Zolnierkiewicz, linux-ide
Andrew wrote:
>
> On Thu, October 25, 2007 13:11, Bartlomiej Zolnierkiewicz wrote:
> >
> >
> > 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.
> >
>
> This patch worked a treat, thanks.
>
> -
> Andrew
>
>
I just reviewed your mails and simply analysed the message from
http://andotnet.nfshost.com/linux/2.6.24-rc1-swncq.txt.
I saw that the "Using SWNCQ mode" didn't appear, so the swncq should be
equal to 0 and nv_swncq_host_init wasnt' called.
>From the message "ata1.00: 976773168 sectors, multi 16: LBA48 NCQ (depth
31/32) "
, i know the libata layer should use ncq protocol. Because the
nv_port_info set ATA_FLAG_NCQ flag and the sata support ncq,
ata_dev_config_ncq will set dev->flags |= ATA_DFLAG_NCQ and print
(depth 31/32);
When a ncq command is transferred to sata_nv, sata_nv with mcp51 in
SWNCQ will handle it using ncq software flow whatever value the swncq
is.
The error maybe happens if sata_nv does ncq , but the
nv_swncq_host_init isn't called and bios either doesn't initialize the
ncq register.
Best regards,
Kuan Luo
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: 2.6.24-rc1, sata_nv: MCP51 is boned with SWNCQ too
2007-10-26 5:18 ` Kuan Luo
@ 2007-10-26 13:26 ` Andrew
0 siblings, 0 replies; 12+ messages in thread
From: Andrew @ 2007-10-26 13:26 UTC (permalink / raw)
To: Kuan Luo; +Cc: linux-ide, jeff, bzolnier
On Fri, October 26, 2007 06:18, Kuan Luo wrote:
>
>
> When a ncq command is transferred to sata_nv, sata_nv with mcp51 in
> SWNCQ will handle it using ncq software flow whatever value the swncq
> is. The error maybe happens if sata_nv does ncq , but the
> nv_swncq_host_init isn't called and bios either doesn't initialize the ncq register.
>
> Best regards,
> Kuan Luo
>
Kuan,
Following your email I checked to see whether it would now work
with sata_nv.swncq=1 passed to the kernel, now that Bartlomiej
Zolnierkiewicz's patch, is applied...and it does, of course.
Thank you all.
--
Andrew
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2007-10-26 13:26 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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).