Date: Fri, 31 Jul 1998 21:19:16 +0200
From: Sven LUTHER <luther@iliana>
To: linux-m68k@lists.linux-m68k.org, linux-apus@SunSITE.auc.dk
Cc: luther@dpt-info.u-strasbg.fr, jskov@cygnus.co.uk,
        richard@sleepie.demon.co.uk
Subject: L68K: blizzard 603e+ scsi patch for linux/m68k part 2.
Sender: owner-linux-m68k@phil.uni-sb.de

Hello,

find attached here the second part of the patch for the 53c710 scsi driver for the BPPC scsi controller.

it is a patch against linux 2.1.108 and after richard's 53c710 patch has been applied.

there are still two problems with it.

first, there seems to be a conflict between this driver and the ide driver. the ide driver catches the interrupts of the scsi controller, and don't recognizes them, so a lot of 'unrecognized interrupts' from the ide drive.

but it boots fine without ide driver, as the appended dmesg output shows.

second, but i think this is another problem, since i had the same problem on my blizzard 1230, is that the kernel is not able to mount the root filesystem

(VFS: cannot open device 00:00)

i give the same options as for 2.0.33pl1 to the kernel, but was not able to boot because of it. perhaps i am missing something, perhaps this problem is already solved, perhaps i forgot an option in make config, i don't know. I will try to compile a 2.1.105 kernel with this patch.

i patched the 2.1.108 kernel with all the patches that were posted to the list.

ok here is the dmesg output, and you will find the patch at the end. please apply it together with the previous patch i made some days ago.

Searching for SAVEKMSG magic...
Found 2909 bytes at 0x001e0008
>>>>>>>>>>>>>>>>>>>>
Linux version 2.1.108 (root@iliana) (gcc version 2.7.2.3) #5 Fri Jul 31 18:52:00 CEST 1998
Amiga hardware found: [A1200] VIDEO BLITTER AUDIO FLOPPY A1200_IDE KEYBOARD MOUSE SERIAL PARALLEL A2000_CLK CHIP_RAM PAULA LISA ALICE_PAL PCMCIA ZORRO 
Zorro: Probing AutoConfig expansion devices: 1 device
Console: colour dummy device 80x25
Calibrating delay loop... 16.59 BogoMIPS
Memory: 37964k/40448k available (948k kernel code, 796k data, 48k init)
kmem_create: Forcing size word alignment - uid_cache
kmem_create: Forcing size word alignment - vm_area_struct
kmem_create: Forcing size word alignment - filp
POSIX conformance testing by UNIFIX
Swansea University Computer Society NET3.039 for Linux 2.1
kmem_create: Forcing size word alignment - skbuff_head_cache
NET3: Unix domain sockets 0.16 for Linux NET3.038.
Swansea University Computer Society TCP/IP for NET3.037
IP Protocols: ICMP, UDP, TCP
Starting kswapd v 1.5 
fb0: Amiga AGA frame buffer device, using 1280K of video memory
M68K Serial driver version 1.01
ttyS0 at 0x80dff018: Amiga builtin
lp_init: lp using interrupt driver
lp0: Builtin parallel port at 0x80bfe101
Amiga mouse installed.
RAM disk driver initialized:  16 RAM disks of 4096K size
loop: registered device at major 7
FD: probing units
found <5>fd: drive 0 didn't identify, setting default 00000000
no drives
scsi-ncr53c7xx : NCR53c710 at memory 0x80f40000, io 0x0, irq 12
scsi0: Revision 0x1
scsi0 : NCR code relocated to 0x786985e0 (virt 0x026985e0)
scsi0 : test 1 started
scsi0 : Amiga NCR53c710 SCSI
scsi : 1 host.
scsi0 : target 0 accepting period 200ns offset 8 5.00MHz synchronous SCSI
scsi0 : setting target 0 to period 200ns offset 8 5.00MHz synchronous SCSI
  Vendor: SEAGATE   Model: ST43400N          Rev: 1028
  Type:   Direct-Access                      ANSI SCSI revision: 02
