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 majord...@freebsd.org
> with "unsubscribe freebsd-current" in the body of the message
> 


To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message

Reply via email to