kern/68756: isdn4bsd driver for AVM Fritz V2 does not always work
after boot
Ari Suutari
ari.suutari at syncrontech.com
Tue Jul 6 23:30:19 PDT 2004
>Number: 68756
>Category: kern
>Synopsis: isdn4bsd driver for AVM Fritz V2 does not always work after boot
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Jul 07 06:30:18 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator: Ari Suutari
>Release: FreeBSD 4.9-RELEASE i386
>Organization:
Syncron Tech Oy
>Environment:
System: FreeBSD pommac.syncrontech.com 4.9-RELEASE FreeBSD 4.9-RELEASE #23: Thu May 27 14:09:16 EEST 2004 ari at pommac.syncrontech.com:/usr/obj/usr/src/sys/POMMAC i386
>Description:
I'm facing odd but repeatable problems with FreeBSD 4.9 and
AVM Fritz V2 PCI isdn cards. It seems that if I reboot my
server the isdn card no longer works. However, if I power-off
and power-on the card works again.
Without power-off, I'm getting messages like "Awaiting signal"
from ifpi2 driver and the system never recovers.
I have tried replacing the isdn card, but it doesn't help. The machines
are HP Compaq 2000 models.
>How-To-Repeat:
Install and configure AVM Fritz V2 card and reboot without
cycling power. Isdn doesn't always come up.
>Fix:
I compared drivers for this card on Linux and FreeBSD. Linux
driver writes to STAT0 register during initilization value which
FreeBSD version does not. Adding this reset code seems to
fix the problem for me.
Patch (agains 4.9) follows:
Index: i4b_ifpi2_pci.c
===================================================================
RCS file: /opt/freebsd-cvs/src/sys/i4b/layer1/ifpi2/i4b_ifpi2_pci.c,v
retrieving revision 1.6.2.2
diff -c -r1.6.2.2 i4b_ifpi2_pci.c
*** i4b_ifpi2_pci.c 15 May 2002 08:12:42 -0000 1.6.2.2
--- i4b_ifpi2_pci.c 6 Jul 2004 08:18:35 -0000
***************
*** 155,160 ****
--- 155,161 ----
/*
* AVM PCI Status Latch 0 read only bits
*/
+ #define ASL_RESET 0x01
#define ASL_TIMERRESET 0x04
#define ASL_ENABLE_INT 0x08
***************
*** 566,571 ****
--- 567,579 ----
#ifdef AVMA1PCI_V2_DEBUG
printf("avma1pp2_attach: 1 HSCX_STAT %x\n", v);
#endif
+
+ bus_space_write_1(btag, bhandle, STAT0_OFFSET, 0);
+ DELAY(SEC_DELAY/100); /* 10 ms */
+ bus_space_write_1(btag, bhandle, STAT0_OFFSET, ASL_RESET);
+ DELAY(SEC_DELAY/100); /* 10 ms */
+ bus_space_write_1(btag, bhandle, STAT0_OFFSET, 0);
+ DELAY(SEC_DELAY/100); /* 10 ms */
bus_space_write_1(btag, bhandle, STAT0_OFFSET, ASL_TIMERRESET);
DELAY(SEC_DELAY/100); /* 10 ms */
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list