Detected scsi disk sda at scsi0, channel 0, id 0, lun 0
scsi0 : target 1 accepting period 200ns offset 8 5.00MHz synchronous SCSI
scsi0 : setting target 1 to period 200ns offset 8 5.00MHz synchronous SCSI
  Vendor: SEAGATE   Model: ST52160N          Rev: 0418
  Type:   Direct-Access                      ANSI SCSI revision: 02
Detected scsi disk sdb at scsi0, channel 0, id 1, lun 0
scsi : detected 2 SCSI disks total.
SCSI device sda: hdwr sector= 512 bytes. Sectors= 5696655 [2781 MB] [2.8 GB]
SCSI device sdb: hdwr sector= 512 bytes. Sectors= 4238282 [2069 MB] [2.1 GB]
PPP: version 2.3.3 (demand dialling)
TCP compression code copyright 1989 Regents of the University of California
PPP line discipline registered.
Looking for PCMCIA ethernet card : NO PCMCIA card inserted
Partition check:
 sda: RDSK sda1 sda2 sda3 sda4
 sdb: RDSK sdb1 sdb2 sdb3 sdb4 sdb5 sdb6 sdb7 sdb8
RAMDISK: Compressed image found at block 0
VFS: Mounted root (minix filesystem).
VFS: Cannot open root device 00:00
Kernel panic: VFS: Unable to mount root fs on 00:00
amikeyb: unknown keyboard communication code 0xff
<<<<<<<<<<<<<<<<<<<<

i tried it with boot a ramdisk and a boot partition, with similar results.

and here is the patch



--- linux-2.1.108/drivers/scsi/Makefile	Tue Jul 28 22:45:54 1998
+++ linux-2.1.108-scsi/drivers/scsi/Makefile	Fri Jul 31 18:51:26 1998
@@ -147,6 +147,14 @@
   endif
 endif
 
+ifeq ($(CONFIG_BLZ603EPLUS_SCSI),y)
+L_OBJS += amiga7xx.o 53c7xx.o
+else
+  ifeq ($(CONFIG_BLZ603EPLUS_SCSI),m)
+  M_OBJS += amiga7xx.o 53c7xx.o
+  endif
+endif
+
 ifeq ($(CONFIG_WARPENGINE_SCSI),y)
 L_OBJS += amiga7xx.o 53c7xx.o
 else
--- linux-2.1.108/drivers/scsi/amiga7xx.c	Wed Jan  7 18:09:45 1998
+++ linux-2.1.108-scsi/drivers/scsi/amiga7xx.c	Fri Jul 31 20:59:47 1998
@@ -50,6 +50,30 @@
 
     tpnt->proc_dir = &proc_scsi_amiga7xx;
 
+#ifdef CONFIG_BLZ603EPLUS_SCSI
+    if ((key = zorro_find(ZORRO_PROD_PHASE5_BLIZZARD_603E_PLUS, 0, 0)))
+    {
+	cd = zorro_get_board(key);
+/*
+	unsigned long address;
+	address = (unsigned long)kernel_map((unsigned long)cd->cd_BoardAddr,
+		cd->cd_BoardSize, KERNELMAP_NOCACHE_SER, NULL);
+*/
+	options = OPTION_MEMORY_MAPPED|OPTION_DEBUG_TEST1|OPTION_INTFLY|OPTION_SYNCHRONOUS|OPTION_ALWAYS_SYNCHRONOUS|OPTION_DISCONNECT;
+
+        /* Is this correct ?
+	are the clock speeds different for 240MHz boards ? */
+	clock = 50000000;	/* 50MHz SCSI Clock */
+
+	ncr53c7xx_init(tpnt, 0, 710, (u32)(unsigned char *)(0x80f40000),
+			0, IRQ_AMIGA_PORTS, DMA_NONE, 
+			options, clock);
+
+	zorro_config_board(key, 0);
+	num++;
+    }
+#endif
+
 #ifdef CONFIG_WARPENGINE_SCSI
     if ((key = zorro_find(ZORRO_PROD_MACROSYSTEMS_WARP_ENGINE_40xx, 0, 0)))
     {

Friendly,

Sven LUTHER
