From owner-freebsd-bugs@FreeBSD.ORG Wed Jul 7 06:30:19 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 560FB16A4CF for ; Wed, 7 Jul 2004 06:30:19 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 383C043D4C for ; Wed, 7 Jul 2004 06:30:19 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i676UJN1045634 for ; Wed, 7 Jul 2004 06:30:19 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i676UJ8M045632; Wed, 7 Jul 2004 06:30:19 GMT (envelope-from gnats) Resent-Date: Wed, 7 Jul 2004 06:30:19 GMT Resent-Message-Id: <200407070630.i676UJ8M045632@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ari Suutari Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5563D16A4CE for ; Wed, 7 Jul 2004 06:26:43 +0000 (GMT) Received: from cocoa.syncrontech.com (cocoa-e0.syncrontech.com [62.71.8.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 03B7243D1D for ; Wed, 7 Jul 2004 06:26:42 +0000 (GMT) (envelope-from ari@pommac.syncrontech.com) Received: from guinness.syncrontech.com (guinness.syncrontech.com [62.71.8.19])i676QcWw054195 for ; Wed, 7 Jul 2004 09:26:39 +0300 (EEST) (envelope-from ari@pommac.syncrontech.com) Received: from pommac.syncrontech.com (pommac.syncrontech.com [62.71.8.20]) i676Qb0V051187 for ; Wed, 7 Jul 2004 09:26:38 +0300 (EEST) (envelope-from ari@pommac.syncrontech.com) Received: from pommac.syncrontech.com (localhost [127.0.0.1]) i668mfsJ018337 for ; Tue, 6 Jul 2004 11:48:41 +0300 (EEST) (envelope-from ari@pommac.syncrontech.com) Received: (from ari@localhost) by pommac.syncrontech.com (8.12.11/8.12.11/Submit) id i668mfBK018336; Tue, 6 Jul 2004 11:48:41 +0300 (EEST) (envelope-from ari) Message-Id: <200407060848.i668mfBK018336@pommac.syncrontech.com> Date: Tue, 6 Jul 2004 11:48:41 +0300 (EEST) From: Ari Suutari To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/68756: isdn4bsd driver for AVM Fritz V2 does not always work after boot X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Ari Suutari List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2004 06:30:19 -0000 >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@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: