From: Jeff Garzik <jeff@garzik.org>
To: Kuan Luo <kluo@nvidia.com>
Cc: Zoltan Boszormenyi <zboszor@dunaweb.hu>,
akpm@linux-foundation.org, Peer Chen <pchen@nvidia.com>,
Robert Hancock <hancockr@shaw.ca>,
linux-ide@vger.kernel.org
Subject: Re: [patch 05/25] ata: add the SW NCQ support to sata_nv for MCP51/MCP55/MCP61
Date: Thu, 27 Sep 2007 02:19:33 -0400 [thread overview]
Message-ID: <46FB4B75.9030407@garzik.org> (raw)
In-Reply-To: <15F501D1A78BD343BE8F4D8DB854566B059FE1AB@hkemmail01.nvidia.com>
Kuan Luo wrote:
> hi,
> i saw the below changes from
> http://git.kernel.org/?p=linux/kernel/git/jgarzik/libata-dev.git;a=commi
> tdiff;h=5a5a9e1890b8260686218a68862d880daee1a817
>
> [libata] sata_nv: Clean up ATA_FLAG_NCQ usage; bit test micro-opt
>
> @@ -622,7 +622,9 @@ static const struct ata_port_info nv_port_info[] =
> {
> /* SWNCQ */
> {
> .sht = &nv_swncq_sht,
> - .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY,
> + .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
> + ATA_FLAG_NCQ,
> + .link_flags = ATA_LFLAG_HRST_TO_RESUME,
> .pio_mask = NV_PIO_MASK,
> .mwdma_mask = NV_MWDMA_MASK,
> .udma_mask = NV_UDMA_MASK,
>
> If swncq_enabled is set zero by user, nv_swncq_host_init would not be
> called .
> Then ncq should be disabled and the libata shouldn't send ncq cmd.
> I am not sure whether the ATA_FLAG_NCQ flag which is in default set
> makes libata send ncq cmd even when swncq_enable is 0?
>
> nv_init_one
> } else if (type == SWNCQ && swncq_enabled) {
> dev_printk(KERN_NOTICE, &pdev->dev, "Using SWNCQ
> mode\n");
> nv_swncq_host_init(host);
Thanks for watching! Yes, that looks like a problem.
I still feel the flags usage I removed was problematic. A better
solution, I think, would be to do follow the ADMA example of switching
the port_info type during early initialization:
if (type >= CK804 && adma_enabled) {
type = ADMA;
which in our case would result in
if (type == SWNCQ && !swncq_enabled)
type = GENERIC;
Or, if you prefer, we could take the opposite route, _not_ set SWNCQ in
the pci_device_id table, and instead do something like
if (type >= MCP65 && swncq_enabled)
type = SWNCQ;
(MCP65 is just a pulled-out-of-thin-air example)
Regards,
Jeff
next prev parent reply other threads:[~2007-09-27 6:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-10 20:59 [patch 05/25] ata: add the SW NCQ support to sata_nv for MCP51/MCP55/MCP61 akpm
2007-09-20 22:40 ` Jeff Garzik
2007-09-21 5:54 ` Zoltan Boszormenyi
2007-09-21 8:04 ` Zoltan Boszormenyi
2007-09-26 3:48 ` Jeff Garzik
2007-09-26 5:36 ` Zoltan Boszormenyi
2007-09-26 5:38 ` Jeff Garzik
2007-09-26 5:46 ` Zoltan Boszormenyi
2007-09-27 6:12 ` Kuan Luo
2007-09-27 6:19 ` Jeff Garzik [this message]
2007-09-27 6:56 ` Kuan Luo
2007-09-27 7:10 ` Jeff Garzik
2007-09-27 7:33 ` Kuan Luo
2007-09-27 8:54 ` Kuan Luo
2007-10-04 6:31 ` Peer Chen
2007-10-12 21:15 ` Jeff Garzik
2007-10-14 12:29 ` Kuan Luo
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=46FB4B75.9030407@garzik.org \
--to=jeff@garzik.org \
--cc=akpm@linux-foundation.org \
--cc=hancockr@shaw.ca \
--cc=kluo@nvidia.com \
--cc=linux-ide@vger.kernel.org \
--cc=pchen@nvidia.com \
--cc=zboszor@dunaweb.hu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.