Resent-Date: Wed, 12 May 1999 07:46:14 +0200 (MET DST)
Date: Wed, 12 May 1999 00:44:14 -0500
From: Chris Lawrence <quango@watervalley.net>
To: Linux/m68k Mailing List <linux-m68k@lists.linux-m68k.org>,
        Linux/APUS Mailing List <linux-apus@sunsite.auc.dk>
Subject: Misc diffs (relative to APUS 2.2.3pre1-19990504)
Mail-Followup-To: Linux/m68k Mailing List <linux-m68k@lists.linux-m68k.org>,
	Linux/APUS Mailing List <linux-apus@sunsite.auc.dk>
Organization: Kathie Lee's Sweatshops
X-Operating-System: Linux/ppc 2.2.3-pre1
Resent-From: linux-m68k@phil.uni-sb.de

The following diffs (post-sig), relative to Jesper's latest APUS
kernel, do the following:

1. Remove the fiddling with custom.intena in the A2091 and GVP II
   drivers (per discussion on Linux-m68k); Jes has done this in his
   sources but it should go into the next APUS kernel anyway.

2. Make the serial drivers compile... at least for me, including
   linux/serial.h didn't cut it.

3. (Not APUS-specific.) Make the GVP driver a bit smarter about
   allocating memory; if scsi_malloc() doesn't return a valid memory
   block for DMA, assume that it never will and stop trying to do so
   on subsequent accesses.  A similar change can probably be made to
   the A2091 driver (I didn't since I don't feel like pulling my GVP
   card and putting in my A2091... it's buried under some other crap
   around here anyway).

   I also took the liberty of removing the use_sg tests, as the sg
   bits in the structure are filled out by wd33c93.c whether or not we
   actually use scatter-gather.  Saves a couple of tests for each DMA.

   I'd like to use a permanent chip buffer eventually, but that's a
   project for another day... hopefully a day before my A4091 arrives
   (because that day I'll forget about this driver... ;-).

4. Don't ask (some of) the PCI questions if we don't have a PCI
   bus... at some point I should go through the config files and
   figure out some way to avoid a lot of the dumb questions that don't
   apply on APUS and/or m68k.


Chris
-- 
=============================================================================
|       Chris Lawrence       |   You have a computer.  Do you have Linux?   |
|  <quango@watervalley.net>  |     http://www.linux-m68k.org/index.html     |
|                            |                                              |
|   Amiga A4000 604e/233Mhz  |         Visit the Amiga Web Directory        |
|    with Linux/APUS 2.2.3   |        http://www.cucug.org/amiga.html       |
=============================================================================

diff -ruN --exclude-from=exclude-list linux-2.2.3pre1/arch/ppc/config.in linux/arch/ppc/config.in
--- linux-2.2.3pre1/arch/ppc/config.in	Tue May 11 04:33:29 1999
+++ linux/arch/ppc/config.in	Tue May 11 14:52:46 1999
@@ -53,12 +53,15 @@
   define_bool CONFIG_PCI y
 fi
 
-bool 'PCI quirks' CONFIG_PCI_QUIRKS
-if [ "$CONFIG_PCI_QUIRKS" = "y" ]; then
-  bool '   PCI bridge optimization' CONFIG_PCI_OPTIMIZE
+if [ "$CONFIG_PCI" = "y" ]; then
+  bool 'PCI quirks' CONFIG_PCI_QUIRKS
+  if [ "$CONFIG_PCI_QUIRKS" = "y" ]; then
+    bool '   PCI bridge optimization' CONFIG_PCI_OPTIMIZE
+  fi
+
+  bool 'Backward-compatible /proc/pci' CONFIG_PCI_OLD_PROC
 fi
 
-bool 'Backward-compatible /proc/pci' CONFIG_PCI_OLD_PROC
 bool 'Networking support' CONFIG_NET
 bool 'Sysctl support' CONFIG_SYSCTL
 bool 'System V IPC' CONFIG_SYSVIPC
diff -ruN --exclude-from=exclude-list linux-2.2.3pre1/drivers/char/amiga_ser.c linux/drivers/char/amiga_ser.c
--- linux-2.2.3pre1/drivers/char/amiga_ser.c	Tue May 11 04:30:45 1999
+++ linux/drivers/char/amiga_ser.c	Tue May 11 15:06:28 1999
@@ -35,7 +35,7 @@
 #include <linux/tty.h>
 #include <linux/termios.h>
 #include <linux/interrupt.h>
-#include <linux/serial.h>
+#include <asm-m68k/serial.h>
 #include <linux/linkage.h>
 
 #include <asm/setup.h>
diff -ruN --exclude-from=exclude-list linux-2.2.3pre1/drivers/char/m68kserial.c linux/drivers/char/m68kserial.c
--- linux-2.2.3pre1/drivers/char/m68kserial.c	Fri Feb  5 05:12:23 1999
+++ linux/drivers/char/m68kserial.c	Tue May 11 15:05:00 1999
@@ -64,7 +64,7 @@
 #include <linux/interrupt.h>
 #include <linux/tty.h>
 #include <linux/tty_flip.h>
-#include <linux/serial.h>
+#include <asm-m68k/serial.h>
 #include <linux/major.h>
 #include <linux/string.h>
 #include <linux/fcntl.h>
diff -ruN --exclude-from=exclude-list linux-2.2.3pre1/drivers/char/ser_ioext.c linux/drivers/char/ser_ioext.c
--- linux-2.2.3pre1/drivers/char/ser_ioext.c	Tue May 11 04:33:30 1999
+++ linux/drivers/char/ser_ioext.c	Tue May 11 15:06:51 1999
@@ -93,7 +93,7 @@
 #include <linux/malloc.h>
 #include <linux/termios.h>
 #include <linux/tty.h>
-#include <linux/serial.h>
+#include <asm-m68k/serial.h>
 #include <linux/netdevice.h>
 #include <linux/lp_m68k.h>
 #include <linux/16c552.h>
diff -ruN --exclude-from=exclude-list linux-2.2.3pre1/drivers/char/ser_mfc.c linux/drivers/char/ser_mfc.c
--- linux-2.2.3pre1/drivers/char/ser_mfc.c	Tue Mar 17 03:28:14 1998
+++ linux/drivers/char/ser_mfc.c	Tue May 11 15:08:11 1999
@@ -59,7 +59,7 @@
 #include <linux/tty.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
-#include <linux/serial.h>
+#include <asm-m68k/serial.h>
 
 #include <asm/setup.h>
 #include <asm/amigaints.h>
diff -ruN --exclude-from=exclude-list linux-2.2.3pre1/drivers/char/ser_whippet.c linux/drivers/char/ser_whippet.c
--- linux-2.2.3pre1/drivers/char/ser_whippet.c	Fri Feb  5 05:12:26 1999
+++ linux/drivers/char/ser_whippet.c	Tue May 11 15:07:08 1999
@@ -46,7 +46,7 @@
 #include <linux/malloc.h>
 #include <linux/termios.h>
 #include <linux/tty.h>
-#include <linux/serial.h>
+#include <asm-m68k/serial.h>
 
 #include <asm/io.h>
 #include <asm/setup.h>
diff -ruN --exclude-from=exclude-list linux-2.2.3pre1/drivers/scsi/a2091.c linux/drivers/scsi/a2091.c
--- linux-2.2.3pre1/drivers/scsi/a2091.c	Tue May 11 04:33:30 1999
+++ linux/drivers/scsi/a2091.c	Tue May 11 04:47:23 1999
@@ -43,13 +43,10 @@
 	if (!(status & (ISTR_INT_F|ISTR_INT_P)))
 	    continue;
 
-	if (status & ISTR_INTS)
-	{
-	    /* disable PORTS interrupt */
-	    custom.intena = IF_PORTS;
+	if (status & ISTR_INTS)	{
 	    wd33c93_intr (instance);
-	    /* enable PORTS interrupt */
-	    custom.intena = IF_SETCLR | IF_PORTS;
+        } else {
+            printk("Non-serviced A2091 SCSI-interrupt? ISTR = %02x\n", status);
 	}
     }
 }
