public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vojtech Pavlik <vojtech@suse.cz>
To: Alan Cox <alan@redhat.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Experimental IDE oops dumper v0.1
Date: Mon, 16 Sep 2002 21:52:55 +0200	[thread overview]
Message-ID: <20020916215255.A60197@ucw.cz> (raw)
In-Reply-To: <200209161218.g8GCI7301692@devserv.devel.redhat.com>; from alan@redhat.com on Mon, Sep 16, 2002 at 08:18:07AM -0400

On Mon, Sep 16, 2002 at 08:18:07AM -0400, Alan Cox wrote:
> > +	/* Pause (at least 400ns) in case we just issued a command */
> > +	oopser_usec(1);
> > +	for (i = 0; i < 1000; i++) {
> > +		b = inb(HD_STATUS);
> > +		if (!(b & BUSY_STAT)) {
> > +			if (b & ERR_STAT) return 0;
> > +			if (b & flag) return 1;
> > +		}
> > +		oopser_usec(1000);
> 
> This will stop working on SATA when VDMA goes into newer controllers btw.

I think VDMA is an extra feature, the old PIO will still remain - it has
to, for other register accesses, and the data port is not much
different.

> Be careful here - one or two drives get nIEN backwards, you might just
> want to turn off interrupts and be done with it
> 
> > +	oopser_usec(1); /* 400ns according to spec */
> > +	outb(0x0a, HD_CMD);
> 
> You really need to reset and reprogram/retune the controller as well.

No. The controller is always tuned for both PIO and DMA. This is a must
- not all commands are DMA (eg IDENTIFY) and for for example ATAPI some
data is sent over PIO and some over DMA even for a single command. So
using PIO when the drive is switched to DMA is perfectly OK.

> I like the infrastructure but the IDE dumper code is wishful thinking
> in one or two spots. You don't know if the controller is in DMA modes,
> tuned for different things to the drives or legacy free.

Legacy free? That is wishful thinking. Not going to happen any soon.
Unfortunately. As for DMA vs PIO, see above.

> Im not sure what
> to do for legacy free cases but the other bits like LBA48 and retuning
> probably can be handled with some small chipset specific hooks

Retuning not needed, LBA48 might be needed. Not sure about LBA48 in PIO
mode, it might work even without chipset support - it's usually the
LBA48+DMA combination that confuses the chips.

-- 
Vojtech Pavlik
SuSE Labs

  parent reply	other threads:[~2002-09-16 19:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-16 11:52 [PATCH] Experimental IDE oops dumper v0.1 Rusty Russell
2002-09-16 12:18 ` Alan Cox
2002-09-16 12:39   ` jbradford
2002-09-16  9:43     ` Rob Landley
2002-09-16 15:14       ` jbradford
2002-09-16 19:55       ` Vojtech Pavlik
2002-09-16 19:52   ` Vojtech Pavlik [this message]
2002-09-16 22:22     ` Alan Cox
2002-09-17  0:49   ` Rusty Russell
2002-09-17  7:42     ` Andre Hedrick
2002-09-17  9:57       ` Alan Cox
2002-09-18  4:19       ` Rusty Russell
2002-09-18  6:00         ` Andre Hedrick

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=20020916215255.A60197@ucw.cz \
    --to=vojtech@suse.cz \
    --cc=alan@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /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