diff -r2cN linux-005.1/MakeVars my-linux/MakeVars
*** linux-005.1/MakeVars	Tue Sep 14 11:58:30 1993
--- my-linux/MakeVars	Fri Oct 22 12:38:56 1993
***************
*** 14,20 ****
  LD		 = $(CC) -nostdlib
  GCCHDRS 	 = /gcc/include
! KERNELHDRS	 = /dev/linux-005.1/include
  INCFLAGS	 = -nostdinc -I$(KERNELHDRS) -I$(GCCHDRS)
! CFLAGS		 = -Wall $(INCFLAGS) -O2 -Wstrict-prototypes -fno-builtin
  HOSTINCFLAGS	 = -Dlinux -I$(GCCHDRS) -I$(KERNELHDRS)
  HOSTFLAGS	 = -O2 -m68020 -Wall $(HOSTINCFLAGS)
--- 14,20 ----
  LD		 = $(CC) -nostdlib
  GCCHDRS 	 = /gcc/include
! KERNELHDRS	 = /linux/include
  INCFLAGS	 = -nostdinc -I$(KERNELHDRS) -I$(GCCHDRS)
! CFLAGS		 = -Wall $(INCFLAGS) -O2 -Wstrict-prototypes -fno-builtin -m68020 -fomit-frame-pointer
  HOSTINCFLAGS	 = -Dlinux -I$(GCCHDRS) -I$(KERNELHDRS)
  HOSTFLAGS	 = -O2 -m68020 -Wall $(HOSTINCFLAGS)
diff -r2cN linux-005.1/Makefile my-linux/Makefile
*** linux-005.1/Makefile	Fri Sep 10 07:09:00 1993
--- my-linux/Makefile	Mon Oct 25 02:09:27 1993
***************
*** 67,72 ****
  ifdef CONFIG_AMIGA
  BOOTOBJS	 = tools/amiga/bootstrap.o tools/amiga/get_nlist.o
! ARCHIVES	 += amiga/amiga.o
! SUBDIRS 	 += amiga
  endif
  
--- 67,72 ----
  ifdef CONFIG_AMIGA
  BOOTOBJS	 = tools/amiga/bootstrap.o tools/amiga/get_nlist.o
! ARCHIVES	 = kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o arch/arch.o amiga/amiga.o
! SUBDIRS 	 = kernel lib mm fs ipc arch amiga
  endif
  
diff -r2cN linux-005.1/config.in my-linux/config.in
*** linux-005.1/config.in	Tue Aug 31 11:18:55 1993
--- my-linux/config.in	Fri Oct 22 17:18:39 1993
***************
*** 35,41 ****
  .
  A3000 WD33C93A support
! CONFIG_A3000_SCSI y/n y
  A2091 WD33C93A support
! CONFIG_A2091_SCSI y/n y
  .
  Filesystems
--- 35,43 ----
  .
  A3000 WD33C93A support
! CONFIG_A3000_SCSI y/n n
  A2091 WD33C93A support
! CONFIG_A2091_SCSI y/n n
! GVP Series II WD33C93A support
! CONFIG_GVP11_SCSI y/n y
  .
  Filesystems
diff -r2cN linux-005.1/config.new my-linux/config.new
*** linux-005.1/config.new	Tue Sep 14 11:57:45 1993
--- my-linux/config.new	Sat Oct 30 16:17:00 1993
***************
*** 35,41 ****
  .
  A3000 WD33C93A support
! CONFIG_A3000_SCSI y/n y
  A2091 WD33C93A support
! CONFIG_A2091_SCSI y/n y
  .
  Filesystems
--- 35,43 ----
  .
  A3000 WD33C93A support
! CONFIG_A3000_SCSI y/n n
  A2091 WD33C93A support
! CONFIG_A2091_SCSI y/n n
! GVP Series II WD33C93A support
! CONFIG_GVP11_SCSI y/n y
  .
  Filesystems
