From cyrill@peterlink.ru  Tue Jul 29 11:21:51 2003
Return-Path: <cyrill@peterlink.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id A4E7B37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 29 Jul 2003 11:21:51 -0700 (PDT)
Received: from holmes.peterlink.ru (holmes.peterlink.ru [195.242.2.2])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 9EA9C43FAF
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 29 Jul 2003 11:21:50 -0700 (PDT)
	(envelope-from cyrill@peterlink.ru)
Received: from stapleton.peterlink.ru (stapleton.peterlink.ru [195.242.2.5])
	by holmes.peterlink.ru (8.12.6/8.12.6) with ESMTP id h6TILn3W068335
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 29 Jul 2003 22:21:49 +0400 (MSD)
Received: from buratino.peterlink.ru (cyrill@buratino.peterlink.ru [195.242.2.70])
	by stapleton.peterlink.ru (8.12.3/8.12.3) with ESMTP id h6TIKxZT002935
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 29 Jul 2003 22:20:59 +0400 (MSD)
Received: from localhost (cyrill@localhost)
	by buratino.peterlink.ru (8.9.1/8.9.1) with SMTP id WAA07418
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 29 Jul 2003 22:20:58 +0400 (MSD)
Message-Id: <Pine.BSI.3.96.SK.1030729221436.6605A-100000@buratino.peterlink.ru>
Date: Tue, 29 Jul 2003 22:20:58 +0400 (MSD)
From: Cyrill Shevchuk <cyrill@peterlink.ru>
Reply-To: Cyrill Shevchuk <cyrill@cyrills.net>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [patch] Digiboard PC/Xem fails to initialize when using digi module (BIOS boot failed (0x00 != 0x4447))

>Number:         55018
>Category:       kern
>Synopsis:       [digi] [patch] Digiboard PC/Xem fails to initialize when using digi module (BIOS boot failed (0x00 != 0x4447))
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    andre
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 29 11:30:09 PDT 2003
>Closed-Date:    Sat Aug 14 22:56:19 UTC 2010
>Last-Modified:  Sat Aug 14 22:56:19 UTC 2010
>Originator:     Cyrill Shevchuk <cyrill@cyrills.net>
>Release:        FreeBSD 5.1-RELEASE i386
>Organization:
Peterlink ISP
>Environment:

FreeBSD parazit.peterlink.ru 5.1-RELEASE FreeBSD 5.1-RELEASE #0: Thu Jun  5 02:55:42 GMT 2003     root@wv1u.btc.adaptec.com:/usr/obj/usr/src/sys/GENERIC  i386

>Description:

Module digi.ko can't initialize Digiboard PC/Xem ISA multiport
serial card on old Pentium-100MHz machine.

Error message during boot or manual module loading:

digi0: BIOS boot failed (0x00 != 0x4447)

>How-To-Repeat:

1. Apply following patch to enable verbose init process:

--- sys/dev/digi/digi.c.orig	Tue Jul 29 09:36:38 2003
+++ sys/dev/digi/digi.c	Sun Jul 27 14:21:35 2003
@@ -108,7 +108,7 @@
 static struct con_bios *con_bios_list;
 devclass_t	 digi_devclass;
 static char	 driver_name[] = "digi";
