Date: Mon, 31 Mar 1997 12:45:36 -0800 (PST)
From: Michael Schmitz <SCHMITZ@LCBVAX.CCHEM.BERKELEY.EDU>
To: linux-m68k@phil.uni-sb.de
Subject: L68K: patch to make pure PIO mode work again on the atari SCSI driver
Sender: owner-linux-m68k@phil.uni-sb.de
Reply-To: linux-m68k@phil.uni-sb.de

Hi,

the subject says it: some recent changes to the atari SCSI driver failed to 
be surrounded by #ifdef REAL_DMA statements.

The following patch (should apply to both 2.0.29 and 2.1.29 without changes) 
makes pure PIO mode SCSI transfers work again (on the Falcon, at least). 
If you want to see REAL SLOW disk I/O, give it a shot :-)

Why this is needed?? The atari driver is being used as basis for a mac SCSI 
driver port, and most macs don't have a SCSI DMA. 

Question for Roman: When did you clean up the atari driver, removing the pseudo
DMA code among other stuff?? And was that code ever used?? I guess pseudo DMA
is the only thing that might make the mac SCSI disks usable ...

	Michael

--- drivers/scsi/atari_scsi.c.release	Mon Mar 31 03:02:56 1997
+++ drivers/scsi/atari_scsi.c	Mon Mar 31 03:18:40 1997
@@ -671,6 +673,7 @@
 	 * STRAM_BUFFER_SIZE byte dribble buffer for transfers from/to alternative
 	 * Ram.
 	 */
+#ifdef REAL_DMA
 	if (MACH_IS_ATARI && ATARIHW_PRESENT(ST_SCSI) &&
 	    !ATARIHW_PRESENT(EXTD_DMA) && m68k_num_memory > 1) {
 		atari_dma_buffer = scsi_init_malloc(STRAM_BUFFER_SIZE,
@@ -678,6 +681,7 @@
 		atari_dma_phys_buffer = VTOP( atari_dma_buffer );
 		atari_dma_orig_addr = 0;
 	}
+#endif
 
 	instance = scsi_register (host, sizeof (struct NCR5380_hostdata));
 	atari_scsi_host = instance;
@@ -715,6 +719,7 @@
 		atari_dma_residual = 0;
 #endif /* REAL_DMA */
 
+#ifdef REAL_DMA
 		if (is_medusa) {
 			/* While the read overruns (described by Drew Eckhardt in
 			 * NCR5380.c) never happened on TTs, they do in fact on the Medusa
@@ -730,6 +735,7 @@
 			 */
 			atari_read_overruns = 4;
 		}
+#endif
 		
 	}
 	else { /* ! IS_A_TT */