diff -ruN --exclude-from=exclude-list linux-2.2.3pre1/drivers/scsi/gvp11.c linux/drivers/scsi/gvp11.c
--- linux-2.2.3pre1/drivers/scsi/gvp11.c	Tue May 11 04:33:30 1999
+++ linux/drivers/scsi/gvp11.c	Tue May 11 05:10:25 1999
@@ -44,11 +44,7 @@
 	if (!(status & GVP11_DMAC_INT_PENDING))
 	    continue;
 
-	/* disable PORTS interrupt */
-	custom.intena = IF_PORTS;
 	wd33c93_intr (instance);
-	/* enable PORTS interrupt */
-	custom.intena = IF_SETCLR | IF_PORTS;
     }
 }
 
@@ -64,18 +60,22 @@
     unsigned short cntr = GVP11_DMAC_INT_ENABLE;
     unsigned long addr = virt_to_bus(cmd->SCp.ptr);
     int bank_mask;
+    static int scsi_alloc_out_of_range = 0;
 
-    /* don't allow DMA if the physical address is bad */
+    /* use bounce buffer if the physical address is bad */
     if (addr & HDATA(cmd->host)->dma_xfer_mask ||
 	(!dir_in && mm_end_of_chunk (addr, cmd->SCp.this_residual)))
     {
 	HDATA(cmd->host)->dma_bounce_len = (cmd->SCp.this_residual + 511)
 	    & ~0x1ff;
-	HDATA(cmd->host)->dma_bounce_buffer =
-	    scsi_malloc (HDATA(cmd->host)->dma_bounce_len);
-	HDATA(cmd->host)->dma_buffer_pool = BUF_SCSI_ALLOCED;
-	
-	if (!HDATA(cmd->host)->dma_bounce_buffer) {
+
+ 	if( !scsi_alloc_out_of_range ) {
+	    HDATA(cmd->host)->dma_bounce_buffer =
+		scsi_malloc (HDATA(cmd->host)->dma_bounce_len);
+	    HDATA(cmd->host)->dma_buffer_pool = BUF_SCSI_ALLOCED;
+	}
+
+	if ( scsi_alloc_out_of_range || !HDATA(cmd->host)->dma_bounce_buffer) {
 	    HDATA(cmd->host)->dma_bounce_buffer =
 		amiga_chip_alloc(HDATA(cmd->host)->dma_bounce_len);
 
@@ -93,11 +93,13 @@
 
 	if (addr & HDATA(cmd->host)->dma_xfer_mask) {
 	    /* fall back to Chip RAM if address out of range */
-	    if( HDATA(cmd->host)->dma_buffer_pool == BUF_SCSI_ALLOCED)
+	    if( HDATA(cmd->host)->dma_buffer_pool == BUF_SCSI_ALLOCED) {
 		scsi_free (HDATA(cmd->host)->dma_bounce_buffer,
 			   HDATA(cmd->host)->dma_bounce_len);
-	    else
+		scsi_alloc_out_of_range = 1;
+	    } else {
 		amiga_chip_free (HDATA(cmd->host)->dma_bounce_buffer);
+            }
 		
 	    HDATA(cmd->host)->dma_bounce_buffer =
 		amiga_chip_alloc(HDATA(cmd->host)->dma_bounce_len);
@@ -114,12 +116,8 @@
 	    
 	if (!dir_in) {
 	    /* copy to bounce buffer for a write */
-	    if (cmd->use_sg)
-		memcpy (HDATA(cmd->host)->dma_bounce_buffer,
-				cmd->SCp.ptr, cmd->SCp.this_residual);
-	    else
-		memcpy (HDATA(cmd->host)->dma_bounce_buffer,
-			cmd->request_buffer, cmd->request_bufflen);
+	    memcpy (HDATA(cmd->host)->dma_bounce_buffer,
+		    cmd->SCp.ptr, cmd->SCp.this_residual);
 	}
     }
 
@@ -164,41 +162,19 @@
 
     /* copy from a bounce buffer, if necessary */
     if (status && HDATA(instance)->dma_bounce_buffer) {
-	if (SCpnt && SCpnt->use_sg) {
-#if 0
-	    panic ("scsi%d: incomplete s/g support",
-		   instance->host_no);
-#else
-	    if( HDATA(instance)->dma_dir )
-		memcpy (SCpnt->SCp.ptr, 
-			HDATA(instance)->dma_bounce_buffer,
-			SCpnt->SCp.this_residual);
-
-	    if (HDATA(instance)->dma_buffer_pool == BUF_SCSI_ALLOCED)
-		scsi_free (HDATA(instance)->dma_bounce_buffer,
-			    HDATA(instance)->dma_bounce_len);
-	    else
-		amiga_chip_free(HDATA(instance)->dma_bounce_buffer);
-
-	    HDATA(instance)->dma_bounce_buffer = NULL;
-	    HDATA(instance)->dma_bounce_len = 0;
-	    
-#endif
-	} else {
-	    if (HDATA(instance)->dma_dir && SCpnt)
-		memcpy (SCpnt->request_buffer,
-			HDATA(instance)->dma_bounce_buffer,
-			SCpnt->request_bufflen);
-
-	    if (HDATA(instance)->dma_buffer_pool == BUF_SCSI_ALLOCED)
-		scsi_free (HDATA(instance)->dma_bounce_buffer,
-			    HDATA(instance)->dma_bounce_len);
-	    else
-		amiga_chip_free(HDATA(instance)->dma_bounce_buffer);
-
-	    HDATA(instance)->dma_bounce_buffer = NULL;
-	    HDATA(instance)->dma_bounce_len = 0;
-	}
+	if (HDATA(instance)->dma_dir && SCpnt)
+	    memcpy (SCpnt->SCp.ptr, 
+		    HDATA(instance)->dma_bounce_buffer,
+		    SCpnt->SCp.this_residual);
+	
+	if (HDATA(instance)->dma_buffer_pool == BUF_SCSI_ALLOCED)
+	    scsi_free (HDATA(instance)->dma_bounce_buffer,
+		       HDATA(instance)->dma_bounce_len);
+	else
+	    amiga_chip_free(HDATA(instance)->dma_bounce_buffer);
+	
+	HDATA(instance)->dma_bounce_buffer = NULL;
+	HDATA(instance)->dma_bounce_len = 0;
     }
 }
 

From aeb25@dialog.rrz.Uni-Koeln.DE  Wed May 12 16:42:10 1999
Date: Wed, 12 May 1999 16:42:05 +0200 (MET DST)
From: Kerstin Hoef-Emden <aeb25@dialog.rrz.Uni-Koeln.DE>
To: Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
Subject: Re: Plattenproblem
In-Reply-To: <199905120854.KAA14757@faui22c.informatik.uni-erlangen.de>
X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by faui20.informatik.uni-erlangen.de id QAA11155


Hallo Roman,

On Wed, 12 May 1999, Roman Hodek wrote:

> > Mir ist klar, daß diese Platte am TT nicht bootfähig ist, weil sie
> > irgendeine Arbitrierung benötigt
> 
> Wenn sie wirklich nur mit Arbitierung arbeitet (was ich mir nicht so

Busarbitrierung kann man einstellen, sie lief allerdings auch ohne. Es gab
noch irgendetwas anderes. Die Platte erwartet zum Booten wohl eine
Rückmeldung vom Rechner und das kann der TT nicht.

> > Was ist da los?
> 
> Gute Frage... keine Ahnung :-( Sieht einfach so aus, als ob sich das
> dinstall recht bloed anstellt, frag' mich aber bitte nicht warum :-(

Hmm, irgendwelche Lösungsvorschläge? Das kann bei mir doch nicht der
erste Fall dieser Art sein! Solange das Installationsprogramm sich
weigert, die Partitionen als existent anzusehen, kann ich Debian nicht
installieren. Das ist eine absolut blöde Sackgasse!  Grmpff!!



Hat sich Ali eigentlich einmal gemeldet?


Tschüß,

Kerstin


-- 

	kerstin.hoef-emden@uni-koeln.de				 