diff -r2cN linux-005.1/fs/exec.c my-linux/fs/exec.c
*** linux-005.1/fs/exec.c	Sat Aug  7 06:31:12 1993
--- my-linux/fs/exec.c	Mon Oct 25 04:35:50 1993
***************
*** 571,574 ****
--- 571,575 ----
  	inode->i_size < ex.a_text+ex.a_data+ex.a_syms+N_TXTOFF(ex)) {
  	retval = -ENOEXEC;
+ #if 0 /* RB */
  	printk ("!ZMAGIC (%x) || relocs || badsize\n", N_MAGIC(ex));
  	printk ("i_size = %ld\n", inode->i_size);
***************
*** 575,582 ****
--- 576,586 ----
  	printk ("ts = %ld, ds = %ld, ss= %ld, TOFF = %ld\n",
  		 ex.a_text, ex.a_data, ex.a_syms, N_TXTOFF(ex));
+ #endif
  	goto exec_error2;
      }
      if (N_TXTOFF(ex) != BLOCK_SIZE && N_MAGIC(ex) != OMAGIC) {
+ #if 0 /* RB */
  	printk("VFS: N_TXTOFF != BLOCK_SIZE. See a.out.h.");
+ #endif
  	retval = -ENOEXEC;
  	goto exec_error2;
diff -r2cN linux-005.1/kernel/blk_drv/scsi/Makefile my-linux/kernel/blk_drv/scsi/Makefile
*** linux-005.1/kernel/blk_drv/scsi/Makefile	Thu Aug 12 12:13:37 1993
--- my-linux/kernel/blk_drv/scsi/Makefile	Sat Oct 23 17:23:57 1993
***************
*** 2,5 ****
--- 2,6 ----
  #
  # Copyright 1993 by Hamish Macdonald
+ # Modified for GVP support by Ralf B?chle
  #
  # This file is subject to the terms and conditions of the GNU General Public
***************
*** 10,14 ****
  include ../../../.config
  
! #CFLAGS += -DDEBUG -DWDEBUG
  
  SCSI_HOSTS := 0
--- 11,15 ----
  include ../../../.config
  
! #CFLAGS := $(CFLAGS) -DDEBUG -DWDEBUG
  
  SCSI_HOSTS := 0
***************
*** 40,43 ****
--- 41,49 ----
  endif
  
+ ifdef CONFIG_GVP11_SCSI
+ SCSI_OBJS := $(SCSI_OBJS) gvp11_scsi.o
+ SCSI_HOSTS := 1+$(SCSI_HOSTS)
+ endif
+ 
  ifdef CONFIG_A3000_SCSI
  SCSI_OBJS := $(SCSI_OBJS) wd33c93.o
***************
*** 46,50 ****
  SCSI_OBJS := $(SCSI_OBJS) wd33c93.o
  else
! ifdef CONFIG_GVPII_SCSI
  SCSI_OBJS := $(SCSI_OBJS) wd33c93.o
  endif
--- 52,56 ----
  SCSI_OBJS := $(SCSI_OBJS) wd33c93.o
  else
! ifdef CONFIG_GVP11_SCSI
  SCSI_OBJS := $(SCSI_OBJS) wd33c93.o
  endif
diff -r2cN linux-005.1/kernel/blk_drv/scsi/gvp11_scsi.c my-linux/kernel/blk_drv/scsi/gvp11_scsi.c
*** linux-005.1/kernel/blk_drv/scsi/gvp11_scsi.c
--- my-linux/kernel/blk_drv/scsi/gvp11_scsi.c	Sat Oct 30 16:13:04 1993
***************
*** 0 ****
--- 1,558 ----
+ /*
+  * Copyright (c) 1982, 1990 The Regents of the University of California.
+  * All rights reserved.
+  *
+  * Redistribution and use in source and binary forms, with or without
+  * modification, are permitted provided that the following conditions
+  * are met:
+  * 1. Redistributions of source code must retain the above copyright
+  *    notice, this list of conditions and the following disclaimer.
+  * 2. Redistributions in binary form must reproduce the above copyright
+  *    notice, this list of conditions and the following disclaimer in the
+  *    documentation and/or other materials provided with the distribution.
+  * 3. All advertising materials mentioning features or use of this software
+  *    must display the following acknowledgement:
+  *	This product includes software developed by the University of
+  *	California, Berkeley and its contributors.
+  * 4. Neither the name of the University nor the names of its contributors
+  *    may be used to endorse or promote products derived from this software
+  *    without specific prior written permission.
+  *
+  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+  * SUCH DAMAGE.
+  *
+  *	@(#)dma.c
+  */
+ 
+ /*
+  * GVP Series II DMA driver, based on A3000 DMA driver.
+  * Changes by Ralf B?chle.
+  */
+ 
+ #include <linux/config.h>
+ 
+ #ifdef CONFIG_GVP11_SCSI
+ 
+ #include <linux/types.h>
+ #include <linux/sched.h>
+ #include <linux/kernel.h>
+ #include <linux/timer.h>
+ 
+ #include "../blk.h"
+ #include "scsi.h"
+ #include "gvp11_scsi.h"
+ #include "wd33c93dma.h"
+ #include "wd33c93reg.h"
+ #include "gvp11dmareg.h"
+ 
+ #include <linux/interrupt.h>
+ #include <amiga/interrupt.h>
+ 
+ #define printf printk
+ 
+ static int dmareq (Scsi_Cmnd *SCpnt);
+ static void dmafree (Scsi_Cmnd *SCpnt);
+ static int dmago (int unit, char *addr, int count, int flags);
+ static int dmanext (int unit);
+ static void dmastop (int unit);
+ static void dmaintr (struct intframe *fp, void *data);
+ 
+ /*
+  * The largest single request will be MAXPHYS bytes which will require
+  * at most MAXPHYS/NBPG+1 chain elements to describe, i.e. if none of
+  * the buffer pages are physically contiguous (MAXPHYS/NBPG) and the
+  * buffer is not page aligned (+1).
+  */
+ #ifndef MAXPHYS
+ #define MAXPHYS 1024*8
+ #endif
+ #ifndef NBPG
+ #define NBPG PAGE_SIZE
+ #define PGOFSET 0xfff
+ #endif
+ 
+ #define DMAMAXIO	(MAXPHYS/NBPG+1)
+ 
+ struct	dma_chain {
+ 	int	dc_count;
+ 	char	*dc_addr;
+ };
+ 
+ static struct	dma_softc {
+ 	volatile struct sdmac *sc_hwaddr;
+ 	char	sc_dmaflags;
+ 	u_short sc_cmd;
+ 	struct	dma_chain *sc_cur;
+ 	struct	dma_chain *sc_last;
+ 	struct	dma_chain sc_chain[DMAMAXIO];
+ } dma_softc;
+ 
+ #define DMAF_NOINTR	0x01
+ 
+ static Scsi_Cmnd dmachan;
+ 
+ /* because keybord and dma share same interrupt priority... */
+ static int dma_initialized = 0;
+ /* if not in int-mode, don't pay attention for possible scsi interrupts */
+ static int scsi_int_mode;
+ 
+ #ifdef DEBUG
+ #define DDB_FOLLOW	0x04
+ #define DDB_IO		0x08
+ static int	dmadebug = DDB_FOLLOW | DDB_IO;
+ 
+ static void dmatimeout (unsigned long);
+ static struct timer_list dmatimer;
+ 
+ static int	dmatimo;
+ 
+ static long	dmahits;
+ static long	dmamisses;
+ #if 0 /* XXX */
+ static long	dmabyte;
+ static long	dmaword;
+ static long	dmalword;
+ #endif
+ #endif
+ 
+ static int gvp11_host_nr;
+ 
+ void gvp11dmainit (int host_nr, caddr_t address, dmareq_t *dreq,
+ 		   dmafree_t *dfree, dmago_t *dgo, dmanext_t *dnext,
+ 		   dmastop_t *dstop)
+ {
+   register volatile struct sdmac *dma;
+   register int i;
+ 
+   gvp11_host_nr = host_nr;
+ 
+   dma = (struct sdmac *) address;
+ 
+   /* make sure interrupts are disabled while we later on reset the scsi-chip */
+   dma->secret2 = 1;
+   dma->secret1 = 0;
+   dma->secret3 = 15;
+   while (dma->control & GVP11_DMAC_BUSY) ;
+   dma->control &= ~GVP11_DMAC_INT_ENABLE;
+ 
+   dma_softc.sc_dmaflags = 0;
+   dma_softc.sc_cmd = 0;
+   dma_softc.sc_hwaddr = dma;
+   i = host_nr;
+   dmachan.prev = dmachan.next = &dmachan;
+ #ifdef DEBUG
+   /* make sure timeout is really not needed */
+   dmatimer.expires = 30 * HZ;
+   dmatimer.function = dmatimeout;
+   dmatimer.data = 0;
+   add_timer (&dmatimer);
+ #endif
+ 
+   *dreq  = dmareq;
+   *dfree = dmafree;
+   *dgo	 = dmago;
+   *dnext = dmanext;
+   *dstop = dmastop;
+ 
+   printf("dma%d: GVP Series II DMA\n", i);
+ 
+   dma_initialized = 1;
+ 
+   /* setup interrupt handler */
+   add_isr (IRQ_AMIGA_PORTS, dmaintr, 0, NULL);
+ }
+ 
+ const char *gvp11_scsi_info (void)
+ {
+ 	static char buffer[256];
+ 
+ 	sprintf (buffer, "scsi%d : GVP Series II SCSI\n", gvp11_host_nr);
+ 
+ 	return buffer;
+ }
+ 
+ int gvp11_scsi_queuecommand (Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
+ {
+ 	int xferphase;
+ 	int result;
+ 
+ 	SCpnt->scsi_done = done;
+ 
+ 	switch (SCpnt->cmnd[0]) {
+ 	    case CMD_TEST_UNIT_READY:
+ 		xferphase = STATUS_PHASE;
+ 		break;
+ 	    case CMD_WRITE:
+ 		xferphase = DATA_OUT_PHASE;
+ 		break;
+ 	    default:
+ 		xferphase = DATA_IN_PHASE;
+ 	}
+ 
+ 	switch (SCpnt->cmnd[0]) {
+ 	    case CMD_TEST_UNIT_READY:
+ 	    case CMD_INQUIRY:
+ 	    case CMD_READ_CAPACITY:
+ 	    case CMD_REQUEST_SENSE:
+ 		SCpnt->result = scsi_immed_command(SCpnt->host, SCpnt->target,
+ 						   SCpnt->lun, SCpnt->cmnd,
+ 						   SCpnt->request_buffer,
+ 						   SCpnt->request_bufflen,
+ 						   xferphase);
+ 		(SCpnt->scsi_done)(SCpnt);
+ 		break;
+ 	    default:
+ 		result = wd33c93go (SCpnt->host, SCpnt->target, SCpnt->lun,
+ 				    SCpnt);
+ 		if (result)
+ 			(SCpnt->scsi_done)(SCpnt);
+ 		break;
+ 	}
+ 
+        return 0;
+ }
+ 
+ 
+ int gvp11_scsi_command (Scsi_Cmnd *SCpnt)
+ {
+ 	int xferphase;
+ 	int result;
+ 
+ 	switch (SCpnt->cmnd[0]) {
+ 	    case CMD_TEST_UNIT_READY:
+ 		xferphase = STATUS_PHASE;
+ 		break;
+ 	    case CMD_WRITE:
+ 		xferphase = DATA_OUT_PHASE;
+ 		break;
+ 	    default:
+ 		xferphase = DATA_IN_PHASE;
+ 	}
+ 
+ 	result = scsi_immed_command(SCpnt->host, SCpnt->target, SCpnt->lun,
+ 				    SCpnt->cmnd, SCpnt->request_buffer,
+ 				    SCpnt->request_bufflen, xferphase);
+ 
+ 	return result;
+ }
+ 
+ int gvp11_scsi_abort (Scsi_Cmnd *SCpnt, int code)
+ {
+ 	if (code == 0)
+ 		SCpnt->result = DID_ABORT;
+ 	else
+ 		SCpnt->result = DID_TIME_OUT;
+ 
+ 	wd33c93abort (SCpnt);
+ 
+ 	return 0;
+ }
+ 
+ int gvp11_scsi_reset (void)
+ {
+ 	wd33c93reset (gvp11_host_nr);
+ 
+ 	return 0;
+ }
+ 
+ #ifdef CONFIG_BLK_DEV_SD
+ #include "sd.h"
+ #include "scsi_ioctl.h"
+ 
+ extern int scsi_ioctl (Scsi_Device *dev, int cmd, void *arg);
+ 
+ int gvp11_scsi_biosparam (int size, int dev, int *info)
+ {
+ 	return -1;
+ }
+ #endif /* CONFIG_BLK_DEV_SD */
+ 
+ static int
+ dmareq(Scsi_Cmnd *SCpnt)
+ {
+   unsigned long flags;
+ 
+   save_flags (flags);
+   cli ();
+ 
+   if (dmachan.next == &dmachan)
+     {
+       dmachan.next = dmachan.prev = SCpnt;
+       restore_flags (flags);
+       return 1;
+     }
+ 
+   dmachan.next->prev->next = SCpnt;
+   SCpnt->prev = dmachan.next;
+   dmachan.next = SCpnt;
+ 
+   restore_flags (flags);
+   return(0);
+ }
+ 
+ static void
+ dmafree(Scsi_Cmnd *SCpnt)
+ {
+   register Scsi_Cmnd *SCp;
+   unsigned long flags;
+ 
+   save_flags (flags);
+   cli ();
+ 
+ #ifdef DEBUG
+   dmatimo = 0;
+ #endif
+   if (dma_softc.sc_cmd)
+     {
+       dma_softc.sc_hwaddr->stop_DMA = 1;	/* stop dma                 */
+       dma_softc.sc_cmd = 0;
+     }
+   dma_softc.sc_hwaddr->control &= ~GVP11_DMAC_INT_ENABLE;	/* disable interrupts from dma/scsi */
+   scsi_int_mode = 0;
+ 
+ #if 0 /* XXX */
+   SCpnt->prev->next = SCpnt->next;
+   SCpnt->next->prev = SCpnt->prev;
+ #endif
+ 
+   for (SCp = dmachan.next;
+        SCp != &dmachan;
+        SCp = SCp->next)
+     {
+       if (SCp->host == gvp11_host_nr)
+ 	{
+ 	  SCp->prev->next = SCp->next;
+ 	  SCp->next->prev = SCp->prev;
+ #if 0 /* XXX */
+ 	  insque ((caddr_t) dn, (caddr_t) dq->dq_back);
+ #endif
+ 	  restore_flags (flags);
+ #if 0 /* XXX */
+ 	  (dn->dq_driver->d_start)(unit);
+ #endif
+ 	  return;
+ 	}
+     }
+ 
+   restore_flags (flags);
+ }
+ 
+ static int
+ dmago(unit, addr, count, flags)
+ 	int unit;
+ 	register char *addr;
+ 	register int count;
+ 	register int flags;
+ {
+   register struct dma_chain *dcp;
+   register char *dmaend = NULL;
+   register int tcount;
+ 
+   if (count > MAXPHYS)
+      panic("dmago: count > MAXPHYS");
+ #ifdef DEBUG
+   if (dmadebug & DDB_FOLLOW)
+      printf("dmago(%d, %x, %x, %x)\n", unit, addr, count, flags);
+ #endif
+   /*
+    * Build the DMA chain
+    */
+   for (dcp = dma_softc.sc_chain; count > 0; dcp++)
+     {
+ #ifdef DEBUG
+ #if 0 /* XXX */
+       if (! pmap_extract(pmap_kernel(), (vm_offset_t)addr))
+ 	panic ("dmago: no physical page for address!");
+ #endif
+ #endif
+ 
+       dcp->dc_addr = (char *) VTOP(addr);
+       if (count < (tcount = NBPG - ((int)addr & PGOFSET)))
+ 	tcount = count;
+       dcp->dc_count = tcount;
+       addr += tcount;
+       count -= tcount;
+       tcount >>= 1;	/* number of words (the sdmac wants 16bit values here) */
+       if (dcp->dc_addr == dmaend)
+ 	{
+ #ifdef DEBUG
+ 	  dmahits++;
+ #endif
+ 	  dmaend += dcp->dc_count;
+ 	  (--dcp)->dc_count += tcount;
+ 	}
+       else
+ 	{
+ #ifdef DEBUG
+ 	  dmamisses++;
+ #endif
+ 	  dmaend = dcp->dc_addr + dcp->dc_count;
+ 	  dcp->dc_count = tcount;
+ 	}
+     }
+ 
+   dma_softc.sc_cur = dma_softc.sc_chain;
+   dma_softc.sc_last = --dcp;
+   dma_softc.sc_dmaflags = 0;
+   /*
+    * Set up the command word based on flags
+    */
+   dma_softc.sc_cmd = GVP11_DMAC_INT_ENABLE;
+   if ((flags & DMAGO_READ) == 0)
+     dma_softc.sc_cmd |= GVP11_DMAC_DIR_WRITE;
+ #ifdef DEBUG
+   if (dmadebug & DDB_IO)
+     {
+       printf("dmago: cmd %x, flags %x\n",
+ 	     dma_softc.sc_cmd, dma_softc.sc_dmaflags);
+       for (dcp = dma_softc.sc_chain; dcp <= dma_softc.sc_last; dcp++)
+ 	printf("  %d: %d@%x\n", dcp-dma_softc.sc_chain,
+ 	       dcp->dc_count, dcp->dc_addr);
+     }
+   dmatimo = 1;
+ #endif
+ 
+   dma_softc.sc_hwaddr->control = dma_softc.sc_cmd;
+   scsi_int_mode = 1;
+   dma_softc.sc_hwaddr->DMA_address = (u_int) dma_softc.sc_cur->dc_addr;
+   dma_softc.sc_hwaddr->start_DMA = 1;
+ 
+   return dma_softc.sc_cur->dc_count << 1;
+ }
+ 
+ static void
+ dmastop(unit)
+      register int unit;
+ {
+   Scsi_Cmnd *SCp;
+   unsigned long flags;
+ 
+ #ifdef DEBUG
+   if (dmadebug & DDB_FOLLOW)
+     printf("dmastop()\n");
+   dmatimo = 0;
+ #endif
+   if (dma_softc.sc_cmd)
+     {
+       save_flags (flags);
+       cli ();
+       dma_softc.sc_hwaddr->stop_DMA = 1;	/* stop dma */
+       dma_softc.sc_cmd = 0;
+       restore_flags (flags);
+     }
+ 
+   /*
+    * We may get this interrupt after a device service routine
+    * has freed the dma channel.  So, ignore the intr if there's
+    * nothing on the queue.
+    */
+   SCp = dmachan.next;
+   if (SCp != &dmachan) {
+     SCp->result = DID_ERROR << 16;
+     (SCp->scsi_done)(SCp);
+   }
+ }
+ 
+ static void dmaintr (struct intframe *fp, void *data)
+ {
+   unsigned int stat;
+   int found = 0;
+   static int recurse = 0;
+ 
+   if (! dma_initialized)
+     return;
+ 
+   ++recurse;
+   if (recurse > 1) {
+     printk ("gvp11dmaintr: recursive; level was %#x\n", fp->sr);
+     printk ("gvp11dmaintr: interrupted pc was %#lx\n", fp->pc);
+     cli();
+     for (;;)
+       ;
+   }
+ 
+   stat = dma_softc.sc_hwaddr->control;
+ 
+ #if 0
+   if (! (stat & GVP11_DMAC_INT_PENDING)) {
+     --recurse;
+     return;
+     }
+ #endif
+ 
+ #ifdef DEBUG
+   if (dmadebug & DDB_FOLLOW)
+     printf("gvp11dmaintr (%d, 0x%x)\n", gvp11_host_nr, stat);
+ #endif
+ 
+   /* both, SCSI and DMA interrupts arrive here. I chose arbitrarily that
+      DMA interrupts should have higher precedence than SCSI interrupts. */
+ 
+     wd33c93intr (gvp11_host_nr);
+ 
+   --recurse;
+ }
+ 	
+ static int
+ dmanext (register int unit)
+ {
+ #ifdef DEBUG
+   if (dmadebug & DDB_IO)
+     {
+       printf("dmanext(%d): next %d\n", unit, (dma_softc.sc_cur-dma_softc.sc_chain)+1);
+     }
+ #endif
+   if (++dma_softc.sc_cur <= dma_softc.sc_last)
+     {
+ #ifdef DEBUG
+       dmatimo = 1;
+ #endif
+       dma_softc.sc_hwaddr->stop_DMA    = 1;		/* stop dma, clear possible interrupts */
+       dma_softc.sc_hwaddr->control     = dma_softc.sc_cmd;
+       dma_softc.sc_hwaddr->DMA_address = (u_int) dma_softc.sc_cur->dc_addr;
+       dma_softc.sc_hwaddr->start_DMA   = 1;
+ 
+       return dma_softc.sc_cur->dc_count << 1;
+     }
+   else
+     {
+       /* shouldn't happen !! */
+       printf ("dmanext at end !!!\n");
+       dmastop (unit);
+       return 0;
+     }
+ }
+ 
+ #ifdef DEBUG
+ static void dmatimeout(unsigned long data)
+ {
+   unsigned long flags;
+ 
+   save_flags (flags);
+   cli ();
+ 
+   if (dmatimo)
+   {
+ 	  if (dmatimo > 1)
+ 		  printf("dma%d: timeout #%d\n", gvp11_host_nr, dmatimo-1);
+ 	  dmatimo++;
+   }
+   restore_flags (flags);
+ 
+   dmatimer.expires = 30 * HZ;
+   dmatimer.data = 0;
+   dmatimer.function = dmatimeout;
+   add_timer (&dmatimer);
+ }
+ #endif
+ 
+ #endif /* CONFIG_GVP11_SCSI */
diff -r2cN linux-005.1/kernel/blk_drv/scsi/gvp11_scsi.h my-linux/kernel/blk_drv/scsi/gvp11_scsi.h
*** linux-005.1/kernel/blk_drv/scsi/gvp11_scsi.h
--- my-linux/kernel/blk_drv/scsi/gvp11_scsi.h	Sat Oct 30 16:13:35 1993
***************
*** 0 ****
--- 1,37 ----
+ #ifndef _GVP11_SCSI_H
+ 
+ /* $Id$
+  *
+  * Header file for the GVP Series II SCSI controller for Linux
+  *
+  * Written and (C) 1993, Ralf B?chle, see gvp11_scsi.c for more info
+  * based on a2091_scsi.h (C) 1993 by Hamish Macdonald
+  *
+  */
+ 
+ #include <linux/types.h>
+ 
+ int gvp11_scsi_detect(int);
+ int gvp11_scsi_command(Scsi_Cmnd *);
+ int gvp11_scsi_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
+ int gvp11_scsi_abort(Scsi_Cmnd *, int);
+ const char *gvp11_scsi_info(void);
+ int gvp11_scsi_reset(void);
+ int gvp11_scsi_biosparam(int, int, int*);
+ 
+ #ifndef NULL
+ #define NULL 0
+ #endif
+ 
+ #define GVP11_SCSI  {"GVP Series II SCSI controller",       \
+ 		    gvp11_scsi_detect,			    \
+ 		    gvp11_scsi_info, 			    \
+ 		    gvp11_scsi_command,			    \
+ 		    gvp11_scsi_queuecommand, 		    \
+ 		    gvp11_scsi_abort,			    \
+ 		    gvp11_scsi_reset,			    \
+ 		    NULL,				    \
+ 		    gvp11_scsi_biosparam,		    \
+ 		    1, 7, SG_NONE, 1, 0, 0}
+ 
+ #endif /* _GVP11_SCSI_H */
diff -r2cN linux-005.1/kernel/blk_drv/scsi/gvp11dmareg.h my-linux/kernel/blk_drv/scsi/gvp11dmareg.h
*** linux-005.1/kernel/blk_drv/scsi/gvp11dmareg.h
--- my-linux/kernel/blk_drv/scsi/gvp11dmareg.h	Sat Oct 30 16:10:29 1993
***************
*** 0 ****
--- 1,66 ----
+ /*
+  * Originaly from:
+  *
+  * Mach Operating System
+  * Copyright (c) 1992 Carnegie Mellon University
+  * All Rights Reserved.
+  *
+  * Permission to use, copy, modify and distribute this software and its
+  * documentation is hereby granted, provided that both the copyright
+  * notice and this permission notice appear in all copies of the
+  * software, derivative works or modified versions, and any portions
+  * thereof, and that both notices appear in supporting documentation.
+  *
+  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+  *
+  * Carnegie Mellon requests users of this software to return to
+  *
+  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
+  *  School of Computer Science
+  *  Carnegie Mellon University
+  *  Pittsburgh PA 15213-3890
+  *
+  * any improvements or extensions that they make and grant Carnegie Mellon
+  * the rights to redistribute these changes.
+  */
+ 
+ /*
+  * This file describes the layout of a GVP series II SCSI controller
+  * (product 11) as understood by Niklas Hallqvist (niklas@appli.se).
+  * Note: this info is not hard facts, but rather guesses.
+  *
+  * Modified for Amiga Linux by Ralf B?chle
+  */
+ 
+ #define v_char		volatile char
+ #define	v_int		volatile int
+ #define vu_char		volatile u_char
+ #define vu_short	volatile u_short
+ #define vu_int		volatile u_int
+ 
+ struct sdmac {
+   vu_short ________________pad0[32];
+   vu_short control;
+   vu_short ________________pad1[15];
+   vu_char  ________________pad2;
+   vu_char  wd_address;
+   vu_char  ________________pad3;
+   vu_char  wd_data;
+   vu_short ________________pad4[2];
+   vu_short bank;
+   vu_short ________________pad5[3];
+   vu_int   DMA_address;
+   vu_short secret1;	/* Initially store 0  here */
+   vu_short start_DMA;	/* strobe */
+   vu_short stop_DMA;	/* strobe */
+   vu_short secret2;	/* Initially store 1  here */
+   vu_short secret3;	/*         "       15  "   */
+ };
+ 
+ /* bits in `control' */
+ #define GVP11_DMAC_BUSY		(1<<0)
+ #define GVP11_DMAC_INT_PENDING	(1<<1)
+ #define GVP11_DMAC_INT_ENABLE	(1<<3)
+ #define GVP11_DMAC_DIR_WRITE	(1<<4)
diff -r2cN linux-005.1/kernel/blk_drv/scsi/hosts.c my-linux/kernel/blk_drv/scsi/hosts.c
*** linux-005.1/kernel/blk_drv/scsi/hosts.c	Thu Aug 12 12:13:07 1993
--- my-linux/kernel/blk_drv/scsi/hosts.c	Fri Oct 22 20:30:50 1993
***************
*** 34,37 ****
--- 34,41 ----
  #endif
  
+ #ifdef CONFIG_GVP11_SCSI
+ #include "gvp11_scsi.h"
+ #endif
+ 
  #ifdef CONFIG_SCSI_DEBUG
  #include "scsi_debug.h"
***************
*** 74,77 ****
--- 78,84 ----
  #ifdef CONFIG_A2091_SCSI
  	A2091_SCSI,
+ #endif
+ #ifdef CONFIG_GVP11_SCSI
+ 	GVP11_SCSI,
  #endif
  #ifdef CONFIG_SCSI_DEBUG
diff -r2cN linux-005.1/kernel/blk_drv/scsi/wd33c93.c my-linux/kernel/blk_drv/scsi/wd33c93.c
*** linux-005.1/kernel/blk_drv/scsi/wd33c93.c	Mon Sep 13 13:09:45 1993
--- my-linux/kernel/blk_drv/scsi/wd33c93.c	Sat Oct 30 16:06:50 1993
***************
*** 198,201 ****
--- 198,205 ----
  static void do_delay (int num)
  {
+     /*
+      * RB: The value of 3 seems to be quite low for my 28MHz A2630 (68030)
+      * maybe a possible problem for fast machines?
+      */
      int i = num*3;
  
***************
*** 357,361 ****
    struct scsi_softc *dev = &scsi_softc[host_nr];
    sbic_padded_regmap_t *regs;
!   int i, type, product, got_a2091 = 0;
    caddr_t address;
  
--- 361,365 ----
    struct scsi_softc *dev = &scsi_softc[host_nr];
    sbic_padded_regmap_t *regs;
!   int i, type, manufacturer, product, got_a2091 = 0;
    caddr_t address;
  
***************
*** 363,368 ****
    {
  	  type = sys_info.si_amiga.autocon[i].cd_Rom.er_Type;
! 	  product = sys_info.si_amiga.autocon[i].cd_Rom.er_Type;
! 	  if (type == 0xd1 && product == 0x03) {
  		  got_a2091 = 1;
  		  address = sys_info.si_amiga.autocon[i].cd_BoardAddr;
--- 367,373 ----
    {
  	  type = sys_info.si_amiga.autocon[i].cd_Rom.er_Type;
!           manufacturer = sys_info.si_amiga.autocon[i].cd_Rom.er_Manufacturer;
! 	  product = sys_info.si_amiga.autocon[i].cd_Rom.er_Product;
! 	  if (type == 0xd1 && manufacturer == 514 && product == 0x03) {
  		  got_a2091 = 1;
  		  address = sys_info.si_amiga.autocon[i].cd_BoardAddr;
***************
*** 403,407 ****
    struct scsi_softc *dev = &scsi_softc[host_nr];
    sbic_padded_regmap_t *regs;
!   int i, type, product, got_gvp11 = 0;
    caddr_t address;
  
--- 408,412 ----
    struct scsi_softc *dev = &scsi_softc[host_nr];
    sbic_padded_regmap_t *regs;
!   int i, type, manufacturer, product, got_gvp11 = 0;
    caddr_t address;
  
***************
*** 409,415 ****
    {
  	  type = sys_info.si_amiga.autocon[i].cd_Rom.er_Type;
! 	  product = sys_info.si_amiga.autocon[i].cd_Rom.er_Type;
! 	  if (type == 0xd1 && product == 0x03) {
! #error What are type and product for gvp11?
  		  got_gvp11 = 1;
  		  address = sys_info.si_amiga.autocon[i].cd_BoardAddr;
--- 414,420 ----
    {
  	  type = sys_info.si_amiga.autocon[i].cd_Rom.er_Type;
!           manufacturer = sys_info.si_amiga.autocon[i].cd_Rom.er_Manufacturer;
! 	  product = sys_info.si_amiga.autocon[i].cd_Rom.er_Product;
! 	  if (type == 0xd1 && manufacturer == 2017 && product == 11) {
  		  got_gvp11 = 1;
  		  address = sys_info.si_amiga.autocon[i].cd_BoardAddr;
***************
*** 429,433 ****
  
    /* initialize dma */
!   gvp11dmainit (host_nr, &address, &dev->dmareq, &dev->dmafree, &dev->dmago,
  		&dev->dmanext, &dev->dmastop);
  
--- 434,438 ----
  
    /* initialize dma */
!   gvp11dmainit (host_nr, address, &dev->dmareq, &dev->dmafree, &dev->dmago,
  		&dev->dmanext, &dev->dmastop);
  
***************
*** 436,440 ****
    regs = (sbic_padded_regmap_t *) address;
    dev->host_nr = host_nr;
!   dev->regs = regs;
    dev->sc_clock_freq = scsi_clock_override ? scsi_clock_override : 77;
  
--- 441,445 ----
    regs = (sbic_padded_regmap_t *) address;
    dev->host_nr = host_nr;
!   dev->regs = (caddr_t)regs;
    dev->sc_clock_freq = scsi_clock_override ? scsi_clock_override : 77;
  
***************
*** 1206,1211 ****
  
  /* XXXX do all with polled I/O */
! 
!   if ((((int)SCpnt->buffer & 3) || (SCpnt->bufflen & 1)))
      {
        dev->dmafree(SCpnt);
--- 1211,1221 ----
  
  /* XXXX do all with polled I/O */
!   /*
!    * RB: This alignment tests seem tobe OK for the A3000
!    * GVP11 (and A2091, too, I guess) can DMA to 2-byte-aligned
!    * adresses. And old GVP Series I controllers can even do DMA
!    * to unaligned memory.
!    */
!   if ( (((int)SCpnt->buffer & 3) || (SCpnt->bufflen & 1)))
      {
        dev->dmafree(SCpnt);
diff -r2cN linux-005.1/tools/amiga/bootstrap.c my-linux/tools/amiga/bootstrap.c
*** linux-005.1/tools/amiga/bootstrap.c	Mon Sep 13 13:19:33 1993
--- my-linux/tools/amiga/bootstrap.c	Sat Oct 30 15:57:42 1993
***************
*** 154,157 ****
--- 154,163 ----
  	/* if fast memory */
  	if (mh.mh_Attributes & MEMF_FAST) {
+ /*
+  * RB: This is just a kludge for my zkicked A2000 with A2630
+  */
+ #if 0
+ mh.mh_Lower = (void *) 0x200000;
+ #endif
  	    /* record the start */
  	    si.memory[si.num_memory].addr = (void *)mh.mh_Lower;
-- 
Ralf Baechle

Internet: linux@informatik.uni-koblenz.de
Fido:     Ralf Baechle 2:245/5618.2

