linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Andrew <andrew@nelless.net>,
	linux-ide@vger.kernel.org, Kuan Luo <kluo@nvidia.com>
Subject: Re: 2.6.24-rc1, sata_nv: MCP51 is boned with SWNCQ too
Date: Thu, 25 Oct 2007 13:43:50 +0200	[thread overview]
Message-ID: <200710251343.50743.bzolnier@gmail.com> (raw)
In-Reply-To: <47207466.6030507@garzik.org>


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

  parent reply	other threads:[~2007-10-25 11:38 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 [this message]
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

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=200710251343.50743.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).