Date: Mon, 25 Jan 1999 12:40:32 +0100 (CET) From: Søren Schmidt <sos@freebsd.dk> To: kpielorz@tdx.co.uk (Karl Pielorz) Cc: current@FreeBSD.ORG Subject: Re: IDE DMA problems? (4.0-current as of 01/24/99 ~01:10) Message-ID: <199901251140.MAA28486@freebsd.dk> In-Reply-To: <36AC5551.F9E99D45@tdx.co.uk> from Karl Pielorz at "Jan 25, 1999 11:28:17 am"
next in thread | previous in thread | raw e-mail | index | archive | help
It seems Karl Pielorz wrote: This is due to Julians commit in 1.183 (IIRC) of wd.c, its bogus :( The following patchh cures the mess, and fixes a couble of other nits as well: -Søren 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); > Hi, > > Just finsihed upgrading to 4.0-Current, and both my machines now come up with: > > wd0: DMA failure, DMA status 0 > wd0: DMA failure, DMA status 0 > wd2: DMA failure, DMA status 0 > wd2: DMA failure, DMA status 0 > wd1: DMA failure, DMA status 0 > wd3: DMA failure, DMA status 0 > wd3: DMA failure, DMA status 0 > wd1: DMA failure, DMA status 0 > wd1: DMA failure, DMA status 0 > > (basically that error for all IDE drives installed). > > Both motherboards are P-Pro's (ones a dual, ones a single) - using Intel 440FX > chipset's... > > DMesg shows: > > wdc0 at 0x1f0-0x1f7 irq 14 flags 0x20002000 on isa > wdc0: unit 0 (wd0): <QUANTUM FIREBALL SE4.3A>, DMA > wd0: 4110MB (8418816 sectors), 14848 cyls, 9 heads, 63 S/T, 512 B/S > wdc0: unit 1 (wd1): <QUANTUM FIREBALL ST2.1A>, DMA > wd1: 2014MB (4124736 sectors), 4092 cyls, 16 heads, 63 S/T, 512 B/S > wdc1 at 0x170-0x177 irq 15 flags 0x20002000 on isa > wdc1: unit 0 (wd2): <QUANTUM FIREBALL SE4.3A>, DMA > wd2: 4110MB (8418816 sectors), 14848 cyls, 9 heads, 63 S/T, 512 B/S > wdc1: unit 1 (wd3): <QUANTUM SIROCCO2550A>, DMA > wd3: 2445MB (5008752 sectors), 4969 cyls, 16 heads, 63 S/T, 512 B/S > > > I never got these 'failures' before... (They keep popping up on the console as > well :-( > > Can they be ignored? Can they be fixed? :) - The drives appear to work OK... > The more the drives get access, the more messages I get (I guess > understandably)... > > -Kp > > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901251140.MAA28486>