Subject: SCSI again...
To: None <port-mac68k@NetBSD.ORG>
From: Allen Briggs <briggs@puma.bevd.blacksburg.va.us>
List: port-mac68k
Date: 09/02/1995 01:50:50
Last call tonight before the crons hit...  I'm running with the new
scsi driver on puma now and it seems stable with the pounding I've been
doing on it.  YMMV, though.  The one from last night was just plain
wrong in a couple of ways, but it worked.  This one is more correct
and appears to work, too.

If you want to play with these matches, make sure that you have at least
version 1.3 of mac68k5380.c.  Make sure that you have at least version
1.6 of atari/dev/ncr5380.c.  The following patch must be applied to
ncr5380.c v. 1.6 for mac68k5380.c v. 1.3 to work.  If you do play with
this, please let me know how it goes.  I'm off to fight other fires.  :-)

-allen

Index: ncr5380.c
===================================================================
RCS file: /a/cvsroot/src/sys/arch/atari/dev/ncr5380.c,v
retrieving revision 1.6
diff -c -r1.6 ncr5380.c
*** ncr5380.c	1995/08/19 12:36:26	1.6
--- ncr5380.c	1995/09/02 05:50:58
***************
*** 576,582 ****
  #ifdef REAL_DMA
  			else dma_ready();
  #else
! 			else panic("Got DMA interrupt without DMA");
  #endif
  			scsi_clr_ipend();
  			goto connected;
--- 576,586 ----
  #ifdef REAL_DMA
  			else dma_ready();
  #else
! 			else {
! 				if (scsi_main_irq())
! 					goto connected;
! 				panic("Got DMA interrupt without DMA");
! 			}
  #endif
  			scsi_clr_ipend();
  			goto connected;
***************
*** 642,647 ****
--- 646,653 ----
  				return;
  			    }
  #else
+ 			    if (scsi_main_irq())
+ 				return;
  			    panic("Got DMA interrupt without DMA\n");
  #endif
  			}
***************
*** 956,962 ****
  			PID("info_transf3");
  			len = reqp->xdata_len;
  #ifdef USE_PDMA
! 			transfer_pdma(&phase, reqp->xdata_ptr, &len);
  #else
  			transfer_pio(&phase, reqp->xdata_ptr, &len);
  #endif
--- 962,969 ----
  			PID("info_transf3");
  			len = reqp->xdata_len;
  #ifdef USE_PDMA
! 			if (transfer_pdma(&phase, reqp->xdata_ptr, &len) == 0)
! 				return 0;
  #else
  			transfer_pio(&phase, reqp->xdata_ptr, &len);
  #endif