Date: Mon, 15 Jun 1998 01:14:53 +0200 (0tDST)
From: Geert Uytterhoeven <geert@thomas.kotnet.org>
To: Chris Lawrence <quango@ix.netcom.com>
cc: Linux/m68k <linux-m68k@lists.linux-m68k.org>
Subject: L68K: Re: lszorro problem
In-Reply-To: <19980613195530.A2297@ix.netcom.com>
Sender: owner-linux-m68k@phil.uni-sb.de

On Sat, 13 Jun 1998, Chris Lawrence wrote:
>Geert:
>
>lszorro mis-identifies my GVP Series II controller:
>
>% /sbin/lszorro
>00: BSC/Alfadata MultiFace III Multi I/O
>01: Great Valley Products: Unknown device 0b:fe
                                              ^^
>
>% /sbin/lszorro -vxm
>Slot:	00
>Vendor:	BSC/Alfadata
>Device:	MultiFace III Multi I/O
>00: 00 00 18 40 00 00 16 a8 00 00 00 00 00 00 02 00
>10: c1 12 40 00 08 2c 00 00 00 00 00 00 00 00 00 00
>20: 00 e9 00 00 00 01 00 00 00 e9 00 01 00 00 00 00
>30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>40: 00 00 00 00
>Slot:	01
>Vendor:	Great Valley Products
>Device:	000b
                ^^^^
>00: 00 00 16 ac 00 00 17 f8 00 00 00 00 00 00 00 00
>10: d1 0b 00 00 07 e1 ee ee ee ee 80 00 00 00 00 00
>20: 00 ea 00 00 00 01 00 00 00 ea 00 01 07 02 74 94
>30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>40: 00 00 00 00

This patch should fix some problems:

  - compile modular kernels
  - epc must be masked off with GVP_PRODMASK
  - dump product code+epc instead of product code only

--- linux/drivers/zorro/zorrosyms.c.orig	Mon Jun  8 01:21:02 1998
+++ linux/drivers/zorro/zorrosyms.c	Sun Jun 14 22:48:09 1998
@@ -7,6 +7,7 @@
  */
 
 #include <linux/module.h>
+#include <linux/types.h>
 #include <linux/zorro.h>
 
     /* Board configuration */
--- linux/drivers/zorro/proc.c.orig	Mon Jun  8 01:21:01 1998
+++ linux/drivers/zorro/proc.c	Sun Jun 14 22:27:20 1998
@@ -111,7 +111,7 @@
 		    prod == ZORRO_PROD(ZORRO_PROD_GVP_EPC_BASE)) {
 		    /* GVP quirk */
 		    u32 addr = (u32)cd->cd_BoardAddr;
-		    epc = *(u16 *)ZTWO_VADDR(addr+0x8000);
+		    epc = (*(u16 *)ZTWO_VADDR(addr+0x8000)) & GVP_PRODMASK;
 		} else
 		    epc = 0;
 		len = sprintf(buf, "%02x\t%04x%02x%02x\t%08x\t%08x\t%02x\n",
--- zorroutils/names.c.orig	Mon Jun  8 22:08:43 1998
+++ zorroutils/names.c	Sun Jun 14 22:32:08 1998
@@ -211,7 +211,7 @@
       if (e)
 	return e->name;
     }
-  sprintf(devbuf, "%04x", i);
+  sprintf(devbuf, "%02x:%02x", i, j);
   return devbuf;
 }
 

Greetings,

						Geert

--
Geert Uytterhoeven                     Geert.Uytterhoeven@thomas.kotnet.org
Linux/{m68k~Amiga,ppc~CHRP}, Wavelets  http://www.thomas.kotnet.org/~geert/
KotNET@Thomas Network Administration --- Make your bed part of Cyberspace!!

