From owner-freebsd-current Tue Jan 26 11:39:23 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA19746 for freebsd-current-outgoing; Tue, 26 Jan 1999 11:39:23 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA19718; Tue, 26 Jan 1999 11:39:12 -0800 (PST) (envelope-from julian@whistle.com) Received: (from daemon@localhost) by alpo.whistle.com (8.8.5/8.8.5) id LAA22469; Tue, 26 Jan 1999 11:28:21 -0800 (PST) Received: from s204m82.isp.whistle.com(207.76.204.82) via SMTP by alpo.whistle.com, id smtpdF22465; Tue Jan 26 19:28:20 1999 Date: Tue, 26 Jan 1999 11:28:17 -0800 (PST) From: Julian Elischer X-Sender: julian@s204m82.isp.whistle.com To: S?ren Schmidt cc: Poul-Henning Kamp , current@FreeBSD.ORG Subject: Re: wd0: DMA failure, DMA status 0 In-Reply-To: <199901261317.OAA31728@freebsd.dk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG hmm I have a suspicion that this breaks the cyrix chip I hope we don't have a situation where no answer can run on both hardware! I'll get back to you as soon as I've tested it.. The cyrix chip causes the code to go into that clause regularly when it's interrupting and if I don't let it continue, it just hangs forever. the register hasn't yet had time to show the interrupt or something..... I'll work on it a bit more and try narrow it down. (I meant to spend more time on it but forgot) On Tue, 26 Jan 1999, S?ren Schmidt wrote: > It seems Poul-Henning Kamp wrote: > > > > > > Is "wd0: DMA failure, DMA status 0" something which needs looked at ? > > Blame Julian, he broke it in v 1.183 of wd.c, the following patch > works on all my HW, but I dont have the "cyrix" chipset Julian > made the patch for, to test it on (it also contains other small > corrections mostly from Bruce)... > > > Index: wd.c > =================================================================== > RCS file: /home/ncvs/src/sys/i386/isa/wd.c,v > retrieving revision 1.186 > diff -u -r1.186 wd.c > --- wd.c 1999/01/17 05:46:24 1.186 > +++ wd.c 1999/01/19 18:29:23 > @@ -1084,10 +1086,11 @@ > du = wddrives[dkunit(bp->b_dev)]; > > /* finish off DMA */ > - if (du->dk_flags & (DKFL_DMA|DKFL_USEDMA)) { > + if ((du->dk_flags & (DKFL_DMA|DKFL_SINGLE)) == DKFL_DMA) { > /* XXX SMP boxes sometimes generate an early intr. Why? */ > - if ((wddma[du->dk_interface].wdd_dmastatus(du->dk_dmacookie) & WDDS_INTERRUPT) > - != 0) > + if ((wddma[du->dk_interface].wdd_dmastatus(du->dk_dmacookie) & > + WDDS_INTERRUPT) == 0) > + return; > dmastat = wddma[du->dk_interface].wdd_dmadone(du->dk_dmacookie); > } > > @@ -1568,6 +1571,7 @@ > if (wdwait(du, 0, TIMEOUT) < 0) > return (1); > if( command == WDCC_FEATURES) { > + outb(wdc + wd_sdh, WDSD_IBM | (du->dk_unit << 4) | head); > outb(wdc + wd_features, count); > if ( count == WDFEA_SETXFER ) > outb(wdc + wd_seccnt, sector); > @@ -2289,9 +2293,8 @@ > { > int err = 0; > > - if ((du->dk_flags & (DKFL_DMA|DKFL_USEDMA)) && du->dk_dmacookie) > + if ((du->dk_flags & (DKFL_DMA|DKFL_SINGLE)) == DKFL_DMA) > wddma[du->dk_interface].wdd_dmadone(du->dk_dmacookie); > - > (void)wdwait(du, 0, TIMEOUT); > outb(du->dk_altport, WDCTL_IDS | WDCTL_RST); > DELAY(10 * 1000); > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message