From: jmk@plan9.bell-labs.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] ATA next
Date: Thu, 22 Jan 2004 10:22:37 -0500 [thread overview]
Message-ID: <b16c5acf16741d91543edf849cfaccc9@plan9.bell-labs.com> (raw)
In-Reply-To: <20040122162315.D28365@cackle.proxima.alt.za>
On Thu Jan 22 09:24:40 EST 2004, lucio@proxima.alt.za wrote:
> ...
> Even more seriously (in my opinion) the IDE controller (ATA based,
> as this host has no PCI at all) is not recognised as DMA capable,
> so I get the dreaded:
> disabling dma: not on a busmastering controller
> message.
>
> I think jmk knows how to fix this. ...
Remove the lines which enable DMA in whichever rc script is run at
boot, e.g. you might have something like
for(disk in /dev/sd[C-F]*)
echo dma on >$disk/ctl
in the cpurc for that system.
The code in sdata.c/atawctl() could perhaps be a little smarter and
not allow dmactl to be set if ctlr->prdt is nil, then at least you'd get
an error when you tried to set dma on, not later when you actually
tried some data transfers. Something like
if(strcmp(cb->f[0], "dma") == 0){
if(cb->nf != 2 || drive->dma == 0)
error(Ebadctl);
if(strcmp(cb->f[1], "on") == 0){
ilock(ctlr);
if(ctlr->prdt)
drive->dmactl = drive->dma;
else
drive->dmactl = 0;
iunlock(ctlr);
if(drive->dmactl == 0)
error("not on a busmastering controller\n");
}
else if(strcmp(cb->f[1], "off") == 0)
drive->dmactl = 0;
else
error(Ebadctl);
}
although I've just jotted this down and not actually tried it.
next prev parent reply other threads:[~2004-01-22 15:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-22 14:23 Lucio De Re
2004-01-22 15:22 ` jmk [this message]
2004-01-22 18:19 ` Lucio De Re
2004-01-22 19:13 ` jmk
2004-01-23 5:19 ` Lucio De Re
2004-01-23 9:11 ` Charles Forsyth
2004-01-23 9:37 ` Lucio De Re
2004-01-23 16:38 ` jmk
2004-01-23 16:47 ` C H Forsyth
2004-01-22 15:53 ` David Presotto
2004-01-22 18:36 ` Lucio De Re
2004-01-22 19:53 ` David Presotto
2004-01-23 5:55 ` [9fans] imap4d operation (Was: ATA next) Lucio De Re
2004-01-23 16:39 ` David Presotto
2004-01-22 20:10 ` [9fans] ATA next David Presotto
2004-01-23 7:11 ` Lucio De Re
2004-01-23 9:00 ` Lucio De Re
2004-01-23 16:37 ` David Presotto
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=b16c5acf16741d91543edf849cfaccc9@plan9.bell-labs.com \
--to=jmk@plan9.bell-labs.com \
--cc=9fans@cse.psu.edu \
/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).