From: Jeremy Higdon <jeremy@sgi.com>
To: Dave <dave.jiang@gmail.com>
Cc: linux-ide@vger.kernel.org, jgarzik@pobox.com
Subject: Re: [PATCH] updates to Vitesse SATA driver
Date: Wed, 22 Sep 2004 13:13:28 -0700 [thread overview]
Message-ID: <20040922201327.GD151463@sgi.com> (raw)
In-Reply-To: <8746466a04092210094f859468@mail.gmail.com>
On Wed, Sep 22, 2004 at 10:09:03AM -0700, Dave wrote:
> On Wed, 22 Sep 2004 08:59:06 -0700, Dave <dave.jiang@gmail.com> wrote:
> > On Tue, 21 Sep 2004 19:06:14 -0700, Jeremy Higdon <jeremy@sgi.com > wrote:
> > > On Tue, Sep 21, 2004 at 02:16:46PM -0700, Dave wrote:
> > > > After getting that working I noticed that the last_ctl value gets
> > > > changed back by the LIBATA core and the Vitesse SATA driver depends on
> > > > the previous value in order to unmask the interrupt. So it seems that
> > > > there's no need to set/unset the interrupt masks in the first place if
> > > > we set the CTL register with ATA_NIEN directly, which I believe is
> > > > probably the way LIBATA intended the driver to do. After doing that
> > > > everything seems to be working great. So I suppose
> > > > vsc_intr_mask_update() is no longer needed probably.
> > >
> > > The chip specification says not to set it that way. Are you using
> > > the chip in DPA mode or PCI-IDE mode? The driver assumes the former. I
> > > don't know why anyone would use the chip in PCI-IDE mode.
> >
> > Hmmm...I did not see it in the spec. Can you provide the pointer to
> > the spec please? Thanks! I am using it in DPA mode. If you are in
> > PCI-IDE mode, all registers would reside in different BARs and the
> > card wouldn't work anyways with that driver. I copied the section from
> > sata_svw.c. And it seems to work just fine. I don't see how the
> > previous method would be working. In vsc_sata_tf_load a compare is
> > done between the tf->ctl and the ap->last_ctl. However, if I do it
> > with the current method, I continue to see ap->last_ctl with ATA_NIEN
> > cleared even though the previous value was set. Therefore the driver
> > never unmask the IDE interrupt and thus hang. What happened was, host
> > 1, dev 0 was probed and was okay. Then it attempted to probe host 1,
> > dev 1, which of course does not exist, so at exit, ata_irq_on() was
> > called. With that the last_ctl was reset with ATA_NIEN cleared.
> > Therefore when the driver does the compare of ctl with last_ctl, it
> > sees no difference, and therefore interrupt mask never changed.
>
> I see what you mean by the spec regarding the ATA_NIEN bit. ATA_NIEN
> is reserved bit in DPA mode. I guess it still works. But to do the
> things the right way now this becomes a problem since as I mentioned
> above, libata-core can change the last_ctl value without the driver's
> knowledge. So really we cannot always depend on last_ctl to be the
> last_ctl the driver has set. I'm not exactly sure yet why the driver
> works on IA in the current state. Everything tells me it shouldn't....
> Unless there's something that I'm suppose to configure to force it not
> probe device 1 since in SATA there's never device 1?
I can tell you that it works fine on our Altix (IA64 Numa) boxes with
1 - 4 drives attached. I don't recall exactly how we tell libata that
there is only one device per port -- there must be a parameter somewhere :-)
I do remember that we had to explicitly tell the IDE layer about that,
for the IDE version of the driver in lk2.4.
jeremy
next prev parent reply other threads:[~2004-09-22 20:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-21 21:16 [PATCH] updates to Vitesse SATA driver Dave
2004-09-22 2:06 ` Jeremy Higdon
2004-09-22 15:59 ` Dave
2004-09-22 17:09 ` Dave
2004-09-22 20:13 ` Jeremy Higdon [this message]
2004-09-23 22:28 ` Dave
2004-09-22 20:07 ` Jeremy Higdon
2004-09-29 22:19 ` Jeff Garzik
2004-09-29 22:32 ` Dave
2004-09-30 2:34 ` Jeremy Higdon
2004-09-30 3:28 ` Jeff Garzik
2004-09-30 4:05 ` Jeremy Higdon
2004-09-30 4:25 ` [PATCH 2.6.9-rc2] per-port LED control for sata_vsc Jeremy Higdon
2004-09-30 16:17 ` [PATCH] updates to Vitesse SATA driver Dave
2004-09-30 16:51 ` Dave
2004-09-30 3:32 ` Jeff Garzik
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=20040922201327.GD151463@sgi.com \
--to=jeremy@sgi.com \
--cc=dave.jiang@gmail.com \
--cc=jgarzik@pobox.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).