-unsigned 	 digi_debug = 0;
+unsigned 	 digi_debug = 1;
 
 static struct speedtab digispeedtab[] = {
 	{ 0,		0},			/* old (sysV-like) Bx codes */


2. Place these lines in /etc/make.conf:

.if ${.CURDIR} == /usr/src/sys/modules/digi/digi
CFLAGS+= -DDEBUG
.endif

3. Recompile digi.ko module and load it:

# cd /usr/src/sys/modules/digi
# make cleandir && make obj && make depend && make
# cp digi/digi.ko /boot/kernel
# kldload digi
digi0: probing on isa bus
digi0: isa? port 0x104 mem 0xd0000
digi0: got reset after 0 iterations
digi0: board type is 0xf5
digi0: Probe returns -10
digi0: probing on isa bus
digi0: isa? port 0x104 mem 0xd0000
digi0: got reset after 0 iterations
digi0: board type is 0xf5
digi0: Probe returns -10
digi0 at port 0x104-0x107 iomem 0xd0000-0xd7fff on isa0
digi0: attaching
digi0: Checking card type
digi0: got reset after 0 iterations
digi0: board type is 0xf5
digi0: internal memory segment 0x0
digi0: got reset after 0 iterations
digi0: short memory test
digi0: 1st memory test ok
digi0: 2nd memory test ok
digi0: 3rd memory test ok
digi0: Got init reset after 0 us
digi0: BIOS uploaded
digi0: BIOS started after 0 us
digi0: BIOS boot failed (0x00 != 0x4447)
digi1: probing on isa bus
digi1: 0x534: Invalid i/o address
digi1: probing on isa bus
digi1: probing on isa bus
digi1: 0xf00: Invalid i/o address
digi1: probing on isa bus
digi1: 0x330: Invalid i/o address
digi1: probing on isa bus
digi1: io address not given
digi1: probing on isa bus
digi1: 0x061: Invalid i/o address
digi1: probing on isa bus
digi1: io address not given


>Fix:

Period given to digiboard bios to run is too small. In current version of
sys/dev/digi/digi.c it is 2 * hz ticks, actually it takes my card a little
longer to initialize (logged with default hz=100 value):

digi0: probing on isa bus
digi0: isa? port 0x104 mem 0xd0000
digi0: got reset after 0 iterations
digi0: board type is 0xf5
digi0: Probe returns -10
digi0: probing on isa bus
digi0: isa? port 0x104 mem 0xd0000
digi0: got reset after 0 iterations
digi0: board type is 0xf5
digi0: Probe returns -10
digi0 at port 0x104-0x107 iomem 0xd0000-0xd7fff on isa0
digi0: attaching
digi0: Checking card type
digi0: got reset after 0 iterations
digi0: board type is 0xf5
digi0: internal memory segment 0x0
digi0: got reset after 0 iterations
digi0: short memory test
digi0: 1st memory test ok
digi0: 2nd memory test ok
digi0: 3rd memory test ok
digi0: Got init reset after 0 us
digi0: BIOS uploaded
digi0: BIOS started after 0 us
digi0: BIOS booted after 215 iterations
digi0: Loading FEP/OS
digi0: FEP/OS loaded
digi0: FEP/OS started after 3 iterations
digi0: Digiboard PC/Xem, 64 ports found
digi1: probing on isa bus
digi1: 0x534: Invalid i/o address
digi1: probing on isa bus
digi1: probing on isa bus
digi1: 0xf00: Invalid i/o address
digi1: probing on isa bus
digi1: 0x330: Invalid i/o address
digi1: probing on isa bus
digi1: io address not given
digi1: probing on isa bus
digi1: 0x061: Invalid i/o address
digi1: probing on isa bus
digi1: io address not given


Suggested patch to sys/dev/digi/digi.c (version 1.34):

--- sys/dev/digi/digi.c.orig	Tue Jul 29 09:40:24 2003
+++ sys/dev/digi/digi.c	Tue Jul 29 09:40:36 2003
@@ -378,7 +378,7 @@
 	DLOG(DIGIDB_INIT, (sc->dev, "BIOS started after %d us\n", i));
 
 	for (i = 0; vW(ptr) != *(u_short *)"GD"; i++) {
-		if (i > 2*hz) {
+		if (i > 5*hz) {
 			log(LOG_ERR, "digi%d: BIOS boot failed "
 			    "(0x%02x != 0x%02x)\n",
 			    sc->res.unit, vW(ptr), *(u_short *)"GD");

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->andre 
Responsible-Changed-By: andre 
Responsible-Changed-When: Sat Dec 27 08:49:20 PST 2003 
Responsible-Changed-Why:  
Take over. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=55018 
State-Changed-From-To: open->analyzed 
State-Changed-By: andre 
State-Changed-When: Sun Dec 28 15:48:51 PST 2003 
State-Changed-Why:  
I'll get my Digi/Xem card out of the closet this week and 
test the patch. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=55018 
State-Changed-From-To: analyzed->patched 
State-Changed-By: andre 
State-Changed-When: Wed Sep 14 15:18:43 GMT 2005 
State-Changed-Why:  
Patch committed in sys/dev/digi/digi.c rev. 1.59. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=55018 

From: Gavin Atkinson <gavin@FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/55018: [digi] [patch] Digiboard PC/Xem fails to
	initialize when using digi module (BIOS boot failed (0x00 != 0x4447))
Date: Thu, 29 May 2008 13:59:11 +0100

 Fixed in HEAD and RELENG_7, needs MFC of sys/dev/digi/digi.c 1.59 to
 RELENG_6.

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/55018: commit references a PR
Date: Sat, 14 Aug 2010 22:49:26 +0000 (UTC)

 Author: andre
 Date: Sat Aug 14 22:49:07 2010
 New Revision: 211321
 URL: http://svn.freebsd.org/changeset/base/211321
 
 Log:
   MFC r150132:
   
     Increase boot-time DigiBIOS initialization timeout to allow
     for a larger number of chained port modules.
   
     PR:		kern/55018
     Submitted by:	Cyrill Shevchuk <cyrill at cyrills.net>
 
 Modified:
   stable/6/sys/dev/digi/digi.c
 
 Modified: stable/6/sys/dev/digi/digi.c
 ==============================================================================
 --- stable/6/sys/dev/digi/digi.c	Sat Aug 14 22:35:20 2010	(r211320)
 +++ stable/6/sys/dev/digi/digi.c	Sat Aug 14 22:49:07 2010	(r211321)
 @@ -360,7 +360,7 @@ digi_init(struct digi_softc *sc)
  	DLOG(DIGIDB_INIT, (sc->dev, "BIOS started after %d us\n", i));
  
  	for (i = 0; vW(ptr) != *(u_short *)"GD"; i++) {
 -		if (i > 2*hz) {
 +		if (i > 5*hz) {
  			log(LOG_ERR, "digi%d: BIOS boot failed "
  			    "(0x%02x != 0x%02x)\n",
  			    sc->res.unit, vW(ptr), *(u_short *)"GD");
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: andre 
State-Changed-When: Sat Aug 14 22:55:56 UTC 2010 
State-Changed-Why:  
Final MFC done. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=55018 
>Unformatted:
