From: Benjamin Herrenschmidt <bh40@calva.net>
To: linuxppc-dev@lists.linuxppc.org
Cc: Paul Mackerras <paulus@cs.anu.edu.au>
Subject: Re: Small error?? in IDE dma processing?
Date: Thu, 17 Dec 1998 19:38:27 +0100 [thread overview]
Message-ID: <19981217193827.008878@mail.mipsys.com> (raw)
In-Reply-To: <9812159137.AA913779792@ccmail.ray.ca>
Hi Paul !
On the linux kernel mailing list, I've catched the following message :
On Tue, Dec 15, 1998, <jason.harp@mail.ray.ca> wrote:
> Can you confirm an error in the following code for dma_intr(): (2.0)
>
>
> dma_stat = inb(dma_base+2); /* get DMA status */
> outb(inb(dma_base)&~1, dma_base); /* stop DMA operation */
> stat = GET_STAT(); /* get drive status */
>
>
> Should this not be:
>
>
> outb(inb(dma_base)&~1, dma_base); /* stop DMA operation*/
> dma_stat = inb(dma_base+2); /* get DMA status */
> stat = GET_STAT(); /* get drive status */
>
>
> Similar for (2.1) the DMA status is retrieve before you stop the DMA
> operation.
The error was then confirmed I think by Andre M. Hedrick.
Then, I looked at our ide-dma.c and ide-pmac.c, and it looks like we have
the same kind of issue:
ide-pmac.c, line 301:
case ide_dma_end:
drive->waiting_for_dma = 0;
dstat = in_le32(&dma->status);
out_le32(&dma->control, ((RUN|WAKE|DEAD) << 16));
/* verify good DMA status */
return (dstat & ((RUN|DEAD|ACTIVE)) != RUN;
shouldn't we do the same split and reverse the status read and the
control write ?
--
E-Mail: <mailto:bh40@calva.net>
BenH. Web : <http://calvaweb.calvacom.fr/bh40/>
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]
parent reply other threads:[~1998-12-17 18:38 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <9812159137.AA913779792@ccmail.ray.ca>]
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=19981217193827.008878@mail.mipsys.com \
--to=bh40@calva.net \
--cc=linuxppc-dev@lists.linuxppc.org \
--cc=paulus@cs.anu.edu.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;
as well as URLs for NNTP newsgroup(s).