* [PATCH]ata: sata_nv fix mcp51 timeout with SWNCQ
@ 2007-10-26 7:49 Kuan Luo
2007-10-26 18:58 ` Bartlomiej Zolnierkiewicz
2007-10-29 10:55 ` Jeff Garzik
0 siblings, 2 replies; 4+ messages in thread
From: Kuan Luo @ 2007-10-26 7:49 UTC (permalink / raw)
To: jeff; +Cc: akpm, linux-ide, Peer Chen
>From Kuan Luo <kluo@nvidia.com>
The patch will avoid ncq function use of sata_nv when swncq is zero by
default.
signed-off-by: Kuan Luo <kluo@nvidia.com>
---
sata_nv.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index 240a892..e6b6455 100644
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -365,9 +365,9 @@ static const struct pci_device_id nv_pci_tbl[] = {
{ 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_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 */
};
@@ -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)
_
-----------------------------------------------------------------------------------
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 related [flat|nested] 4+ messages in thread* Re: [PATCH]ata: sata_nv fix mcp51 timeout with SWNCQ
2007-10-26 7:49 [PATCH]ata: sata_nv fix mcp51 timeout with SWNCQ Kuan Luo
@ 2007-10-26 18:58 ` Bartlomiej Zolnierkiewicz
2007-10-29 2:59 ` Kuan Luo
2007-10-29 10:55 ` Jeff Garzik
1 sibling, 1 reply; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-10-26 18:58 UTC (permalink / raw)
To: Kuan Luo; +Cc: jeff, akpm, linux-ide, Peer Chen, Andrew
[ added Andrew to cc: ]
Hi,
On Friday 26 October 2007, Kuan Luo wrote:
> From Kuan Luo <kluo@nvidia.com>
>
> The patch will avoid ncq function use of sata_nv when swncq is zero by
> default.
It also completely removes SWNCQ support for MPC61 (something
like that should be mentioned in the patch description).
Otherwise patch looks fine and mine can be dumped.
PS Please always at least Cc: people involved in the debugging
of the problem (crediting them in the patch description would be
even nicer :).
> signed-off-by: Kuan Luo <kluo@nvidia.com>
> ---
>
> sata_nv.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
> index 240a892..e6b6455 100644
> --- a/drivers/ata/sata_nv.c
> +++ b/drivers/ata/sata_nv.c
> @@ -365,9 +365,9 @@ static const struct pci_device_id nv_pci_tbl[] = {
> { 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_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 */
> };
> @@ -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)
^ permalink raw reply [flat|nested] 4+ messages in thread* RE: [PATCH]ata: sata_nv fix mcp51 timeout with SWNCQ
2007-10-26 18:58 ` Bartlomiej Zolnierkiewicz
@ 2007-10-29 2:59 ` Kuan Luo
0 siblings, 0 replies; 4+ messages in thread
From: Kuan Luo @ 2007-10-29 2:59 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: jeff, akpm, linux-ide, Peer Chen, Andrew
Bartlomiej Zolnierkiewicz wrote:
> PS Please always at least Cc: people involved in the debugging
> of the problem (crediting them in the patch description would be
> even nicer :).
I apology for forgetting adding all the involved people into Cc.
Thank all of you for your efforts.
-----------------------------------------------------------------------------------
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] 4+ messages in thread
* Re: [PATCH]ata: sata_nv fix mcp51 timeout with SWNCQ
2007-10-26 7:49 [PATCH]ata: sata_nv fix mcp51 timeout with SWNCQ Kuan Luo
2007-10-26 18:58 ` Bartlomiej Zolnierkiewicz
@ 2007-10-29 10:55 ` Jeff Garzik
1 sibling, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2007-10-29 10:55 UTC (permalink / raw)
To: Kuan Luo; +Cc: akpm, linux-ide, Peer Chen
[-- Attachment #1: Type: text/plain, Size: 1144 bytes --]
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
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 1373 bytes --]
commit 360737a982b1ae09e1659e0bb27085c03f02f404
Author: Jeff Garzik <jeff@garzik.org>
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 <jgarzik@redhat.com>
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,
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-10-29 10:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-26 7:49 [PATCH]ata: sata_nv fix mcp51 timeout with SWNCQ Kuan Luo
2007-10-26 18:58 ` Bartlomiej Zolnierkiewicz
2007-10-29 2:59 ` Kuan Luo
2007-10-29 10:55 ` Jeff Garzik
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).