From owner-freebsd-isdn Mon Jan 1 2:11:39 2001 From owner-freebsd-isdn@FreeBSD.ORG Mon Jan 1 02:11:38 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from hcshh.hcs.de (hcshh.hcs.de [194.123.40.1]) by hub.freebsd.org (Postfix) with ESMTP id 8625337B400 for ; Mon, 1 Jan 2001 02:11:37 -0800 (PST) Received: from hcswork.hcs.de (hcswork.hcs.de [192.76.124.5]) by hcshh.hcs.de (Postfix) with ESMTP id 169C15D06; Mon, 1 Jan 2001 11:10:59 +0100 (CET) Received: by hcswork.hcs.de (Postfix, from userid 200) id 389402B7; Mon, 1 Jan 2001 11:20:15 +0100 (MET) Subject: Re: Bundling with i4b In-Reply-To: <3A44F788.2E16B815@webdaemon.net> "from Konstantinos Konstantinidis at Dec 23, 2000 09:05:44 pm" To: kkonstan@duth.gr Date: Mon, 1 Jan 2001 11:20:15 +0100 (MET) Cc: freebsd-isdn@freebsd.org Reply-To: hm@hcs.de Organization: HCS Hanseatischer Computerservice GmbH X-Mailer: ELM [version 2.4ME+ PL84 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Message-Id: <20010101102015.389402B7@hcswork.hcs.de> From: hm@hcs.de (Hellmuth Michaelis) Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org From the keyboard of Konstantinos Konstantinidis: > > I'm using isp0 to connect with a cisco (which *has* to initiate the call, > since it cannot receive calls due to the configuration of the PBX). I do > not have the option to use PPP encapsulation, and the damn thing keeps > trying to establish a 2nd B after about 10 minutes of >60kbps! If the 2nd > B is busy, it fails and tries again every 5 minutes, but if it's not, i4b > answers a 2nd call for isp0 while the 1st is allready taking place, thus > screwing things up pretty badly - I have to put the interface down and up > again for packets to flow again :( > It shouldn't be hard to add this functionality, but I tried to do it and > failed miserably since I don't know my way around the i4b source tree. > Perhaps someone could consider making this minor change or point out to > me a good place to start in the source tree. This seems to be a bug in isdnd. Incoming calls are handled in the file msghdl.c, function msg_connect_ind(). This is the place where incoming calls are checked whether to answer them or to ignore them. All the checking of the little pieces is done in file support.c function find_matching_entry_incoming() which is called from msg_connect_ind(). hellmuth -- Hellmuth Michaelis Tel +49 40 55 97 47-70 HCS Hanseatischer Computerservice GmbH Fax +49 40 55 97 47-77 Oldesloer Strasse 97-99 Mail hm [at] hcs.de D-22457 Hamburg WWW http://www.hcs.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message From owner-freebsd-isdn Mon Jan 1 12:56: 4 2001 From owner-freebsd-isdn@FreeBSD.ORG Mon Jan 1 12:56:02 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from cmailg4.svr.pol.co.uk (cmailg4.svr.pol.co.uk [195.92.195.174]) by hub.freebsd.org (Postfix) with ESMTP id 62E5B37B400 for ; Mon, 1 Jan 2001 12:56:02 -0800 (PST) Received: from modem-166.florida.dialup.pol.co.uk ([62.137.60.166] helo=DEDICATION1) by cmailg4.svr.pol.co.uk with smtp (Exim 3.13 #0) id 14DBzs-0001HX-00 for isdn@freebsd.org; Mon, 01 Jan 2001 20:56:00 +0000 Message-ID: <002701c07435$3eb6a5e0$01010a0a@DEDICATIONINET.local> From: "Andy Chantrill" To: Subject: isdnd debugging extracts Date: Mon, 1 Jan 2001 20:21:15 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 01.01.2001 20:13:14 DMN i4b isdn daemon started (pid = 265) 01.01.2001 20:13:25 DBG setup_dialout: entry rbch0 ok! 01.01.2001 20:13:25 DBG find_by_device_for_dialoutnumber: found entry 0! 01.01.2001 20:13:25 CHD 00002 rbch0 rate 60 sec/unit (no ratefile) 01.01.2001 20:13:25 CHD 00002 rbch0 dialing out from 855078 to 16164208452402620 01.01.2001 20:13:54 DBG find_by_device_for_dialoutnumber: entry 0, cdid in use I can't get PPP to dial out through isdnd ... any clues? Thanks, Andy. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message From owner-freebsd-isdn Mon Jan 1 14:40:56 2001 From owner-freebsd-isdn@FreeBSD.ORG Mon Jan 1 14:40:53 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from mx-out.daemonmail.net (mx-out.daemonmail.net [209.75.5.3]) by hub.freebsd.org (Postfix) with ESMTP id A807737B400 for ; Mon, 1 Jan 2001 14:40:53 -0800 (PST) Received: from mx0.emailqueue.net (localhost.daemonmail.net [127.0.0.1]) by mx-out.daemonmail.net (8.9.3/8.9.3) with SMTP id OAA19300; Mon, 1 Jan 2001 14:40:44 -0800 (PST) (envelope-from kkonstan@webdaemon.net) Received: from webdaemon.net (webdaemon.net [193.92.210.14]) by mail.webdaemon.net with ESMTP id 2150Y5B2 Mon, 01 Jan 2001 14:40:41 -0700 (PST) Sender: kkonstan@mx-out.daemonmail.net Message-ID: <3A510768.689CCCB@webdaemon.net> Date: Tue, 02 Jan 2001 00:40:40 +0200 From: Konstantinos Konstantinidis Reply-To: kkonstan@duth.gr Organization: I've heard of it. X-Mailer: Mozilla 4.76 [en] (X11; U; FreeBSD 4.2-RELEASE i386) X-Accept-Language: en, el MIME-Version: 1.0 To: hm@hcs.de Cc: freebsd-isdn@freebsd.org Subject: Re: Bundling with i4b References: <20010101102015.389402B7@hcswork.hcs.de> Content-Type: text/plain; charset=iso-8859-7 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hellmuth Michaelis wrote: > > >From the keyboard of Konstantinos Konstantinidis: > > > > It shouldn't be hard to add this functionality, but I tried to do it and > > failed miserably since I don't know my way around the i4b source tree. > > Perhaps someone could consider making this minor change or point out to > > me a good place to start in the source tree. > > This seems to be a bug in isdnd. Incoming calls are handled in the file > msghdl.c, function msg_connect_ind(). This is the place where incoming > calls are checked whether to answer them or to ignore them. All the > checking of the little pieces is done in file support.c function > find_matching_entry_incoming() which is called from msg_connect_ind(). Thanks a lot for the pointers, they really helped. Apparently this behaviour is only triggered if the dialouttype is 'calledback', so I changed my config and now that it is 'normal' the problem is solved (the calls are ignored). I can use normal because I can't call the cisco to call me back anyway, but it's on our phone network so it's free to leave the connection up permanently. However, for real callback circumstances the problem (if it really is a problem, after all the correct thing to do would be to configure the cisco apropriately) might persist. Here's the offending snippet for reference: if (cep->dialin_reaction == REACT_ACCEPT && cep->dialouttype == DIALOUT_CALLEDBACK) [accept incoming call for callback in progress] I can't say I understand fully the mechanisms of the callback implemented, but I'd hazard a guess that the above should only happen while we're actually waiting for a callback, like this: if (cep->dialin_reaction == REACT_ACCEPT && cep->dialouttype == DIALOUT_CALLEDBACK && cep->status == ST_PCB_WAITCALL) [accept incoming call for callback in progress] I have no means of testing this however, it might break callback support entirely or introduce a race condition for all I know - perhaps someone else might be interested in pursuing this further. Thanks again, K. Konstantinidis To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message From owner-freebsd-isdn Mon Jan 1 15:22:29 2001 From owner-freebsd-isdn@FreeBSD.ORG Mon Jan 1 15:22:27 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from mail.du.gtn.com (mail.du.gtn.com [194.77.9.57]) by hub.freebsd.org (Postfix) with ESMTP id 9414737B400 for ; Mon, 1 Jan 2001 15:22:26 -0800 (PST) Received: from mail.cicely.de (cicely.de [194.231.9.142]) by mail.du.gtn.com (8.11.0.Beta3/8.11.0.Beta3) with ESMTP id f01NMGH07095 (using TLSv1/SSLv3 with cipher EDH-RSA-DES-CBC3-SHA (168 bits) verified OK); Tue, 2 Jan 2001 00:22:22 +0100 (MET) Received: from cicely5.cicely.de (cicely5.cicely.de [fec0:0:0:104::5]) by mail.cicely.de (8.11.0.Beta1/8.11.0.Beta1) with ESMTP id f01NMNH39105 (using TLSv1/SSLv3 with cipher EDH-RSA-DES-CBC3-SHA (168 bits) verified NO); Tue, 2 Jan 2001 00:22:26 +0100 (CET) Received: (from ticso@localhost) by cicely5.cicely.de (8.11.1/8.11.1) id f01NMNv04526; Tue, 2 Jan 2001 00:22:23 +0100 (CET) (envelope-from ticso) Date: Tue, 2 Jan 2001 00:22:22 +0100 From: Bernd Walter To: Andy Chantrill Cc: isdn@FreeBSD.ORG Subject: Re: isdnd debugging extracts Message-ID: <20010102002222.A4506@cicely5.cicely.de> References: <002701c07435$3eb6a5e0$01010a0a@DEDICATIONINET.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <002701c07435$3eb6a5e0$01010a0a@DEDICATIONINET.local>; from andy@chantrill.freeserve.co.uk on Mon, Jan 01, 2001 at 08:21:15PM -0000 Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Mon, Jan 01, 2001 at 08:21:15PM -0000, Andy Chantrill wrote: > 01.01.2001 20:13:14 DMN i4b isdn daemon started (pid = 265) > 01.01.2001 20:13:25 DBG setup_dialout: entry rbch0 ok! > 01.01.2001 20:13:25 DBG find_by_device_for_dialoutnumber: found entry 0! > 01.01.2001 20:13:25 CHD 00002 rbch0 rate 60 sec/unit (no ratefile) > 01.01.2001 20:13:25 CHD 00002 rbch0 dialing out from 855078 to > 16164208452402620 Are you shure about the number you dial? Seems to be unusual long... > 01.01.2001 20:13:54 DBG find_by_device_for_dialoutnumber: entry 0, cdid in > use > > I can't get PPP to dial out through isdnd ... any clues? -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message From owner-freebsd-isdn Mon Jan 1 23:39:19 2001 From owner-freebsd-isdn@FreeBSD.ORG Mon Jan 1 23:39:17 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from gw2.dnepr.net (CoreGW2-TBone.dnepr.net [195.24.156.97]) by hub.freebsd.org (Postfix) with ESMTP id 08A3D37B400 for ; Mon, 1 Jan 2001 23:39:14 -0800 (PST) Received: from dnepr.net (dnepr.net [195.24.156.98]) by gw2.dnepr.net (8.8.8/8.6.18/01) with ESMTP id JAA16144 for ; Tue, 2 Jan 2001 09:38:55 +0200 (EET) Received: (from land@localhost) by dnepr.net (8.8.8/8.8.8) id JAA18061 for freebsd-isdn@freebsd.org; Tue, 2 Jan 2001 09:38:45 +0200 (EET) X-POP3-RCPT: freebsd-isdn@freebsd.org Date: Tue, 2 Jan 2001 09:38:44 +0200 From: Andrey Lakhno To: freebsd-isdn@freebsd.org Subject: (fwd) 2 Teles PCI cards in one PC Message-ID: <20010102093844.A10729@dnepr.net> Mail-Followup-To: freebsd-isdn@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi ! I encountered with problem. I can't make work two ISDN Teles PCI adapters. When I working only with one of two cards things going ok. When I tried to use second card - computer reboots. Have anyone ever work with two Teles PCI adapters simultaneously ? I use isdnd & userland ppp. Thank you. PS. Some logs from /var/log/messages: Dec 29 17:16:22 radi ppp[303]: Warning: Local: bind: Address alrea dy in use Dec 29 17:16:22 radi ppp[303]: Warning: set server: Failed 4 Dec 29 17:16:28 radi /kernel: i4b-L2 i4b_rxd_ack: ((N(R)-1)=28) != ( UA=29) !!! Dec 29 17:16:47 radi ppp[307]: Warning: Local: bind: Address alrea dy in use Dec 29 17:16:47 radi ppp[307]: Warning: set server: Failed 4 Dec 29 17:16:47 radi /kernel: i4b-L2 F_ILL: FSM function F_ILL execu ting Dec 29 17:16:47 radi /kernel: i4b-L2 i4b_next_l2state: FSM illegal s tate, state = ST_EST_AW_TEI, event = EV_DLESTRQ! Dec 29 17:16:47 radi /kernel: i4b: unit 0, assigned TEI = 78 = 0x4e Dec 29 17:16:48 radi isdnd[288]: DMN date/time from exchange = 0 012291619 Dec 29 17:16:48 radi isdnd[288]: DMN date/time from exchange = 0 012291619 Dec 29 17:16:50 radi ppp[307]: Warning: MPPE: MasterKey is invalid , MPPE is capable only with CHAP81 authen -- Best regards, Andrey To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message From owner-freebsd-isdn Tue Jan 2 0:49: 7 2001 From owner-freebsd-isdn@FreeBSD.ORG Tue Jan 2 00:49:05 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from hcshh.hcs.de (hcshh.hcs.de [194.123.40.1]) by hub.freebsd.org (Postfix) with ESMTP id 0982B37B400 for ; Tue, 2 Jan 2001 00:49:01 -0800 (PST) Received: from hcswork.hcs.de (hcswork.hcs.de [192.76.124.5]) by hcshh.hcs.de (Postfix) with ESMTP id E94605D3E; Tue, 2 Jan 2001 09:48:22 +0100 (CET) Received: by hcswork.hcs.de (Postfix, from userid 200) id ED8243A1; Tue, 2 Jan 2001 09:57:41 +0100 (MET) Subject: Re: (fwd) 2 Teles PCI cards in one PC In-Reply-To: <20010102093844.A10729@dnepr.net> "from Andrey Lakhno at Jan 2, 2001 09:38:44 am" To: Andrey Lakhno Date: Tue, 2 Jan 2001 09:57:41 +0100 (MET) Cc: freebsd-isdn@freebsd.org Reply-To: hm@hcs.de Organization: HCS Hanseatischer Computerservice GmbH X-Mailer: ELM [version 2.4ME+ PL84 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Message-Id: <20010102085741.ED8243A1@hcswork.hcs.de> From: hm@hcs.de (Hellmuth Michaelis) Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org From the keyboard of Andrey Lakhno: > I encountered with problem. I can't make work two ISDN Teles PCI adapters. > When I working only with one of two cards things going ok. I wasn't even aware that the Teles PCI adapters work at all, i have never seen them. How did you configure them, what does the boot messages (-v) say ? hellmuth -- Hellmuth Michaelis Tel +49 40 55 97 47-70 HCS Hanseatischer Computerservice GmbH Fax +49 40 55 97 47-77 Oldesloer Strasse 97-99 Mail hm [at] hcs.de D-22457 Hamburg WWW http://www.hcs.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message From owner-freebsd-isdn Tue Jan 2 1: 4:38 2001 From owner-freebsd-isdn@FreeBSD.ORG Tue Jan 2 01:04:37 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from hcshh.hcs.de (hcshh.hcs.de [194.123.40.1]) by hub.freebsd.org (Postfix) with ESMTP id A8B5137B402 for ; Tue, 2 Jan 2001 01:04:36 -0800 (PST) Received: from hcswork.hcs.de (hcswork.hcs.de [192.76.124.5]) by hcshh.hcs.de (Postfix) with ESMTP id 6E98F5D2C; Tue, 2 Jan 2001 10:03:58 +0100 (CET) Received: by hcswork.hcs.de (Postfix, from userid 200) id 712B93A1; Tue, 2 Jan 2001 10:13:17 +0100 (MET) Subject: Re: isdnd debugging extracts In-Reply-To: <002701c07435$3eb6a5e0$01010a0a@DEDICATIONINET.local> "from Andy Chantrill at Jan 1, 2001 08:21:15 pm" To: Andy Chantrill Date: Tue, 2 Jan 2001 10:13:17 +0100 (MET) Cc: isdn@freebsd.org Reply-To: hm@hcs.de Organization: HCS Hanseatischer Computerservice GmbH X-Mailer: ELM [version 2.4ME+ PL84 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Message-Id: <20010102091317.712B93A1@hcswork.hcs.de> From: hm@hcs.de (Hellmuth Michaelis) Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org From the keyboard of Andy Chantrill: > 01.01.2001 20:13:14 DMN i4b isdn daemon started (pid = 265) > 01.01.2001 20:13:25 DBG setup_dialout: entry rbch0 ok! > 01.01.2001 20:13:25 DBG find_by_device_for_dialoutnumber: found entry 0! > 01.01.2001 20:13:25 CHD 00002 rbch0 rate 60 sec/unit (no ratefile) > 01.01.2001 20:13:25 CHD 00002 rbch0 dialing out from 855078 to > 16164208452402620 > 01.01.2001 20:13:54 DBG find_by_device_for_dialoutnumber: entry 0, cdid in use ^^^^^^^^^^^ The only thing i can probably guess from this is, that another call from a previous isdnd invocation is still active in the kernel. hellmuth -- Hellmuth Michaelis Tel +49 40 55 97 47-70 HCS Hanseatischer Computerservice GmbH Fax +49 40 55 97 47-77 Oldesloer Strasse 97-99 Mail hm [at] hcs.de D-22457 Hamburg WWW http://www.hcs.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message From owner-freebsd-isdn Tue Jan 2 1: 8: 8 2001 From owner-freebsd-isdn@FreeBSD.ORG Tue Jan 2 01:08:06 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from gw2.dnepr.net (CoreGW2-TBone.dnepr.net [195.24.156.97]) by hub.freebsd.org (Postfix) with ESMTP id 2D1B637B400 for ; Tue, 2 Jan 2001 01:08:03 -0800 (PST) Received: from dnepr.net (dnepr.net [195.24.156.98]) by gw2.dnepr.net (8.8.8/8.6.18/01) with ESMTP id LAA08179; Tue, 2 Jan 2001 11:07:39 +0200 (EET) Received: (from land@localhost) by dnepr.net (8.8.8/8.8.8) id LAA07559; Tue, 2 Jan 2001 11:07:20 +0200 (EET) Date: Tue, 2 Jan 2001 11:07:20 +0200 From: Andrey Lakhno To: freebsd-isdn@freebsd.org Cc: hm@hcs.de Subject: Re: 2 Teles PCI cards in one PC Message-ID: <20010102110719.A829@dnepr.net> Mail-Followup-To: freebsd-isdn@freebsd.org, hm@hcs.de References: <20010102093844.A10729@dnepr.net> <20010102085741.ED8243A1@hcswork.hcs.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010102085741.ED8243A1@hcswork.hcs.de>; from hm@hcs.de on Tue, Jan 02, 2001 at 09:57:41 +0100 Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi Hellmuth! On Tue, 02 Jan 2001, Hellmuth Michaelis wrote: > >From the keyboard of Andrey Lakhno: > > > I encountered with problem. I can't make work two ISDN Teles PCI adapters. > > When I working only with one of two cards things going ok. > > I wasn't even aware that the Teles PCI adapters work at all, i have never > seen them. How did you configure them, what does the boot messages (-v) say ? I use patch for i4b 0.96 developed by Sergio de Souza Prallon. Readme file provided with the driver is attached to this letter. Part of kernel config: device itjc0 pseudo-device "i4bq921" pseudo-device "i4bq931" pseudo-device "i4b" pseudo-device "i4btrc" 4 pseudo-device "i4bctl" pseudo-device "i4brbch" 4 dmesg output: itjc0: port 0xd800-0xd8ff mem 0xff9ff000-0xff9fffff irq 9 at device 8.0 on pci2 itjc0: ISAC 2186 Version 1.1 (IOM-2) itjc0: passive stack unit 0 itjc1: port 0xd400-0xd4ff mem 0xff9fe000-0xff9fefff irq 10 at device 9.0 on pci2 itjc1: ISAC 2186 Version 1.1 (IOM-2) itjc1: passive stack unit 1 -- Best regards, Andrey To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message From owner-freebsd-isdn Tue Jan 2 1:38: 5 2001 From owner-freebsd-isdn@FreeBSD.ORG Tue Jan 2 01:38:01 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from gw2.dnepr.net (CoreGW2-TBone.dnepr.net [195.24.156.97]) by hub.freebsd.org (Postfix) with ESMTP id 0EE0F37B400 for ; Tue, 2 Jan 2001 01:37:58 -0800 (PST) Received: from dnepr.net (dnepr.net [195.24.156.98]) by gw2.dnepr.net (8.8.8/8.6.18/01) with ESMTP id LAA15990; Tue, 2 Jan 2001 11:37:33 +0200 (EET) Received: (from land@localhost) by dnepr.net (8.8.8/8.8.8) id LAA12169; Tue, 2 Jan 2001 11:37:27 +0200 (EET) Date: Tue, 2 Jan 2001 11:37:27 +0200 From: Andrey Lakhno To: freebsd-isdn@freebsd.org Cc: hm@hcs.de Subject: Re: 2 Teles PCI cards in one PC Message-ID: <20010102113727.B829@dnepr.net> Mail-Followup-To: freebsd-isdn@freebsd.org, hm@hcs.de References: <20010102093844.A10729@dnepr.net> <20010102085741.ED8243A1@hcswork.hcs.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Kj7319i9nmIyA2yE" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010102085741.ED8243A1@hcswork.hcs.de>; from hm@hcs.de on Tue, Jan 02, 2001 at 09:57:41 +0100 Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org --Kj7319i9nmIyA2yE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Hellmuth! On Tue, 02 Jan 2001, Hellmuth Michaelis wrote: > > I encountered with problem. I can't make work two ISDN Teles PCI adapters. > > When I working only with one of two cards things going ok. > > I wasn't even aware that the Teles PCI adapters work at all, i have never > seen them. How did you configure them, what does the boot messages (-v) say ? I forgot to attach README file to previous letter. -- Best regards, Andrey --Kj7319i9nmIyA2yE Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="README.itjc" A T T E N T I O N = = = = = = = = = THIS IS EXPERIMENTAL SOFTWARE. IT HAS AT LEAST ONE SERIOUS BUG WHICH CAUSES DATA CORRUPTION. THE INTENTION OF PUBLISHING IT AT THIS STAGE IS TO GATHER FEEDBACK FROM SKILLED VOLUNTEERS OUT ON THE NET WHICH ARE WILLING TO HELP US DEBUG THIS DRIVER. THIS IS NOT FOR THE LIGHTHEARTED. 1 - Description This is a driver for passive ISDN cards based on the TJNet Tiger300/320 PCI ASICs/Siemens ISAC ISDN chip combo. It is NOT for AMD based cards. It was developed in a FreeBSD 4.[12].X with versions 0.95 and 0.96 of ISND4BSD. It would be nice if it also worked on NetBSD or OpenBSD but I currently have not the knowledge or the resources to adapt or test it on these platforms; feedback (in the form of docs or patches) is welcome on this subject. I've successfully (in terms, I mean) tested it on a couple of NETJet-S cards equiped with Tiger300 and 320 ASICs. It also worked on a Teles PCI-TJ with Tiger300. I believe it can also work with other TJNet based cards. 2 - The BUG This driver seems to work well with phone or userland PPP. The problem shows up with kernel SPPP (ISP driver) when I try to send large (>200KB) files to a peer which is able to sustain a moderate to high transfer rate. When this happens, small parts of the upstream get replaced by what looks like previously received TCP ACKs after VJ decompression and TCP checksum performed. This garbage has another interesting property: it shows up on tcpdump, which means it is not being (directly) produced by the driver. My guess is that I have a dangling pointer somewhere that corrupted something in the kernel mbuf/if_queues control blocks. Another possibility is that I'm dealing with a race condition of some sort. I do not experience any problems at all while downloading from the net; only the uploads are afected. I have not tested it with IPR or Cisco HDLC: it may also exhibit other bugs with these drivers. 3 - How to install The driver is packaged as a recursive context diff against a vanilla 0.96b I4B distribution (as of 2000.10.10). To install follow theses steps. Create the /usr/local/src/i4b directory and `cd' to it. Unpack the I4B sources. Cd to /usr/local/src. Execute `patch -p < itjc_patches'. Cd to /usr/local/src/i4b/FreeBSD. Follow the instructions there to conclude the installation the usual way. NOTE: If you already have I4B in your kernel config file, be sure to update it from /usr/local/src/i4b/FreeBSD/CONFIG. 4 - Acknowledgements This driver would not exist at all if we didn't receive support from the following people: Hellmuth Michaelis, for writing I4B in the first place, and for providing very useful docs & pointers to get the job started. Hans Petter Selasky, for the software HDLC package and the time & efort spent to adapt it to my peculiar needs. Gary Jennejohn for the IFPI driver which I used as a very handy starting point for ITJC. The gang at Traverse Technologies (http://www.traverse.com.au/), specially Guy Ellis & Mike Woodhams for providing docs & pointers on Tiger ASICs and for sending 2 cards to help development and compatibility tests. 5 - How can you help First, if you live near Victoria (Australia) and have previous experience with I4B, you can help Traverse get their FreeBSD box going. They offered their ISDN benchmarking and certification hardware, but I was unable to use it till now, because I failed in `remote controlling' them in installing the stuff on a machine they have there. They are skilled in network, ISDN & the like but had never used *BSD before; I think that their *ix experience is mostly on Linux but they are willing to learn *BSD also, since they want to support their product on this platform. If you know network driver architecture or I4B from an inside perspective, you can have a look at the driver. Perhaps, I'm doing some silly mistake that someone went over before. Even if you don't have that flash of intuition I'm looking for, sugestions on the design are welcome. Needless to say, bug reports are even more welcome. -- Sergio de Souza Prallon TMP Consultoria S/C Ltda prallon@tmp.com.br --Kj7319i9nmIyA2yE-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message From owner-freebsd-isdn Tue Jan 2 2:52:30 2001 From owner-freebsd-isdn@FreeBSD.ORG Tue Jan 2 02:52:29 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from hcshh.hcs.de (hcshh.hcs.de [194.123.40.1]) by hub.freebsd.org (Postfix) with ESMTP id 5101337B400 for ; Tue, 2 Jan 2001 02:52:29 -0800 (PST) Received: from hcswork.hcs.de (hcswork.hcs.de [192.76.124.5]) by hcshh.hcs.de (Postfix) with ESMTP id E7D865D06; Tue, 2 Jan 2001 11:51:50 +0100 (CET) Received: by hcswork.hcs.de (Postfix, from userid 200) id 276BE34E; Tue, 2 Jan 2001 12:01:10 +0100 (MET) Subject: Re: 2 Teles PCI cards in one PC In-Reply-To: <20010102110719.A829@dnepr.net> "from Andrey Lakhno at Jan 2, 2001 11:07:20 am" To: Andrey Lakhno Date: Tue, 2 Jan 2001 12:01:10 +0100 (MET) Cc: freebsd-isdn@freebsd.org Reply-To: hm@hcs.de Organization: HCS Hanseatischer Computerservice GmbH X-Mailer: ELM [version 2.4ME+ PL84 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Message-Id: <20010102110110.276BE34E@hcswork.hcs.de> From: hm@hcs.de (Hellmuth Michaelis) Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org From the keyboard of Andrey Lakhno: > I use patch for i4b 0.96 developed by Sergio de Souza Prallon. This reminds me :-) to put a link to Sergio's driver on the i4b home page. I wasn't aware that it also supports the Teles card. hellmuth -- Hellmuth Michaelis Tel +49 40 55 97 47-70 HCS Hanseatischer Computerservice GmbH Fax +49 40 55 97 47-77 Oldesloer Strasse 97-99 Mail hm [at] hcs.de D-22457 Hamburg WWW http://www.hcs.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message From owner-freebsd-isdn Tue Jan 2 9:15: 4 2001 From owner-freebsd-isdn@FreeBSD.ORG Tue Jan 2 09:15:02 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from liliput.tmp.com.br (liliput.tmp.com.br [200.244.62.12]) by hub.freebsd.org (Postfix) with ESMTP id C917737B400 for ; Tue, 2 Jan 2001 09:15:00 -0800 (PST) Received: (from prallon@localhost) by liliput.tmp.com.br (8.8.8/8.8.8) id PAA23330; Tue, 2 Jan 2001 15:14:33 -0200 Date: Tue, 2 Jan 2001 15:14:32 -0200 From: Sergio de Souza Prallon To: Andrey Lakhno Cc: freebsd-isdn@freebsd.org Subject: Re: 2 Teles PCI cards in one PC Message-ID: <20010102151432.A21821@tmp.com.br> References: <20010102093844.A10729@dnepr.net> <20010102085741.ED8243A1@hcswork.hcs.de> <20010102110719.A829@dnepr.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20010102110719.A829@dnepr.net>; from land@dnepr.net on Tue, Jan 02, 2001 at 11:07:20AM +0200 X-URL: http://www.tmp.com.br Sender: prallon@liliput.tmp.com.br Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Tue, Jan 02, 2001 at 11:07:20AM +0200, Andrey Lakhno wrote: > Hi Hellmuth! > > On Tue, 02 Jan 2001, Hellmuth Michaelis wrote: > > > >From the keyboard of Andrey Lakhno: > > > > > I encountered with problem. I can't make work two ISDN Teles PCI adapters. > > > When I working only with one of two cards things going ok. > > Hi, I have two cards but only one ISDN line, so I was unable to test the driver with both of them simultaneously. If you have the time & patience to spare I can try to remotely (by email I mean) debug the problem. I've made a new revision of the driver that implements a workaround for the problem stated on the original README file and another one that was causing reboots, but both bugs are related to the kernel SPPP; the userland SPPP seems to have a more robust interface. I'll try to update my web site tonight with this one. I'd like to known if the problem persist. For now, you can post your isdnd.rc & ppp.conf (please remember to wipe out any authentication info). This will give me a better starting point. > > I wasn't even aware that the Teles PCI adapters work at all, i have never > > seen them. How did you configure them, what does the boot messages (-v) say ? > > I use patch for i4b 0.96 developed by Sergio de Souza Prallon. > Readme file provided with the driver is attached to this letter. > Apparently there are 2 kinds of Teles PCI cards. One (PCI-TJ) uses the Tiger ASIC and is supported by my driver. The other is unknown to me. > Part of kernel config: > > device itjc0 > pseudo-device "i4bq921" > pseudo-device "i4bq931" > pseudo-device "i4b" > pseudo-device "i4btrc" 4 > pseudo-device "i4bctl" > pseudo-device "i4brbch" 4 > Looks OK for me. > dmesg output: > > itjc0: port 0xd800-0xd8ff mem 0xff9ff000-0xff9fffff irq 9 at device 8.0 on pci2 > itjc0: ISAC 2186 Version 1.1 (IOM-2) > itjc0: passive stack unit 0 > itjc1: port 0xd400-0xd4ff mem 0xff9fe000-0xff9fefff irq 10 at device 9.0 on pci2 > itjc1: ISAC 2186 Version 1.1 (IOM-2) > itjc1: passive stack unit 1 > Looks OK also (separate I/O space & irq's). []'s -- Prallon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message From owner-freebsd-isdn Tue Jan 2 11:27:53 2001 From owner-freebsd-isdn@FreeBSD.ORG Tue Jan 2 11:27:51 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from mail3.svr.pol.co.uk (mail3.svr.pol.co.uk [195.92.193.19]) by hub.freebsd.org (Postfix) with ESMTP id 623AE37B400 for ; Tue, 2 Jan 2001 11:27:50 -0800 (PST) Received: from modem-169.nitrogen.dialup.pol.co.uk ([62.136.6.169] helo=DEDICATION1) by mail3.svr.pol.co.uk with smtp (Exim 3.13 #0) id 14DX64-0003GK-00 for isdn@freebsd.org; Tue, 02 Jan 2001 19:27:48 +0000 Message-ID: <002901c074f2$16b7dd30$01010a0a@DEDICATIONINET.local> From: "Andy Chantrill" To: Subject: Can't get isdnd werkin' Date: Tue, 2 Jan 2001 19:27:11 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hey, Here's some data printed to the screen just after the login prompt appears: -- i4b-L1-timer3_expired: state = F5 Identifying Input i4b-L1-isic_recover: HSCX B: ISTA = 0x0 i4b-L1-isic_recover: ISAC: ISTA = 0x0 i4b-L1-isic_recover: HSCX B: IMASK = 0x0 i4b-L1-isic_recover: HSCX A: IMASK = 0x0 i4b-L1-isic_recover: ISAC: IMASK = 0x2a i4b-L2-i4b_T202_timeout: unit 0, M202 = 3 i4b-L1-ph_data_reg: still in state F3! i4b-L3-T303_timeout: SETUP not answered, cr = 43 i4b-L3-next_l3state: FSM illegal state, state = ST_OW - Out Wait EST, event = EV_T303EXP - T303 timeout! i4b-L1-timer3_expired: state = F5 identifying input i4b-L1-isic_recover: HSCX B: ISTA = 0x0 i4b-L1-isic_recover: ISAC: ISTA = 0x0 i4b-L1-isic_recover: HSCX B: IMASK = 0x0 i4b-L1-isic_recover: HSCX A: IMASK = 0x0 i4b-L1-isic_recover: ISAC: IMASK = 0x2a -- I compiled the following settings into the kernel: -- #-- ISDN Configuration Block. --# pseudo-device "i4bq921" pseudo-device "i4bq931" pseudo-device "i4b" pseudo-device "i4btrc" 4 pseudo-device "i4bctl" pseudo-device "i4brbch" 4 pseudo-device "i4btel" 4 pseudo-device "i4bipr" 4 pseudo-device "i4bisppp" 4 pseudo-device sppp 4 options IPR_VJ #-- AVM Fritz!Card (BT Speedway). --# options "AVM_A1_PCI" device isic -- Can anyone suggest what might be causing my problems? Thanks, Andy. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message From owner-freebsd-isdn Tue Jan 2 14:21: 0 2001 From owner-freebsd-isdn@FreeBSD.ORG Tue Jan 2 14:20:48 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from gw2.dnepr.net (CoreGW2-TBone.dnepr.net [195.24.156.97]) by hub.freebsd.org (Postfix) with ESMTP id 2697D37B400 for ; Tue, 2 Jan 2001 14:20:44 -0800 (PST) Received: from dnepr.net (dnepr.net [195.24.156.98]) by gw2.dnepr.net (8.8.8/8.6.18/01) with ESMTP id AAA25164; Wed, 3 Jan 2001 00:20:32 +0200 (EET) Received: (from land@localhost) by dnepr.net (8.8.8/8.8.8) id AAA16026; Wed, 3 Jan 2001 00:20:19 +0200 (EET) Date: Wed, 3 Jan 2001 00:20:19 +0200 From: Andrey Lakhno To: prallon@tmp.com.br Cc: freebsd-isdn@FreeBSD.ORG Subject: Re: 2 Teles PCI cards in one PC Message-ID: <20010103002019.A11223@dnepr.net> Mail-Followup-To: prallon@tmp.com.br, freebsd-isdn@FreeBSD.ORG References: <20010102093844.A10729@dnepr.net> <20010102085741.ED8243A1@hcswork.hcs.de> <20010102110719.A829@dnepr.net> <20010102151432.A21821@tmp.com.br> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="vtzGhvizbBRQ85DL" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010102151432.A21821@tmp.com.br>; from prallon@tmp.com.br on Tue, Jan 02, 2001 at 15:14:32 -0200 Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org --vtzGhvizbBRQ85DL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Sergio! On Tue, 02 Jan 2001, Sergio de Souza Prallon wrote: > > > > I encountered with problem. I can't make work two ISDN Teles PCI adapters. > > > > When I working only with one of two cards things going ok. > > > > > Hi, > > I have two cards but only one ISDN line, so I was unable to test the driver > with both of them simultaneously. If you have the time & patience to spare I also have only one ISDN line. But when I try to use one adapter and than another one system panics and reboots. Things doesn't change when i try to use them simultaneously even with one ISDN line. > I can try to remotely (by email I mean) debug the problem. I've made a new > revision of the driver that implements a workaround for the problem stated > on the original README file and another one that was causing reboots, but > both bugs are related to the kernel SPPP; the userland SPPP seems to have > a more robust interface. I'll try to update my web site tonight with this Does kernel sppp supports multilink ppp ? > one. I'd like to known if the problem persist. For now, you can post your > isdnd.rc & ppp.conf (please remember to wipe out any authentication info). > This will give me a better starting point. To this letter attached ppp.conf, isdnd.rc and script of kernel debug session. -- Best regards, Andrey --vtzGhvizbBRQ85DL Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="ppp.conf" default: set speed sync set timeout 0 set authname aname set authkey apasswd set ifaddr 10.0.0.1/0 10.0.0.2/0 0.0.0.0 0.0.0.0 set log Phase Chat LCP IPCP CCP tun command enable lqr set reconnect 3 5 set redial 3 10 set lqrperiod 45 disable pred1 deflate mppe deny pred1 deflate mppe set dial set login set logout set hangup ppp0: set phone 1234567 set device /dev/i4brbch0 /dev/i4brbch1 set mrru 1500 set mru 1504 clone 1,2 link deflink rm link * set mode ddial ppp1: set phone 7654321 set device /dev/i4brbch2 --vtzGhvizbBRQ85DL Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="kdebug.log" Content-Transfer-Encoding: quoted-printable GNU gdb 4.18=0D Copyright 1998 Free Software Foundation, Inc.=0D GDB is free software, covered by the GNU General Public License, and you ar= e=0D welcome to change it and/or distribute copies of it under certain condition= s.=0D Type "show copying" to see the conditions.=0D There is absolutely no warranty for GDB. Type "show warranty" for details.= =0D This GDB was configured as "i386-unknown-freebsd"...=0D IdlePTD 2879488=0D initial pcb at 243100=0D panicstr: page fault=0D panic messages:=0D ---=0D Fatal trap 12: page fault while in kernel mode=0D fault virtual address =3D 0x0=0D fault code =3D supervisor read, page not present=0D instruction pointer =3D 0x8:0xc01eec30=0D stack pointer =3D 0x10:0xc0225db4=0D frame pointer =3D 0x10:0xc0225de8=0D code segment =3D base 0x0, limit 0xfffff, type 0x1b=0D =3D DPL 0, pres 1, def32 1, gran 1=0D processor eflags =3D interrupt enabled, resume, IOPL =3D 0=0D current process =3D Idle=0D interrupt mask =3D net =0D trap number =3D 12=0D panic: page fault=0D =0D syncing disks... =0D =0D Fatal trap 12: page fault while in kernel mode=0D fault virtual address =3D 0x30=0D fault code =3D supervisor read, page not present=0D instruction pointer =3D 0x8:0xc019c468=0D stack pointer =3D 0x10:0xc0225bac=0D frame pointer =3D 0x10:0xc0225bb0=0D code segment =3D base 0x0, limit 0xfffff, type 0x1b=0D =3D DPL 0, pres 1, def32 1, gran 1=0D processor eflags =3D interrupt enabled, resume, IOPL =3D 0=0D current process =3D Idle=0D interrupt mask =3D net bio cam =0D trap number =3D 12=0D panic: page fault=0D Uptime: 3m41s=0D =0D dumping to dev #ad/0x20001, offset 792273=0D dump ata0: resetting devices .. done=0D 127 126 125 124 123 122 121 120 119 118 117 116 115 114 113 112 111 110 109= 108 107 106 105 104 103 102 101 100 99 98 97 96 95 94 93 92 91 90 89 88 87= 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62= 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37= 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12= 11 10 9 8 7 6 5 4 3 2 1 0 =0D ---=0D #0 dumpsys () at ../../kern/kern_shutdown.c:469=0D 469 if (dumping++) {=0D (kgdb) bt=0D #0 dumpsys () at ../../kern/kern_shutdown.c:469=0D #1 0xc013f437 in boot (howto=3D260) at ../../kern/kern_shutdown.c:309=0D #2 0xc013f7b4 in poweroff_wait (junk=3D0xc021c12f, howto=3D0)=0D at ../../kern/kern_shutdown.c:556=0D #3 0xc01e6079 in trap_fatal (frame=3D0xc0225b6c, eva=3D48)=0D at ../../i386/i386/trap.c:951=0D #4 0xc01e5d51 in trap_pfault (frame=3D0xc0225b6c, usermode=3D0, eva=3D48)= =0D at ../../i386/i386/trap.c:844=0D #5 0xc01e590b in trap (frame=3D{tf_fs =3D 6684688, tf_es =3D -1071513584, = =0D tf_ds =3D -1057226736, tf_edi =3D 0, tf_esi =3D -1057203456, =0D tf_ebp =3D -1071490128, tf_isp =3D -1071490152, tf_ebx =3D -107142589= 2, =0D tf_edx =3D 6832128, tf_ecx =3D -908380736, tf_eax =3D 0, tf_trapno = =3D 12, =0D tf_err =3D 0, tf_eip =3D -1072053144, tf_cs =3D 8, tf_eflags =3D 6605= 4, =0D tf_esp =3D -1057203456, tf_ss =3D -1071490096}) at ../../i386/i386/tr= ap.c:443=0D #6 0xc019c468 in acquire_lock (lk=3D0xc023569c)=0D at ../../ufs/ffs/ffs_softdep.c:268=0D #7 0xc01a021c in softdep_update_inodeblock (ip=3D0xc0fc5b00, bp=3D0xc38261= 50, =0D waitfor=3D0) at ../../ufs/ffs/ffs_softdep.c:3643=0D #8 0xc019b745 in ffs_update (vp=3D0xc9db35c0, waitfor=3D0)=0D at ../../ufs/ffs/ffs_inode.c:106=0D #9 0xc01a4aed in ffs_fsync (ap=3D0xc0225c5c) at ../../ufs/ffs/ffs_vnops.c:= 273=0D #10 0xc01a3453 in ffs_sync (mp=3D0xc0f09c00, waitfor=3D2, cred=3D0xc0731680= , =0D p=3D0xc0257be0) at vnode_if.h:537=0D #11 0xc016cd53 in sync (p=3D0xc0257be0, uap=3D0x0) at ../../kern/vfs_syscal= ls.c:545=0D ---Type to continue, or q to quit--- =08 =08=0D #12 0xc013f20a in boot (howto=3D256) at ../../kern/kern_shutdown.c:233=0D #13 0xc013f7b4 in poweroff_wait (junk=3D0xc021c12f, howto=3D0)=0D at ../../kern/kern_shutdown.c:556=0D #14 0xc01e6079 in trap_fatal (frame=3D0xc0225d74, eva=3D0)=0D at ../../i386/i386/trap.c:951=0D #15 0xc01e5d51 in trap_pfault (frame=3D0xc0225d74, usermode=3D0, eva=3D0)=0D at ../../i386/i386/trap.c:844=0D #16 0xc01e590b in trap (frame=3D{tf_fs =3D 16, tf_es =3D -1072168944, =0D tf_ds =3D -1066205168, tf_edi =3D -1058324004, tf_esi =3D -1058324004= , =0D tf_ebp =3D -1071489560, tf_isp =3D -1071489632, tf_ebx =3D -105832448= 0, =0D tf_edx =3D -1071489516, tf_ecx =3D -1058324004, tf_eax =3D 0, tf_trap= no =3D 12, =0D tf_err =3D 0, tf_eip =3D -1071715280, tf_cs =3D 8, tf_eflags =3D 6611= 8, =0D tf_esp =3D -1058324480, tf_ss =3D 21249}) at ../../i386/i386/trap.c:4= 43=0D #17 0xc01eec30 in itjc_get_tx_mbuf (sc=3D0xc0eb4000, chan=3D0xc0eb41dc, =0D src_p=3D0xc0225e14, which=3DITJC_MB_CURR)=0D at ../../i4b/layer1/itjc/i4b_itjc_pci.c:894=0D #18 0xc01ef8a2 in itjc_dma_tx_intr (sc=3D0xc0eb4000, chan=3D0xc0eb41dc, =0D ctx=3D0xc0259ae0) at ../../i4b/layer1/itjc/i4b_itjc_pci.c:1351=0D #19 0xc01f00c6 in itjc_intr (xsc=3D0xc0eb4000)=0D at ../../i4b/layer1/itjc/i4b_itjc_pci.c:1796=0D (kgdb) up 17=0D #17 0xc01eec30 in itjc_get_tx_mbuf (sc=3D0xc0eb4000, chan=3D0xc0eb41dc, =0D src_p=3D0xc0225e14, which=3DITJC_MB_CURR)=0D at ../../i4b/layer1/itjc/i4b_itjc_pci.c:894=0D 894 (*chan->isic_drvr_linktab->bch_tx_queue_empty)=0D (kgdb) list=0D 889 chan->out_mbuf_cur_ptr =3D *src_p =3D NULL;=0D 890 chan->out_mbuf_cur_len =3D 0;=0D 891 =0D 892 chan->state &=3D ~(HSCX_TX_ACTIVE);=0D 893 =0D 894 (*chan->isic_drvr_linktab->bch_tx_queue_empty)=0D 895 (chan->isic_drvr_linktab->unit);=0D 896 =0D 897 return 0;=0D 898 }=0D (kgdb) down=0D #16 0xc01e590b in trap (frame=3D{tf_fs =3D 16, tf_es =3D -1072168944, =0D tf_ds =3D -1066205168, tf_edi =3D -1058324004, tf_esi =3D -1058324004= , =0D tf_ebp =3D -1071489560, tf_isp =3D -1071489632, tf_ebx =3D -105832448= 0, =0D tf_edx =3D -1071489516, tf_ecx =3D -1058324004, tf_eax =3D 0, tf_trap= no =3D 12, =0D tf_err =3D 0, tf_eip =3D -1071715280, tf_cs =3D 8, tf_eflags =3D 6611= 8, =0D tf_esp =3D -1058324480, tf_ss =3D 21249}) at ../../i386/i386/trap.c:4= 43=0D 443 (void) trap_pfault(&frame, FALSE, eva);=0D (kgdb) list=0D 438 kernel_trap:=0D 439 /* kernel trap */=0D 440 =0D 441 switch (type) {=0D 442 case T_PAGEFLT: /* page fault */=0D 443 (void) trap_pfault(&frame, FALSE, eva);=0D 444 return;=0D 445 =0D 446 case T_DNA:=0D 447 #if NNPX > 0=0D (kgdb) up 2=0D #18 0xc01ef8a2 in itjc_dma_tx_intr (sc=3D0xc0eb4000, chan=3D0xc0eb41dc, =0D ctx=3D0xc0259ae0) at ../../i4b/layer1/itjc/i4b_itjc_pci.c:1351=0D 1351 len =3D itjc_get_tx_mbuf(sc, chan, &src, ITJC_MB_CURR);=0D (kgdb) list=0D 1346 }=0D 1347 =0D 1348 ring =3D ctx->ring;=0D 1349 filled =3D ctx->filled;=0D 1350 =0D 1351 len =3D itjc_get_tx_mbuf(sc, chan, &src, ITJC_MB_CURR);=0D 1352 =0D 1353 if (len =3D=3D 0 && filled >=3D ITJC_RING_WORDS)=0D 1354 return;=0D 1355 =0D (kgdb) up=0D #19 0xc01f00c6 in itjc_intr (xsc=3D0xc0eb4000)=0D at ../../i4b/layer1/itjc/i4b_itjc_pci.c:1796=0D 1796 itjc_dma_tx_intr(sc, chan, txc);=0D (kgdb) list=0D 1791 itjc_write_1(TIGER_INT0_STATUS, TIGER_TARGET_ABORT_INT=0D 1792 | TIGER_MASTER_ABORT_INT | TIGER_RD_END_INT=0D 1793 | TIGER_RD_INT_INT | TIGER_WR_END_INT | TIGER_WR_INT_INT);=0D 1794 =0D 1795 itjc_dma_rx_intr(sc, chan, rxc);=0D 1796 itjc_dma_tx_intr(sc, chan, txc);=0D 1797 =0D 1798 ++chan; ++rxc; ++txc;=0D 1799 =0D 1800 itjc_dma_rx_intr(sc, chan, rxc);=0D (kgdb) up=0D Initial frame selected; you cannot go up.=0D (kgdb) list=0D 1801 itjc_dma_tx_intr(sc, chan, txc);=0D 1802 }=0D 1803 =0D 1804 =0D 1805 /*--------------------------------------------------------------------= -------*=0D 1806 * itjc_bchannel_setup - (Re)initialize and start/stop a Bchannel.=0D 1807 *--------------------------------------------------------------------= -------*/=0D 1808 static void=0D 1809 itjc_bchannel_setup(int unit, int h_chan, int bprot, int activate)=0D 1810 {=0D (kgdb) quit=0D --vtzGhvizbBRQ85DL Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="isdnd.rc" system acctall = on # generate info for everything acctfile = /var/log/isdnd.acct # name & location of accounting file useacctfile = yes # generate accouting info to file beepconnect = on isdntime = on monitor-allowed = yes # global switch: monitor on/off monitor-port = 451 # default monitor TCP port monitor = "/var/run/isdn-monitor" monitor-access = fullcmd monitor-access = channelstate, logevents monitor-access = callin, callout ratesfile = /etc/isdn/isdnd.rates # name & location of rates file rtprio = 25 # modify isdnd's process priority #============================================================================== # entry section I4BPPP0 #============================================================================== entry name = I4BPPP0 usrdevicename = rbch # ipr, isp, tel, rbch usrdeviceunit = 0 # unit number isdncontroller = 0 #contoller to use or -1 to use any isdnchannel = 1 #channel (1/2) to use or 0 or -1 for any direction = out # in, out, inout local-phone-dialout = 56789 remote-phone-dialout = 1234567 remdial-handling = first # first, last or next dialin-reaction = reject # accept,reject,ignore, answer, callback dialout-type = normal # normal / calledback callbackwait = 1 # no of secs to wait before calling back b1protocol = hdlc # hdlc, raw ratetype = 0 # ratesfile entry to use unitlength = 90 # unitlength to assume unitlengthsrc = rate # none, rate, cmdl, conf, aocd idletime-incoming = 120 # incoming call idle timeout idletime-outgoing = 30 # outgoing call idle timeout earlyhangup = 5 dialretries = 3 # # of dial retries dialrandincr = off # random dial increment time recoverytime = 5 # time to wait between 2 dial tries usedown = off # set i/f down downtries = 5 # retry cycles before set down downtime = 30 # time to be in down before going up #============================================================================== # entry section I4BPPP1 #============================================================================== entry name = I4BPPP1 usrdevicename = rbch # ipr, isp, tel, rbch usrdeviceunit = 1 # unit number isdncontroller = 0 #contoller to use or -1 to use any isdnchannel = 2 #channel (1/2) to use or 0 or -1 for any direction = out # in, out, inout local-phone-dialout = 56789 remote-phone-dialout = 1234567 remdial-handling = first # first, last or next dialin-reaction = reject # accept,reject,ignore, answer, callback dialout-type = normal # normal / calledback callbackwait = 1 # no of secs to wait before calling back b1protocol = hdlc # hdlc, raw ratetype = 0 # ratesfile entry to use unitlength = 90 # unitlength to assume unitlengthsrc = rate # none, rate, cmdl, conf, aocd idletime-incoming = 120 # incoming call idle timeout idletime-outgoing = 30 # outgoing call idle timeout earlyhangup = 5 dialretries = 3 # # of dial retries dialrandincr = off # random dial increment time recoverytime = 5 # time to wait between 2 dial tries usedown = off # set i/f down downtries = 5 # retry cycles before set down downtime = 30 # time to be in down before going up #============================================================================== # entry section I4BPPP2 #============================================================================== entry name = I4BPPP2 usrdevicename = rbch # ipr, isp, tel, rbch usrdeviceunit = 2 # unit number isdncontroller = 1 #contoller to use or -1 to use any isdnchannel = 1 #channel (1/2) to use or 0 or -1 for any direction = out # in, out, inout local-phone-dialout = 567890 remote-phone-dialout = 7654321 remdial-handling = first # first, last or next dialin-reaction = reject # accept,reject,ignore, answer, callback dialout-type = normal # normal / calledback callbackwait = 1 # no of secs to wait before calling back b1protocol = hdlc # hdlc, raw ratetype = 0 # ratesfile entry to use unitlength = 90 # unitlength to assume unitlengthsrc = rate # none, rate, cmdl, conf, aocd idletime-incoming = 120 # incoming call idle timeout idletime-outgoing = 30 # outgoing call idle timeout earlyhangup = 5 dialretries = 3 # # of dial retries dialrandincr = off # random dial increment time recoverytime = 5 # time to wait between 2 dial tries usedown = off # set i/f down downtries = 5 # retry cycles before set down downtime = 30 # time to be in down before going up #============================================================================== # entry section I4BPPP3 #============================================================================== entry name = I4BPPP3 usrdevicename = rbch # ipr, isp, tel, rbch usrdeviceunit = 3 # unit number isdncontroller = 1 #contoller to use or -1 to use any isdnchannel = 2 #channel (1/2) to use or 0 or -1 for any direction = out # in, out, inout local-phone-dialout = 567890 remote-phone-dialout = 7654321 remdial-handling = first # first, last or next dialin-reaction = reject # accept,reject,ignore, answer, callback dialout-type = normal # normal / calledback callbackwait = 1 # no of secs to wait before calling back b1protocol = hdlc # hdlc, raw ratetype = 0 # ratesfile entry to use unitlength = 90 # unitlength to assume unitlengthsrc = rate # none, rate, cmdl, conf, aocd idletime-incoming = 120 # incoming call idle timeout idletime-outgoing = 30 # outgoing call idle timeout earlyhangup = 5 dialretries = 3 # # of dial retries dialrandincr = off # random dial increment time recoverytime = 5 # time to wait between 2 dial tries usedown = off # set i/f down downtries = 5 # retry cycles before set down downtime = 30 # time to be in down before going up --vtzGhvizbBRQ85DL-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message From owner-freebsd-isdn Wed Jan 3 9:10:51 2001 From owner-freebsd-isdn@FreeBSD.ORG Wed Jan 3 09:09:54 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from liliput.tmp.com.br (liliput.tmp.com.br [200.244.62.12]) by hub.freebsd.org (Postfix) with ESMTP id 2F5DD37B402 for ; Wed, 3 Jan 2001 09:09:46 -0800 (PST) Received: (from prallon@localhost) by liliput.tmp.com.br (8.8.8/8.8.8) id PAA20068 for freebsd-isdn@freebsd.org; Wed, 3 Jan 2001 15:09:43 -0200 Resent-Message-Id: <200101031709.PAA20068@liliput.tmp.com.br> Received: (from prallon@localhost) by liliput.tmp.com.br (8.8.8/8.8.8) id PAA20025; Wed, 3 Jan 2001 15:08:32 -0200 Date: Wed, 3 Jan 2001 15:08:32 -0200 From: Sergio de Souza Prallon To: Andrey Lakhno Cc: freebsd-isdn@FreeBSD.OR Subject: Re: 2 Teles PCI cards in one PC Message-ID: <20010103150832.A19526@tmp.com.br> References: <20010102093844.A10729@dnepr.net> <20010102085741.ED8243A1@hcswork.hcs.de> <20010102110719.A829@dnepr.net> <20010102151432.A21821@tmp.com.br> <20010103002019.A11223@dnepr.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="LZvS9be/3tNcYl/X" X-Mailer: Mutt 1.0i In-Reply-To: <20010103002019.A11223@dnepr.net>; from land@dnepr.net on Wed, Jan 03, 2001 at 12:20:19AM +0200 X-URL: http://www.tmp.com.br Resent-From: prallon@tmp.com.br Resent-Date: Wed, 3 Jan 2001 15:09:43 -0200 Resent-To: freebsd-isdn@freebsd.org Resent-Sender: prallon@liliput.tmp.com.br Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org --LZvS9be/3tNcYl/X Content-Type: text/plain; charset=us-ascii On Wed, Jan 03, 2001 at 12:20:19AM +0200, Andrey Lakhno wrote: > Hi Sergio! > Hi Andrey, > > Does kernel sppp supports multilink ppp ? > No. It's simpler than the userland one. I believe, however, it's lighter than the later. > > To this letter attached ppp.conf, isdnd.rc and script of kernel debug session. > Many thanks for the GDB output. Now I know I really need a second machine... 8-) I didn't update the web site yet, because I didn't finish a last minute patch to the kernel SPPP driver. Anyway, please try to substitute the file i4b_itjc_pci.c you have with the one attached on this mail. It's a `release candidate' for the beta version of the driver. I successfully established a ML-PPP connection to my ISP using a channel in each of my two cards. Let me know if it works. Regards, -- Prallon --LZvS9be/3tNcYl/X Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="i4b_itjc_pci.c" /* * Copyright (c) 2000, 2001 Sergio Prallon. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the author nor the names of any co-contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * 4. Altered versions must be plainly marked as such, and must not be * misrepresented as being the original software and/or documentation. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * *--------------------------------------------------------------------------- * * i4b_itjc_pci.c: NetJet-S hardware driver * ---------------------------------------- * * $Id: i4b_itjc_pci.c,v 1.2 2001/01/03 14:35:53 root Exp root $ * * $FreeBSD$ * * last edit-date: [] * *---------------------------------------------------------------------------*/ #include "itjc.h" #include "opt_i4b.h" #include "pci.h" #if (NITJC > 0) #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define PCI_TJNET_VID (0xe159) #define PCI_TJ300_DID (0x0001) #if defined(ITJC_VJ_WORKAROUND) /* * We need to reserve this amount of memory before the start of data * when allocating an mbuf for receiving. This is taken as granted * by sl_uncompress. */ # define ITJC_VJ_HDR (128) # define ITJC_MAX_RAW_LEN (BCH_MAX_DATALEN) # define ITJC_MAX_HDLC_LEN (BCH_MAX_DATALEN - ITJC_VJ_HDR) #else # define ITJC_MAX_RAW_LEN (BCH_MAX_DATALEN) # define ITJC_MAX_HDLC_LEN (BCH_MAX_DATALEN) #endif /* * Function prototypes */ static int itjc_probe(device_t dev); static int itjc_attach(device_t dev); static void itjc_shutdown(device_t dev); static void itjc_intr(void *xsc); static int itjc_dma_start(struct l1_softc *sc); static void itjc_dma_stop(struct l1_softc *sc); static void itjc_isac_intr(struct l1_softc *sc); static void itjc_init_linktab(struct l1_softc *sc); static void itjc_bchannel_setup(int unit, int h_chan, int bprot, int activate); static void itjc_bchannel_stat(int unit, int h_chan, bchan_statistics_t *bsp); /* * Shorter names to bus resource manager routines. */ #define itjc_bus_setup(sc) \ bus_space_handle_t h = \ rman_get_bushandle((sc)->sc_resources.io_base[0]); \ bus_space_tag_t t = \ rman_get_bustag((sc)->sc_resources.io_base[0]); #define itjc_read_1(port) (bus_space_read_1(t, h, (port))) #define itjc_read_4(port) (bus_space_read_4(t, h, (port))) #define itjc_write_1(port, data) (bus_space_write_1(t, h, (port), (data))) #define itjc_write_4(port, data) (bus_space_write_4(t, h, (port), (data))) #define itjc_read_multi_1(port, buf, size) \ (bus_space_read_multi_1(t, h, (port), (buf), (size))) #define itjc_write_multi_1(port, buf, size) \ (bus_space_write_multi_1(t, h, (port), (buf), (size))) /*---------------------------------------------------------------------------* * Glue data to register ourselves as a PCI device driver. *---------------------------------------------------------------------------*/ static device_method_t itjc_pci_methods[] = { /* Device interface */ DEVMETHOD(device_probe, itjc_probe), DEVMETHOD(device_attach, itjc_attach), DEVMETHOD(device_shutdown, itjc_shutdown), /* bus interface */ DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_driver_added, bus_generic_driver_added), { 0, 0 } }; static driver_t itjc_pci_driver = { "itjc", itjc_pci_methods, sizeof(struct l1_softc) }; static devclass_t itjc_pci_devclass; DRIVER_MODULE(netjet, pci, itjc_pci_driver, itjc_pci_devclass, 0, 0); /* * Jump table for multiplex routines. */ struct i4b_l1mux_func itjc_l1mux_func = { itjc_ret_linktab, itjc_set_linktab, itjc_mph_command_req, itjc_ph_data_req, itjc_ph_activate_req, }; struct l1_softc *itjc_scp[ITJC_MAXUNIT]; /*---------------------------------------------------------------------------* * Tiger300/320 PCI ASIC registers. *---------------------------------------------------------------------------*/ /* * Register offsets from i/o base. */ enum tiger_regs { TIGER_RESET_PIB_CL_TIME = 0x00, TIGER_DMA_OPER = 0x01, TIGER_AUX_PORT_CNTL = 0x02, TIGER_AUX_PORT_DATA = 0x03, TIGER_INT0_MASK = 0x04, TIGER_INT1_MASK = 0x05, TIGER_INT0_STATUS = 0x06, TIGER_INT1_STATUS = 0x07, TIGER_DMA_WR_START_ADDR = 0x08, TIGER_DMA_WR_INT_ADDR = 0x0C, TIGER_DMA_WR_END_ADDR = 0x10, TIGER_DMA_WR_CURR_ADDR = 0x14, TIGER_DMA_RD_START_ADDR = 0x18, TIGER_DMA_RD_INT_ADDR = 0x1C, TIGER_DMA_RD_END_ADDR = 0x20, TIGER_DMA_RD_CURR_ADDR = 0x24, TIGER_PULSE_COUNTER = 0x28, }; /* * Bits on the above registers. */ enum tiger_reg_bits { /* Reset and PIB Cycle Timing */ TIGER_DMA_OP_MODE_MASK = 0x80, TIGER_SELF_ADDR_DMA = 0x00, /* Wrap around ending addr */ TIGER_NORMAL_DMA = 0x80, /* Stop at ending addr */ TIGER_DMA_INT_MODE_MASK = 0x40, TIGER_DONT_LATCH_DMA_INT= 0x00, /* Bits on int0 status will be set only while curr addr equals int or end addr */ TIGER_LATCH_DMA_INT = 0x40, /* Bits on int0 status remain set until cleared by CPU */ TIGER_PIB_CYCLE_TIMING_MASK = 0x30, TIGER_PIB_3_CYCLES = 0x00, TIGER_PIB_5_CYCLES = 0x01, TIGER_PIB_12_CYCLES = 0x10, TIGER_RESET_MASK = 0x0F, TIGER_RESET_PULSE_COUNT = 0x08, TIGER_RESET_SERIAL_PORT = 0x04, TIGER_RESET_DMA_LOGIC = 0x02, TIGER_RESET_EXTERNAL = 0x01, TIGER_RESET_ALL = 0x0F, /* DMA Operation */ TIGER_DMA_RESTART_MASK = 0x02, TIGER_HOLD_DMA = 0x00, TIGER_RESTART_DMA = 0x00, TIGER_DMA_ENABLE_MASK = 0x01, TIGER_ENABLE_DMA = 0x01, TIGER_DISABLE_DMA = 0x00, /* AUX Port Control & Data plus Interrupt 1 Mask & Status */ TIGER_AUX_7_MASK = 0x80, TIGER_AUX_6_MASK = 0x40, TIGER_AUX_5_MASK = 0x20, TIGER_AUX_4_MASK = 0x10, TIGER_ISAC_INT_MASK = 0x10, TIGER_AUX_3_MASK = 0x08, TIGER_AUX_2_MASK = 0x04, TIGER_AUX_1_MASK = 0x02, TIGER_AUX_0_MASK = 0x01, /* AUX Port Control */ TIGER_AUX_7_IS_INPUT = 0x00, TIGER_AUX_7_IS_OUTPUT = 0x80, TIGER_AUX_6_IS_INPUT = 0x00, TIGER_AUX_6_IS_OUTPUT = 0x40, TIGER_AUX_5_IS_INPUT = 0x00, TIGER_AUX_5_IS_OUTPUT = 0x20, TIGER_AUX_4_IS_INPUT = 0x00, TIGER_AUX_4_IS_OUTPUT = 0x10, TIGER_AUX_3_IS_INPUT = 0x00, TIGER_AUX_3_IS_OUTPUT = 0x80, TIGER_AUX_2_IS_INPUT = 0x00, TIGER_AUX_2_IS_OUTPUT = 0x40, TIGER_AUX_1_IS_INPUT = 0x00, TIGER_AUX_1_IS_OUTPUT = 0x20, TIGER_AUX_0_IS_INPUT = 0x00, TIGER_AUX_0_IS_OUTPUT = 0x10, TIGER_AUX_NJ_DEFAULT = 0xEF, /* All but ISAC int is output */ /* Interrupt 0 Mask & Status */ TIGER_PCI_TARGET_ABORT_INT_MASK = 0x20, TIGER_NO_TGT_ABORT_INT = 0x00, TIGER_TARGET_ABORT_INT = 0x20, TIGER_PCI_MASTER_ABORT_INT_MASK = 0x10, TIGER_NO_MST_ABORT_INT = 0x00, TIGER_MASTER_ABORT_INT = 0x10, TIGER_DMA_RD_END_INT_MASK = 0x08, TIGER_NO_RD_END_INT = 0x00, TIGER_RD_END_INT = 0x08, TIGER_DMA_RD_INT_INT_MASK = 0x04, TIGER_NO_RD_INT_INT = 0x00, TIGER_RD_INT_INT = 0x04, TIGER_DMA_WR_END_INT_MASK = 0x02, TIGER_NO_WR_END_INT = 0x00, TIGER_WR_END_INT = 0x02, TIGER_DMA_WR_INT_INT_MASK = 0x01, TIGER_NO_WR_INT_INT = 0x00, TIGER_WR_INT_INT = 0x01, /* Interrupt 1 Mask & Status */ TIGER_NO_AUX_7_INT = 0x00, TIGER_AUX_7_INT = 0x80, TIGER_NO_AUX_6_INT = 0x00, TIGER_AUX_6_INT = 0x40, TIGER_NO_AUX_5_INT = 0x00, TIGER_AUX_5_INT = 0x20, TIGER_NO_AUX_4_INT = 0x00, TIGER_AUX_4_INT = 0x10, TIGER_NO_ISAC_INT = 0x00, TIGER_ISAC_INT = 0x10, TIGER_NO_AUX_3_INT = 0x00, TIGER_AUX_3_INT = 0x08, TIGER_NO_AUX_2_INT = 0x00, TIGER_AUX_2_INT = 0x04, TIGER_NO_AUX_1_INT = 0x00, TIGER_AUX_1_INT = 0x02, TIGER_NO_AUX_0_INT = 0x00, TIGER_AUX_0_INT = 0x01 }; /* * Peripheral Interface Bus definitions. This is an ISA like bus * created by the Tiger ASIC to keep ISA chips like the ISAC happy * on a PCI environment. * * Since the PIB only supplies 4 addressing lines, the 2 higher bits * (A4 & A5) of the ISAC register addresses are wired on the 2 lower * AUX lines. Another restriction is that all I/O to the PIB (8bit * wide) is mapped on the PCI side as 32bit data. So the PCI address * of a given ISAC register has to be multiplied by 4 before being * added to the PIB base offset. */ enum tiger_pib_regs_defs { /* Offset from the I/O base to the ISAC registers. */ PIB_OFFSET = 0xC0, PIB_LO_ADDR_MASK = 0x0F, PIB_HI_ADDR_MASK = 0x30, PIB_LO_ADDR_SHIFT = 2, /* Align on dword boundary */ PIB_HI_ADDR_SHIFT = 4 /* Right shift to AUX_1 & AUX_0 */ }; #define itjc_set_pib_addr_msb(a) \ ( \ itjc_write_1(TIGER_AUX_PORT_DATA, \ ((a) & PIB_HI_ADDR_MASK) >> PIB_HI_ADDR_SHIFT) \ ) #define itjc_pib_2_pci(a) \ ( \ (((a) & PIB_LO_ADDR_MASK) << PIB_LO_ADDR_SHIFT) + PIB_OFFSET \ ) #define itjc_get_dma_offset(ctx,reg) \ ( \ (u_int16_t)((bus_addr_t)itjc_read_4((reg)) - (ctx)->bus_addr) \ ) /* * IOM-2 serial channel 0 DMA data ring buffers. * * The Tiger300/320 ASIC do not nothing more than transfer via DMA the * first 32 bits of every IOM-2 frame on the serial interface to the * ISAC. So we have no framing/deframing facilities like we would have * with an HSCX, having to do the job with CPU cycles. On the plus side * we are able to specify large rings which can limit the occurrence of * over/underruns. */ enum { ITJC_RING_SLOT_WORDS = 64, ITJC_RING_WORDS = 3 * ITJC_RING_SLOT_WORDS, ITJC_RING_SLOT_BYTES = 4 * ITJC_RING_SLOT_WORDS, ITJC_RING_BYTES = 4 * ITJC_RING_WORDS, ITJC_DMA_POOL_WORDS = 2 * ITJC_RING_WORDS, ITJC_DMA_POOL_BYTES = 4 * ITJC_DMA_POOL_WORDS }; #define itjc_ring_add(x, d) (((x) + 4 * (d)) % ITJC_RING_BYTES) #define itjc_ring_sub(x, d) (((x) + ITJC_RING_BYTES - 4 * (d)) \ % ITJC_RING_BYTES) enum { TIGER_CH_A = 0, TIGER_CH_B = 1, HSCX_CH_A = 0, /* For compatibility reasons. */ HSCX_CH_B = 1, }; enum { ITJC_TEL_SILENCE_BYTE = 0x00, ITJC_HDLC_FLAG_BYTE = 0x7E, ITJC_HDLC_ABORT_BYTE = 0xFF }; /* * Hardware DMA control block (one per card). */ typedef enum { ITJC_DS_LOAD_FAILED = -1, ITJC_DS_FREE = 0, ITJC_DS_LOADING, ITJC_DS_STOPPED, ITJC_DS_RUNNING } dma_state_t; typedef struct { dma_state_t state; u_int8_t *pool; bus_addr_t bus_addr; bus_dma_tag_t tag; bus_dmamap_t map; int error; } dma_context_t; dma_context_t dma_context [ ITJC_MAXUNIT ]; /* * B-channel DMA control blocks (4 per card -- 1 RX & 1 TX per channel). */ typedef enum { ITJC_RS_IDLE = 0, ITJC_RS_ACTIVE } dma_rx_state_t; typedef enum { ITJC_TS_IDLE = 0, ITJC_TS_ACTIVE, ITJC_TS_AFTER_XDU } dma_tx_state_t; typedef struct { u_int8_t *ring; bus_addr_t bus_addr; u_int16_t next_read; u_int16_t hdlc_len; u_int16_t hdlc_tmp; u_int16_t hdlc_crc; u_int16_t hdlc_ib; u_int8_t hdlc_blevel; u_int8_t hdlc_flag; dma_rx_state_t state; } dma_rx_context_t; typedef struct { u_int8_t *ring; bus_addr_t bus_addr; u_int16_t next_write; u_int32_t hdlc_tmp; u_int16_t hdlc_blevel; u_int16_t hdlc_crc; u_int16_t hdlc_ib; u_int16_t next_frame; u_int16_t filled; u_int8_t hdlc_flag; dma_tx_state_t state; } dma_tx_context_t; dma_rx_context_t dma_rx_context [ ITJC_MAXUNIT ] [ 2 ]; dma_tx_context_t dma_tx_context [ ITJC_MAXUNIT ] [ 2 ]; /* * Used by the mbuf handling functions. */ typedef enum { ITJC_MB_CURR = 0, ITJC_MB_NEXT = 1, ITJC_MB_NEW = 2 } which_mb_t; /*---------------------------------------------------------------------------* * itjc_map_callback - get DMA bus address from resource mgr. *---------------------------------------------------------------------------*/ static void itjc_map_callback(void *arg, bus_dma_segment_t *segs, int nseg, int error) { dma_context_t *ctx = (dma_context_t *)arg; if (error) { ctx->error = error; ctx->state = ITJC_DS_LOAD_FAILED; return; } ctx->bus_addr = segs->ds_addr; ctx->state = ITJC_DS_STOPPED; } /*---------------------------------------------------------------------------* * itjc_dma_start - Complete DMA setup & start the Tiger DMA engine. *---------------------------------------------------------------------------*/ static int itjc_dma_start(struct l1_softc *sc) { int unit = sc->sc_unit; dma_context_t *ctx = &dma_context[unit]; dma_rx_context_t *rxc = &dma_rx_context[unit][0]; dma_tx_context_t *txc = &dma_tx_context[unit][0]; bus_addr_t ba; u_int8_t i; u_int32_t *pool_end, *ip; itjc_bus_setup(sc); /* See if it is already running. */ if (ctx->state == ITJC_DS_RUNNING) return 0; if (ctx->state == ITJC_DS_LOAD_FAILED) { NDBGL1(L1_ERROR, "itjc%d: dma_start: DMA map loading " "failed (error=%d).\n", unit, ctx->error); return 1; } if (ctx->state != ITJC_DS_STOPPED) { NDBGL1(L1_ERROR, "itjc%d: dma_start: Unexpected DMA " "state (%d).\n", unit, ctx->state); return 1; } /* * Initialize the DMA control structures (hardware & B-channel). */ ba = ctx->bus_addr; txc->ring = ctx->pool + TIGER_CH_A; rxc->ring = ctx->pool + TIGER_CH_A + ITJC_RING_BYTES; txc->bus_addr = ba; rxc->bus_addr = ba + ITJC_RING_BYTES; ++rxc; ++txc; txc->ring = ctx->pool + TIGER_CH_B; rxc->ring = ctx->pool + TIGER_CH_B + ITJC_RING_BYTES; txc->bus_addr = ba; rxc->bus_addr = ba + ITJC_RING_BYTES; /* * Fill the DMA ring buffers with IOM-2 channel 0 frames made of * idle/abort sequences for the B & D channels and NOP for IOM-2 * cmd/ind, monitor handshake & data. */ pool_end = (u_int32_t *)ctx->pool + ITJC_DMA_POOL_WORDS; for (ip = (u_int32_t *)ctx->pool; ip < pool_end; ++ip) *ip = 0xFFFFFFFF; /* * Program the Tiger DMA gears. */ itjc_write_4(TIGER_DMA_WR_START_ADDR, ba); itjc_write_4(TIGER_DMA_WR_INT_ADDR, ba + ITJC_RING_SLOT_BYTES - 4); itjc_write_4(TIGER_DMA_WR_END_ADDR, ba + ITJC_RING_BYTES - 4); ba += ITJC_RING_BYTES; itjc_write_4(TIGER_DMA_RD_START_ADDR, ba); itjc_write_4(TIGER_DMA_RD_INT_ADDR, ba + ITJC_RING_SLOT_BYTES * 2 - 4); itjc_write_4(TIGER_DMA_RD_END_ADDR, ba + ITJC_RING_BYTES - 4); itjc_write_1(TIGER_INT0_MASK, TIGER_WR_END_INT | TIGER_WR_INT_INT | TIGER_RD_INT_INT); itjc_write_1(TIGER_DMA_OPER, TIGER_ENABLE_DMA); /* * See if it really started. */ ba = itjc_read_4(TIGER_DMA_RD_CURR_ADDR); for (i = 0; i < 10; ++i) { DELAY(SEC_DELAY/1000); if (ba != itjc_read_4(TIGER_DMA_RD_CURR_ADDR)) { ctx->state = ITJC_DS_RUNNING; return 0; } } NDBGL1(L1_ERROR, "itjc%d: dma_start: DMA start failed.\n ", unit); return 1; } /*---------------------------------------------------------------------------* * itjc_dma_stop - Stop the Tiger DMA engine. *---------------------------------------------------------------------------*/ void itjc_dma_stop(struct l1_softc *sc) { dma_context_t *ctx = &dma_context[sc->sc_unit]; itjc_bus_setup(sc); /* Only stop the DMA if it is running. */ if (ctx->state != ITJC_DS_RUNNING) return; itjc_write_1(TIGER_DMA_OPER, TIGER_DISABLE_DMA); DELAY(SEC_DELAY/1000); ctx->state = ITJC_DS_STOPPED; } /*---------------------------------------------------------------------------* * itjc_bchannel_dma_setup - The DMA side of itjc_bchannel_setup. *---------------------------------------------------------------------------*/ static void itjc_bchannel_dma_setup(struct l1_softc *sc, int h_chan, int activate) { dma_rx_context_t *rxc = &dma_rx_context[sc->sc_unit][h_chan]; dma_tx_context_t *txc = &dma_tx_context[sc->sc_unit][h_chan]; l1_bchan_state_t *chan = &sc->sc_chan[h_chan]; u_int8_t fill_byte, *ring_end, *cp; int s = SPLI4B(); itjc_bus_setup(sc); if (activate) { /* * Get the DMA engine going if it's not running already. */ itjc_dma_start(sc); rxc->hdlc_len = rxc->hdlc_tmp = rxc->hdlc_crc = 0; rxc->hdlc_ib = rxc->hdlc_blevel = rxc->hdlc_flag = 0; txc->hdlc_tmp = txc->hdlc_blevel = txc->hdlc_crc = 0; txc->hdlc_ib = 0; txc->hdlc_flag = 2; txc->filled = 0; if (chan->bprot == BPROT_NONE) fill_byte = ITJC_TEL_SILENCE_BYTE; else fill_byte = ITJC_HDLC_ABORT_BYTE; ring_end = rxc->ring + ITJC_RING_BYTES; for (cp = rxc->ring; cp < ring_end; cp += 4) *cp = fill_byte; ring_end = txc->ring + ITJC_RING_BYTES; for (cp = txc->ring; cp < ring_end; cp += 4) *cp = fill_byte; rxc->next_read = itjc_get_dma_offset(rxc, TIGER_DMA_RD_CURR_ADDR); txc->next_frame = txc->next_write = itjc_get_dma_offset(txc, TIGER_DMA_WR_CURR_ADDR); rxc->state = ITJC_RS_ACTIVE; txc->state = ITJC_TS_AFTER_XDU; } else { dma_rx_context_t *rxc2; txc->state = ITJC_TS_IDLE; rxc->state = ITJC_RS_IDLE; rxc2 = &dma_rx_context[sc->sc_unit][0]; if (rxc2->state == ITJC_RS_IDLE && rxc2[1].state == ITJC_RS_IDLE) itjc_dma_stop(sc); } splx(s); } /*---------------------------------------------------------------------------* * Mbuf & if_queues management routines. *---------------------------------------------------------------------------*/ static u_int8_t * itjc_get_rx_mbuf(l1_bchan_state_t *chan, u_int8_t **dst_end_p, which_mb_t which) { struct mbuf *mbuf = chan->in_mbuf; if (mbuf == NULL && which == ITJC_MB_NEW) { if ((mbuf = i4b_Bgetmbuf(ITJC_MAX_RAW_LEN)) == NULL) panic("itjc_get_rx_mbuf: cannot allocate mbuf!"); #if defined(ITJC_VJ_WORKAROUND) if (chan->bprot != BPROT_NONE) (u_int8_t *)(mbuf->m_data) += ITJC_VJ_HDR; #endif chan->in_mbuf = mbuf; chan->in_cbptr = (u_int8_t *)mbuf->m_data; chan->in_len = 0; } if (dst_end_p != NULL) { if (mbuf != NULL) *dst_end_p = (u_int8_t *)(mbuf->m_data) + ((chan->bprot == BPROT_NONE) ? ITJC_MAX_RAW_LEN : ITJC_MAX_HDLC_LEN); else *dst_end_p = NULL; } return chan->in_cbptr; } static void itjc_save_rx_mbuf(l1_bchan_state_t *chan, u_int8_t * dst) { struct mbuf *mbuf = chan->in_mbuf; if (dst != NULL && mbuf != NULL) { chan->in_cbptr = dst; chan->in_len = dst - (u_int8_t *)mbuf->m_data; } else if (dst == NULL && mbuf == NULL) { chan->in_cbptr = NULL; chan->in_len = 0; } else panic("itjc_save_rx_mbuf: stale pointer dst=%p mbuf=%p " "in_cbptr=%p in_len=%d", dst, mbuf, chan->in_cbptr, chan->in_len); } static void itjc_free_rx_mbuf(l1_bchan_state_t *chan) { struct mbuf *mbuf = chan->in_mbuf; if (mbuf != NULL) i4b_Bfreembuf(mbuf); chan->in_mbuf = NULL; chan->in_cbptr = NULL; chan->in_len = 0; } static void itjc_put_rx_mbuf(struct l1_softc *sc, l1_bchan_state_t *chan, u_int16_t len) { i4b_trace_hdr_t hdr; struct mbuf *mbuf = chan->in_mbuf; u_int8_t *data = mbuf->m_data; int activity = 1; mbuf->m_pkthdr.len = mbuf->m_len = len; if (sc->sc_trace & TRACE_B_RX) { hdr.unit = L0ITJCUNIT(sc->sc_unit); hdr.type = (chan->channel == HSCX_CH_A ? TRC_CH_B1 : TRC_CH_B2); hdr.dir = FROM_NT; hdr.count = ++sc->sc_trace_bcount; MICROTIME(hdr.time); i4b_l1_trace_ind(&hdr, len, data); } if (chan->bprot == BPROT_NONE) { activity = ! i4b_l1_bchan_tel_silence(data, len); /* move rx'd data to rx queue */ if (! IF_QFULL(&chan->rx_queue)) { IF_ENQUEUE(&chan->rx_queue, mbuf); } else { i4b_Bfreembuf(mbuf); len = 0; } } if (len != 0) { chan->rxcount += len; (*chan->isic_drvr_linktab->bch_rx_data_ready) (chan->isic_drvr_linktab->unit); } if (activity) (*chan->isic_drvr_linktab->bch_activity) (chan->isic_drvr_linktab->unit, ACT_RX); chan->in_mbuf = NULL; chan->in_cbptr = NULL; chan->in_len = 0; } #define itjc_free_tx_mbufs(chan) \ { \ i4b_Bfreembuf((chan)->out_mbuf_head); \ (chan)->out_mbuf_cur = (chan)->out_mbuf_head = NULL; \ (chan)->out_mbuf_cur_ptr = NULL; \ (chan)->out_mbuf_cur_len = 0; \ } static u_int16_t itjc_get_tx_mbuf(struct l1_softc *sc, l1_bchan_state_t *chan, u_int8_t **src_p, which_mb_t which) { i4b_trace_hdr_t hdr; struct mbuf *mbuf = chan->out_mbuf_cur; u_int8_t activity = 1; u_int16_t len; void *data; switch (which) { case ITJC_MB_CURR: if (mbuf != NULL) { *src_p = chan->out_mbuf_cur_ptr; return chan->out_mbuf_cur_len; } break; case ITJC_MB_NEXT: if (mbuf != NULL) { chan->txcount += mbuf->m_len; mbuf = mbuf->m_next; if (mbuf != NULL) goto new_mbuf; } chan->out_mbuf_cur_ptr = *src_p = NULL; chan->out_mbuf_cur_len = 0; if (chan->out_mbuf_head != NULL) { i4b_Bfreembuf(chan->out_mbuf_head); chan->out_mbuf_head = NULL; } return 0; case ITJC_MB_NEW: if (mbuf != NULL) chan->txcount += mbuf->m_len; } if (chan->out_mbuf_head != NULL) i4b_Bfreembuf(chan->out_mbuf_head); IF_DEQUEUE(&chan->tx_queue, mbuf); if (mbuf == NULL) { chan->out_mbuf_cur = chan->out_mbuf_head = NULL; chan->out_mbuf_cur_ptr = *src_p = NULL; chan->out_mbuf_cur_len = 0; chan->state &= ~(HSCX_TX_ACTIVE); (*chan->isic_drvr_linktab->bch_tx_queue_empty) (chan->isic_drvr_linktab->unit); return 0; } chan->out_mbuf_head = mbuf; new_mbuf: chan->out_mbuf_cur = mbuf; chan->out_mbuf_cur_ptr = data = mbuf->m_data; chan->out_mbuf_cur_len = len = mbuf->m_len; chan->state |= HSCX_TX_ACTIVE; if (sc->sc_trace & TRACE_B_TX) { hdr.unit = L0ITJCUNIT(sc->sc_unit); hdr.type = (chan->channel == HSCX_CH_A ? TRC_CH_B1 : TRC_CH_B2); hdr.dir = FROM_TE; hdr.count = ++sc->sc_trace_bcount; MICROTIME(hdr.time); i4b_l1_trace_ind(&hdr, len, data); } if (chan->bprot == BPROT_NONE) activity = ! i4b_l1_bchan_tel_silence(data, len); if (activity) (*chan->isic_drvr_linktab->bch_activity) (chan->isic_drvr_linktab->unit, ACT_TX); *src_p = data; return len; } #define itjc_save_tx_mbuf(chan, src, dst) \ ( \ (chan)->out_mbuf_cur != NULL ? \ ( \ (chan)->out_mbuf_cur_ptr = (src), \ (chan)->out_mbuf_cur_len = (len) \ ) \ : \ 0 \ ) /*---------------------------------------------------------------------------* * B-channel interrupt service routines. *---------------------------------------------------------------------------*/ /* * Since the Tiger ASIC doesn't produce a XMIT underflow indication, * we need to deduce it ourselves. This is somewhat tricky because we * are dealing with modulo m arithmetic. The idea here is to have a * "XDU zone" ahead of the writing pointer sized 1/3 of total ring * length (a ring slot). If the hardware DMA pointer is found there we * consider that a XDU has occurred. To complete the scheme, we never * let the ring have more than 2 slots of (unsent) data and adjust the * interrupt registers to cause an interrupt at every slot. */ static u_int8_t itjc_xdu(struct l1_softc *sc, l1_bchan_state_t *chan, dma_tx_context_t *ctx, u_int16_t *dst_p, u_int16_t *dst_end_p, u_int8_t tx_restart) { u_int8_t xdu; u_int16_t dst_end, dst, dma, dma_l, dma_h, xdu_l, xdu_h; itjc_bus_setup(sc); /* * Since the hardware is running, be conservative and assume * the pointer location has a `fuzy' error factor. */ dma = itjc_get_dma_offset(ctx, TIGER_DMA_WR_CURR_ADDR); dma_l = dma; dma_h = itjc_ring_add(dma, 1); dst_end = itjc_ring_sub(dma_l, ITJC_RING_SLOT_WORDS); if (ctx->state != ITJC_TS_ACTIVE) { xdu = (ctx->state == ITJC_TS_AFTER_XDU); dst = itjc_ring_add(dma_h, 4); goto done; } /* * Check for xmit underruns. */ xdu_l = dst = ctx->next_write; xdu_h = itjc_ring_add(dst, ITJC_RING_SLOT_WORDS); if (xdu_l < xdu_h) xdu = (xdu_l <= dma_l && dma_l < xdu_h) || (xdu_l <= dma_h && dma_h < xdu_h); else xdu = (xdu_l <= dma_l || dma_l < xdu_h) || (xdu_l <= dma_h || dma_h < xdu_h); if (xdu) { ctx->state = ITJC_TS_AFTER_XDU; dst = itjc_ring_add(dma_h, 4); } else if (tx_restart) { /* * See if we still can restart from immediately * after the last frame sent. It's a XDU test but * using the real data end on the comparsions. We * don't consider XDU an error here because we were * just trying to avoid send a filling gap between * frames. If it's already sent no harm is done. */ xdu_l = dst = ctx->next_frame; xdu_h = itjc_ring_add(dst, ITJC_RING_SLOT_WORDS); if (xdu_l < xdu_h) xdu = (xdu_l <= dma_l && dma_l < xdu_h) || (xdu_l <= dma_h && dma_h < xdu_h); else xdu = (xdu_l <= dma_l || dma_l < xdu_h) || (xdu_l <= dma_h || dma_h < xdu_h); if (xdu) dst = itjc_ring_add(dma_h, 4); xdu = 0; } done: if (dst_p != NULL) *dst_p = dst; if (dst_end_p != NULL) *dst_end_p = dst_end; ctx->next_write = dst_end; return xdu; } #define itjc_rotate_hdlc_flag(blevel) \ ((u_int8_t)(0x7E7E >> (8 - (u_int8_t)((blevel) >> 8)))) static void itjc_dma_rx_intr(struct l1_softc *sc, l1_bchan_state_t *chan, dma_rx_context_t *ctx) { u_int8_t *ring, *dst, *dst_end, flag, blevel; u_int16_t dma, src, tmp2, tmp, len, crc, ib; itjc_bus_setup(sc); if (ctx->state == ITJC_RS_IDLE) return; ring = ctx->ring; dma = itjc_get_dma_offset(ctx, TIGER_DMA_RD_CURR_ADDR); dma = itjc_ring_sub(dma, 1); src = ctx->next_read; if (chan->bprot == BPROT_NONE) { dst = itjc_get_rx_mbuf(chan, &dst_end, ITJC_MB_CURR); while (src != dma) { if (dst == NULL) dst = itjc_get_rx_mbuf(chan, &dst_end, ITJC_MB_NEW); *dst++ = ring[src]; src = itjc_ring_add(src, 1); if (dst >= dst_end) { itjc_put_rx_mbuf(sc, chan, ITJC_MAX_RAW_LEN); dst = dst_end = NULL; } } ctx->next_read = src; itjc_save_rx_mbuf(chan, dst); return; } blevel = ctx->hdlc_blevel; flag = ctx->hdlc_flag; len = ctx->hdlc_len; tmp = ctx->hdlc_tmp; crc = ctx->hdlc_crc; ib = ctx->hdlc_ib; dst = itjc_get_rx_mbuf(chan, NULL, ITJC_MB_CURR); while (src != dma) { HDLC_DECODE(*dst++, len, tmp, tmp2, blevel, ib, crc, flag, {/* rdd */ tmp2 = ring[src]; src = itjc_ring_add(src, 1); }, {/* nfr */ if (dst != NULL) panic("itjc_dma_rx_intr: nfrcmd with " "valid current frame"); dst = itjc_get_rx_mbuf(chan, &dst_end, ITJC_MB_NEW); len = dst_end - dst; }, {/* cfr */ len = ITJC_MAX_HDLC_LEN - len; if ((!len) || (len > ITJC_MAX_HDLC_LEN)) { /* * NOTE: frames without any data, only crc * field, should be silently discared. */ NDBGL1(L1_S_MSG, "itjc_dma_rx_intr: " "bad frame (len=%d, unit=%d)", len, sc->sc_unit); itjc_free_rx_mbuf(chan); goto s0; } if (crc) { NDBGL1(L1_S_ERR, "CRC (crc=0x%04x, len=%d, unit=%d)", crc, len, sc->sc_unit); itjc_free_rx_mbuf(chan); goto s0; } itjc_put_rx_mbuf(sc, chan, len); s0: dst = NULL; len = 0; }, {/* rab */ NDBGL1(L1_S_ERR, "Read Abort (unit=%d)", sc->sc_unit); itjc_free_rx_mbuf(chan); dst = NULL; len = 0; }, {/* rdo */ NDBGL1(L1_S_ERR, "RDO (unit=%d) dma=%d src=%d", sc->sc_unit, dma, src); itjc_free_rx_mbuf(chan); dst = NULL; len = 0; }, continue, d); } itjc_save_rx_mbuf(chan, dst); ctx->next_read = src; ctx->hdlc_blevel= blevel; ctx->hdlc_flag = flag; ctx->hdlc_len = len; ctx->hdlc_tmp = tmp; ctx->hdlc_crc = crc; ctx->hdlc_ib = ib; } /* * The HDLC side of itjc_dma_tx_intr. We made a separate function * to improve readability and (perhaps) help the compiler with * register allocation. */ static void itjc_hdlc_encode(struct l1_softc *sc, l1_bchan_state_t *chan, dma_tx_context_t * ctx) { u_int8_t *ring, *src, xdu, flag, flag_byte, tx_restart; u_int16_t saved_len, dst_end, dst_end1, dst, filled, blevel, tmp2, len, crc, ib; u_int32_t tmp; saved_len = len = itjc_get_tx_mbuf(sc, chan, &src, ITJC_MB_CURR); filled = ctx->filled; flag = ctx->hdlc_flag; if (src == NULL && flag == 2 && filled >= ITJC_RING_WORDS) return; tx_restart = (flag == 2 && src != NULL); xdu = itjc_xdu(sc, chan, ctx, &dst, &dst_end, tx_restart); ring = ctx->ring; ib = ctx->hdlc_ib; crc = ctx->hdlc_crc; tmp = ctx->hdlc_tmp; blevel = ctx->hdlc_blevel; if (xdu) { if (flag != 2) { NDBGL1(L1_H_XFRERR, "XDU"); ++chan->stat_XDU; /* * Abort the current frame and * prepare for a full restart. */ itjc_free_tx_mbufs(chan); saved_len = len = filled = 0; flag = (u_int8_t)-2; } else if (filled < ITJC_RING_SLOT_WORDS) { /* * A little garbage may have been retransmitted. * Send an abort before any new data. */ filled = 0; flag = (u_int8_t)-2; } } if (flag != 3) len = 0; while (dst != dst_end) { HDLC_ENCODE( *src++, len, tmp, tmp2, blevel, ib, crc, flag, {/* gfr */ if ((len = saved_len) == 0) len = itjc_get_tx_mbuf(sc, chan, &src, ITJC_MB_NEW); if (len == 0) { ctx->next_frame = dst; flag_byte = itjc_rotate_hdlc_flag(blevel); for (dst_end1 = itjc_ring_sub(dst_end, 1); dst != dst_end1; dst = itjc_ring_add(dst, 1)) { ring[dst] = flag_byte; ++filled; } } else filled = 0; ctx->state = ITJC_TS_ACTIVE; }, {/* nmb */ saved_len = 0; len = itjc_get_tx_mbuf(sc, chan, &src, ITJC_MB_NEXT); }, {/* wrd */ ring[dst] = (u_int8_t)tmp; dst = itjc_ring_add(dst, 1); }, d1); } ctx->hdlc_blevel = blevel; ctx->hdlc_flag = flag; ctx->hdlc_tmp = tmp; ctx->hdlc_crc = crc; ctx->hdlc_ib = ib; ctx->filled = filled; ctx->next_write = dst; itjc_save_tx_mbuf(chan, src, len); } static void itjc_dma_tx_intr(struct l1_softc *sc, l1_bchan_state_t *chan, dma_tx_context_t * ctx) { u_int8_t *data_end, *ring, *src, xdu; u_int16_t dst, dst_end, filled, len; if (ctx->state == ITJC_TS_IDLE) goto done; if (chan->bprot != BPROT_NONE) { itjc_hdlc_encode(sc, chan, ctx); goto done; } ring = ctx->ring; filled = ctx->filled; len = itjc_get_tx_mbuf(sc, chan, &src, ITJC_MB_CURR); if (len == 0 && filled >= ITJC_RING_WORDS) goto done; xdu = itjc_xdu(sc, chan, ctx, &dst, &dst_end, len != 0); if (xdu && filled < ITJC_RING_WORDS) { NDBGL1(L1_H_XFRERR, "XDU"); ++chan->stat_XDU; filled = 0; } if (len == 0) goto fill_ring; ctx->state = ITJC_TS_ACTIVE; data_end = src + len; while (dst != dst_end) { ring[dst] = *src++; --len; dst = itjc_ring_add(dst, 1); if (src >= data_end) { len = itjc_get_tx_mbuf(sc, chan, &src, ITJC_MB_NEXT); if (len == 0) len = itjc_get_tx_mbuf(sc, chan, &src, ITJC_MB_NEW); if (len == 0) { data_end = NULL; break; } data_end = src + len; } } itjc_save_tx_mbuf(chan, src, len); filled = 0; fill_ring: ctx->next_frame = dst; for (; dst != dst_end; dst = itjc_ring_add(dst, 1)) { ring[dst] = ITJC_TEL_SILENCE_BYTE; ++filled; } ctx->next_write = dst; ctx->filled = filled; done: } /*---------------------------------------------------------------------------* * NetJet fifo read/write routines. *---------------------------------------------------------------------------*/ static void itjc_read_fifo(struct l1_softc *sc, int what, void *buf, size_t size) { itjc_bus_setup(sc); if (what != ISIC_WHAT_ISAC) panic("itjc_write_fifo: Trying to read from HSCX fifo.\n"); itjc_set_pib_addr_msb(0); itjc_read_multi_1(PIB_OFFSET, buf, size); } static void itjc_write_fifo(struct l1_softc *sc, int what, void *buf, size_t size) { itjc_bus_setup(sc); if (what != ISIC_WHAT_ISAC) panic("itjc_write_fifo: Trying to write to HSCX fifo.\n"); itjc_set_pib_addr_msb(0); itjc_write_multi_1(PIB_OFFSET, buf, size); } /*---------------------------------------------------------------------------* * Read an ISAC register. *---------------------------------------------------------------------------*/ static u_int8_t itjc_read_reg(struct l1_softc *sc, int what, bus_size_t offs) { itjc_bus_setup(sc); if (what != ISIC_WHAT_ISAC) { panic("itjc_read_reg: what(%d) != ISIC_WHAT_ISAC\n", what); return 0; } itjc_set_pib_addr_msb(offs); return itjc_read_1(itjc_pib_2_pci(offs)); } /*---------------------------------------------------------------------------* * Write an ISAC register. *---------------------------------------------------------------------------*/ static void itjc_write_reg(struct l1_softc *sc, int what, bus_size_t offs, u_int8_t data) { itjc_bus_setup(sc); if (what != ISIC_WHAT_ISAC) { panic("itjc_write_reg: what(%d) != ISIC_WHAT_ISAC\n", what); return; } itjc_set_pib_addr_msb(offs); itjc_write_1(itjc_pib_2_pci(offs), data); } /*---------------------------------------------------------------------------* * itjc_probe - probe for a card. *---------------------------------------------------------------------------*/ static int itjc_probe(device_t dev) { u_int16_t vid = pci_get_vendor(dev), did = pci_get_device(dev); if ((vid == PCI_TJNET_VID) && (did == PCI_TJ300_DID)) { device_set_desc(dev, "NetJet-S"); return 0; } return ENXIO; } /*---------------------------------------------------------------------------* * itjc_attach - attach a (previously probed) card. *---------------------------------------------------------------------------*/ int itjc_attach(device_t dev) { bus_space_handle_t h; bus_space_tag_t t; struct l1_softc *sc = device_get_softc(dev); u_int16_t vid = pci_get_vendor(dev), did = pci_get_device(dev); int unit = device_get_unit(dev), s = splimp(), res_init_level = 0, error = 0; void *ih = 0; dma_context_t *ctx = &dma_context[unit]; bzero(sc, sizeof(struct l1_softc)); /* Probably not really required. */ if (unit > ITJC_MAXUNIT) { printf("itjc%d: Error, unit > ITJC_MAXUNIT!\n", unit); splx(s); return ENXIO; } if (!(vid == PCI_TJNET_VID && did == PCI_TJ300_DID)) { printf("itjc%d: unknown device (%04X,%04X)!\n", unit, vid, did); goto fail; } itjc_scp[unit] = sc; sc->sc_resources.io_rid[0] = PCIR_MAPS+0; sc->sc_resources.io_base[0] = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->sc_resources.io_rid[0], 0, ~0, 1, RF_ACTIVE); if (sc->sc_resources.io_base[0] == NULL) { printf("itjc%d: couldn't map IO port\n", unit); error = ENXIO; goto fail; } h = rman_get_bushandle(sc->sc_resources.io_base[0]); t = rman_get_bustag(sc->sc_resources.io_base[0]); ++res_init_level; /* Allocate interrupt. */ sc->sc_resources.irq_rid = 0; sc->sc_resources.irq = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->sc_resources.irq_rid, 0, ~0, 1, RF_SHAREABLE | RF_ACTIVE); if (sc->sc_resources.irq == NULL) { printf("itjc%d: couldn't map interrupt\n", unit); error = ENXIO; goto fail; } ++res_init_level; error = bus_setup_intr(dev, sc->sc_resources.irq, INTR_TYPE_NET, itjc_intr, sc, &ih); if (error) { printf("itjc%d: couldn't set up irq handler\n", unit); error = ENXIO; goto fail; } /* * Reset the ASIC & the ISAC. */ itjc_write_1(TIGER_RESET_PIB_CL_TIME, TIGER_RESET_ALL); DELAY(SEC_DELAY/100); /* Give it 10 ms to reset ...*/ itjc_write_1(TIGER_RESET_PIB_CL_TIME, TIGER_SELF_ADDR_DMA | TIGER_PIB_3_CYCLES); DELAY(SEC_DELAY/100); /* ... and more 10 to recover. */ /* * First part of DMA initialization. Create & map the memory * pool that will be used to bear the rx & tx ring buffers. */ ctx->state = ITJC_DS_LOADING; error = bus_dma_tag_create( NULL, /* parent */ 4, /* alignment*/ 0, /* boundary*/ BUS_SPACE_MAXADDR_32BIT, /* lowaddr*/ BUS_SPACE_MAXADDR, /* highaddr*/ NULL, /* filter*/ NULL, /* filterarg*/ ITJC_DMA_POOL_BYTES, /* maxsize*/ 1, /* nsegments*/ ITJC_DMA_POOL_BYTES, /* maxsegsz*/ BUS_DMA_ALLOCNOW | BUS_DMAMEM_NOSYNC, /* flags*/ &ctx->tag); if (error) { printf("itjc%d: couldn't create bus DMA tag.\n", unit); goto fail; } ++res_init_level; error = bus_dmamem_alloc( ctx->tag, /* DMA tag */ (void **)&ctx->pool, /* KV addr of the allocated memory */ BUS_DMA_NOWAIT | BUS_DMAMEM_NOSYNC, /* flags */ &ctx->map); /* KV <-> PCI map */ if (error) goto fail; /* * Load the KV <-> PCI map so the device sees the same * memory segment as pointed by pool. Note: since the * load may happen assyncronously (completion indicated by * the execution of the callback function) we have to * delay the initialization of the DMA engine to a moment we * actually have the proper bus addresses to feed the Tiger * and our DMA control blocks. This will be done in * itjc_bchannel_setup via a call to itjc_dma_start. */ bus_dmamap_load( ctx->tag, /* DMA tag */ ctx->map, /* DMA map */ ctx->pool, /* KV addr of buffer */ ITJC_DMA_POOL_BYTES, /* buffer size */ itjc_map_callback, /* this receive the bus addr/error */ ctx, /* callback aux arg */ 0); /* flags */ ++res_init_level; /* * Setup the AUX port so we can talk to the ISAC. */ itjc_write_1(TIGER_AUX_PORT_CNTL, TIGER_AUX_NJ_DEFAULT); itjc_write_1(TIGER_INT1_MASK, TIGER_ISAC_INT); /* * From now on, almost like a `normal' ISIC driver. */ sc->sc_unit = unit; ISAC_BASE = (caddr_t)ISIC_WHAT_ISAC; HSCX_A_BASE = (caddr_t)ISIC_WHAT_HSCXA; HSCX_B_BASE = (caddr_t)ISIC_WHAT_HSCXB; /* setup access routines */ sc->clearirq = NULL; sc->readreg = itjc_read_reg; sc->writereg = itjc_write_reg; sc->readfifo = itjc_read_fifo; sc->writefifo = itjc_write_fifo; /* setup card type */ sc->sc_cardtyp = CARD_TYPEP_NETJET_S; /* setup IOM bus type */ sc->sc_bustyp = BUS_TYPE_IOM2; /* set up some other miscellaneous things */ sc->sc_ipac = 0; sc->sc_bfifolen = 2 * ITJC_RING_SLOT_WORDS; printf("itjc%d: ISAC 2186 Version 1.1 (IOM-2)\n", unit); /* init the ISAC */ itjc_isac_init(sc); /* init the "HSCX" */ itjc_bchannel_setup(sc->sc_unit, HSCX_CH_A, BPROT_NONE, 0); itjc_bchannel_setup(sc->sc_unit, HSCX_CH_B, BPROT_NONE, 0); /* can't use the normal B-Channel stuff */ itjc_init_linktab(sc); /* set trace level */ sc->sc_trace = TRACE_OFF; sc->sc_state = ISAC_IDLE; sc->sc_ibuf = NULL; sc->sc_ib = NULL; sc->sc_ilen = 0; sc->sc_obuf = NULL; sc->sc_op = NULL; sc->sc_ol = 0; sc->sc_freeflag = 0; sc->sc_obuf2 = NULL; sc->sc_freeflag2 = 0; #if defined(__FreeBSD__) && __FreeBSD__ >=3 callout_handle_init(&sc->sc_T3_callout); callout_handle_init(&sc->sc_T4_callout); #endif /* init higher protocol layers */ i4b_l1_mph_status_ind(L0ITJCUNIT(sc->sc_unit), STI_ATTACH, sc->sc_cardtyp, &itjc_l1mux_func); splx(s); return 0; fail: switch (res_init_level) { case 5: bus_dmamap_unload(ctx->tag, ctx->map); /* FALL TRHU */ case 4: bus_dmamem_free(ctx->tag, ctx->pool, ctx->map); bus_dmamap_destroy(ctx->tag, ctx->map); /* FALL TRHU */ case 3: bus_dma_tag_destroy(ctx->tag); /* FALL TRHU */ case 2: bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_resources.irq); /* FALL TRHU */ case 1: bus_release_resource(dev, SYS_RES_IOPORT, PCIR_MAPS+0, sc->sc_resources.io_base[0]); /* FALL TRHU */ case 0: } itjc_scp[unit] = NULL; splx(s); return error; } /*---------------------------------------------------------------------------* * itjc_intr - main interrupt service routine. *---------------------------------------------------------------------------*/ static void itjc_intr(void *xsc) { struct l1_softc *sc = xsc; l1_bchan_state_t *chan = &sc->sc_chan[0]; dma_context_t *dma = &dma_context[sc->sc_unit]; dma_rx_context_t *rxc = &dma_rx_context[sc->sc_unit][0]; dma_tx_context_t *txc = &dma_tx_context[sc->sc_unit][0]; itjc_bus_setup(sc); /* Honor interrupts from successfully configured cards only. */ if (dma->state < ITJC_DS_STOPPED) return; /* First, we check the ISAC... */ if (! (itjc_read_1(TIGER_AUX_PORT_DATA) & TIGER_ISAC_INT_MASK)) { itjc_write_1(TIGER_INT1_STATUS, TIGER_ISAC_INT); NDBGL1(L1_H_IRQ, "ISAC"); itjc_isac_intr(sc); } /* ... after what we always have a look at the DMA rings. */ NDBGL1(L1_H_IRQ, "Tiger"); itjc_read_1(TIGER_INT0_STATUS); itjc_write_1(TIGER_INT0_STATUS, TIGER_TARGET_ABORT_INT | TIGER_MASTER_ABORT_INT | TIGER_RD_END_INT | TIGER_RD_INT_INT | TIGER_WR_END_INT | TIGER_WR_INT_INT); itjc_dma_rx_intr(sc, chan, rxc); itjc_dma_tx_intr(sc, chan, txc); ++chan; ++rxc; ++txc; itjc_dma_rx_intr(sc, chan, rxc); itjc_dma_tx_intr(sc, chan, txc); } /*---------------------------------------------------------------------------* * itjc_bchannel_setup - (Re)initialize and start/stop a Bchannel. *---------------------------------------------------------------------------*/ static void itjc_bchannel_setup(int unit, int h_chan, int bprot, int activate) { #ifdef __FreeBSD__ struct l1_softc *sc = itjc_scp[unit]; #else struct l1_softc *sc = isic_find_sc(unit); #endif l1_bchan_state_t *chan = &sc->sc_chan[h_chan]; int s = SPLI4B(); NDBGL1(L1_BCHAN, "unit=%d, channel=%d, %s", unit, h_chan, activate ? "activate" : "deactivate"); /* * If we are deactivating the channel, we have to stop * the DMA before we reset the channel control structures. */ if (! activate) itjc_bchannel_dma_setup(sc, h_chan, activate); /* general part */ chan->state = HSCX_IDLE; chan->unit = sc->sc_unit; /* unit number */ chan->channel = h_chan; /* B channel */ chan->bprot = bprot; /* B channel protocol */ /* receiver part */ i4b_Bcleanifq(&chan->rx_queue); /* clean rx queue */ chan->rx_queue.ifq_maxlen = IFQ_MAXLEN; chan->rxcount = 0; /* reset rx counter */ i4b_Bfreembuf(chan->in_mbuf); /* clean rx mbuf */ chan->in_mbuf = NULL; /* reset mbuf ptr */ chan->in_cbptr = NULL; /* reset mbuf curr ptr */ chan->in_len = 0; /* reset mbuf data len */ /* transmitter part */ i4b_Bcleanifq(&chan->tx_queue); /* clean tx queue */ chan->tx_queue.ifq_maxlen = IFQ_MAXLEN; chan->txcount = 0; /* reset tx counter */ i4b_Bfreembuf(chan->out_mbuf_head); /* clean tx mbuf */ chan->out_mbuf_head = NULL; /* reset head mbuf ptr */ chan->out_mbuf_cur = NULL; /* reset current mbuf ptr */ chan->out_mbuf_cur_ptr = NULL; /* reset current mbuf data ptr */ chan->out_mbuf_cur_len = 0; /* reset current mbuf data cnt */ /* * Only setup & start the DMA after all other channel * control structures are in place. */ if (activate) itjc_bchannel_dma_setup(sc, h_chan, activate); splx(s); } /*---------------------------------------------------------------------------* * itjc_bchannel_start - Signal us we have more data to send. *---------------------------------------------------------------------------*/ static void itjc_bchannel_start(int unit, int h_chan) { #if Buggy_code /* * I disabled this routine because it was causing crashes when * this driver was used with the ISP (kernel SPPP) protocol driver. * The scenario is reproductible: * Use the -link1 (dial on demand) ifconfig option. * Start an interactive TCP connection to somewhere. * Wait until the PPP connection times out and is dropped. * Try to send something on the TCP connection. * The machine will print some garbage and halt or reboot * (no panic messages). * * I've nailed down the problem to the fact that this routine * was being called before the B channel had been setup again. * * For now, I don't have a good solution other than this one. * But, don't despair. The impact of it is unnoticeable. */ #ifdef __FreeBSD__ struct l1_softc *sc = itjc_scp[unit]; #else struct l1_softc *sc = isic_find_sc(unit); #endif l1_bchan_state_t *chan = &sc->sc_chan[h_chan]; int s = SPLI4B(); dma_tx_context_t *txc = &dma_tx_context[unit][h_chan]; if (chan->state & HSCX_TX_ACTIVE) { splx(s); return; } itjc_dma_tx_intr(sc, chan, txc); splx(s); #endif } /*---------------------------------------------------------------------------* * itjc_shutdown - Stop the driver and reset the card. *---------------------------------------------------------------------------*/ static void itjc_shutdown(device_t dev) { struct l1_softc *sc = device_get_softc(dev); itjc_bus_setup(sc); /* * Stop the DMA the nice and easy way. */ itjc_bchannel_setup(sc->sc_unit, 0, BPROT_NONE, 0); itjc_bchannel_setup(sc->sc_unit, 1, BPROT_NONE, 0); /* * Reset the card. */ itjc_write_1(TIGER_RESET_PIB_CL_TIME, TIGER_RESET_ALL); DELAY(SEC_DELAY/100); /* Give it 10 ms to reset ...*/ itjc_write_1(TIGER_RESET_PIB_CL_TIME, TIGER_SELF_ADDR_DMA | TIGER_LATCH_DMA_INT | TIGER_PIB_3_CYCLES); DELAY(SEC_DELAY/100); /* ... and more 10 to recover */ } /*---------------------------------------------------------------------------* * itjc_ret_linktab - Return the address of itjc drivers linktab. *---------------------------------------------------------------------------*/ isdn_link_t * itjc_ret_linktab(int unit, int channel) { #ifdef __FreeBSD__ struct l1_softc *sc = itjc_scp[unit]; #else struct l1_softc *sc = isic_find_sc(unit); #endif l1_bchan_state_t *chan = &sc->sc_chan[channel]; return(&chan->isic_isdn_linktab); } /*---------------------------------------------------------------------------* * itjc_set_linktab - Set the driver linktab in the b channel softc. *---------------------------------------------------------------------------*/ void itjc_set_linktab(int unit, int channel, drvr_link_t *dlt) { #ifdef __FreeBSD__ struct l1_softc *sc = itjc_scp[unit]; #else struct l1_softc *sc = isic_find_sc(unit); #endif l1_bchan_state_t *chan = &sc->sc_chan[channel]; chan->isic_drvr_linktab = dlt; } /*---------------------------------------------------------------------------* * itjc_init_linktab - Initialize our local linktab. *---------------------------------------------------------------------------*/ static void itjc_init_linktab(struct l1_softc *sc) { l1_bchan_state_t *chan = &sc->sc_chan[HSCX_CH_A]; isdn_link_t *lt = &chan->isic_isdn_linktab; /* make sure the hardware driver is known to layer 4 */ /* avoid overwriting if already set */ if (ctrl_types[CTRL_PASSIVE].set_linktab == NULL) { ctrl_types[CTRL_PASSIVE].set_linktab = itjc_set_linktab; ctrl_types[CTRL_PASSIVE].get_linktab = itjc_ret_linktab; } /* local setup */ lt->unit = sc->sc_unit; lt->channel = HSCX_CH_A; lt->bch_config = itjc_bchannel_setup; lt->bch_tx_start = itjc_bchannel_start; lt->bch_stat = itjc_bchannel_stat; lt->tx_queue = &chan->tx_queue; /* used by non-HDLC data transfers, i.e. telephony drivers */ lt->rx_queue = &chan->rx_queue; /* used by HDLC data transfers, i.e. ipr and isp drivers */ lt->rx_mbuf = &chan->in_mbuf; chan = &sc->sc_chan[HSCX_CH_B]; lt = &chan->isic_isdn_linktab; lt->unit = sc->sc_unit; lt->channel = HSCX_CH_B; lt->bch_config = itjc_bchannel_setup; lt->bch_tx_start = itjc_bchannel_start; lt->bch_stat = itjc_bchannel_stat; lt->tx_queue = &chan->tx_queue; /* used by non-HDLC data transfers, i.e. telephony drivers */ lt->rx_queue = &chan->rx_queue; /* used by HDLC data transfers, i.e. ipr and isp drivers */ lt->rx_mbuf = &chan->in_mbuf; } /*---------------------------------------------------------------------------* * itjc_bchannel_stat - Collect link statistics for a given B channel. *---------------------------------------------------------------------------*/ static void itjc_bchannel_stat(int unit, int h_chan, bchan_statistics_t *bsp) { #ifdef __FreeBSD__ struct l1_softc *sc = itjc_scp[unit]; #else struct l1_softc *sc = isic_find_sc(unit); #endif l1_bchan_state_t *chan = &sc->sc_chan[h_chan]; int s; s = SPLI4B(); bsp->outbytes = chan->txcount; bsp->inbytes = chan->rxcount; chan->txcount = 0; chan->rxcount = 0; splx(s); } /*---------------------------------------------------------------------------* * Netjet - ISAC interrupt routine. *---------------------------------------------------------------------------*/ static void itjc_isac_intr(struct l1_softc *sc) { register u_char irq_stat; do { /* get isac irq status */ irq_stat = ISAC_READ(I_ISTA); if(irq_stat) itjc_isac_irq(sc, irq_stat); /* isac handler */ } while(irq_stat); ISAC_WRITE(I_MASK, 0xff); DELAY(100); ISAC_WRITE(I_MASK, ISAC_IMASK); } /*---------------------------------------------------------------------------* * itjc_recover - Try to recover from ISAC irq lockup. *---------------------------------------------------------------------------*/ void itjc_recover(struct l1_softc *sc) { u_char byte; /* get isac irq status */ byte = ISAC_READ(I_ISTA); NDBGL1(L1_ERROR, " ISAC: ISTA = 0x%x", byte); if(byte & ISAC_ISTA_EXI) NDBGL1(L1_ERROR, " ISAC: EXIR = 0x%x", (u_char)ISAC_READ(I_EXIR)); if(byte & ISAC_ISTA_CISQ) { byte = ISAC_READ(I_CIRR); NDBGL1(L1_ERROR, " ISAC: CISQ = 0x%x", byte); if(byte & ISAC_CIRR_SQC) NDBGL1(L1_ERROR, " ISAC: SQRR = 0x%x", (u_char)ISAC_READ(I_SQRR)); } NDBGL1(L1_ERROR, " ISAC: IMASK = 0x%x", ISAC_IMASK); ISAC_WRITE(I_MASK, 0xff); DELAY(100); ISAC_WRITE(I_MASK, ISAC_IMASK); } #endif /* NITJC > 0 */ --LZvS9be/3tNcYl/X-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message From owner-freebsd-isdn Wed Jan 3 14:29: 0 2001 From owner-freebsd-isdn@FreeBSD.ORG Wed Jan 3 14:28:57 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from liliput.tmp.com.br (liliput.tmp.com.br [200.244.62.12]) by hub.freebsd.org (Postfix) with ESMTP id 8FB3C37B400 for ; Wed, 3 Jan 2001 14:28:56 -0800 (PST) Received: (from prallon@localhost) by liliput.tmp.com.br (8.8.8/8.8.8) id UAA27486; Wed, 3 Jan 2001 20:28:38 -0200 Date: Wed, 3 Jan 2001 20:28:38 -0200 From: Sergio de Souza Prallon To: Andrey Lakhno Cc: freebsd-isdn@freebsd.org Subject: Re: 2 Teles PCI cards in one PC Message-ID: <20010103202838.A26571@tmp.com.br> References: <20010102093844.A10729@dnepr.net> <20010102085741.ED8243A1@hcswork.hcs.de> <20010102110719.A829@dnepr.net> <20010102151432.A21821@tmp.com.br> <20010103002019.A11223@dnepr.net> <20010103150832.A19526@tmp.com.br> <20010103231021.A27703@dnepr.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20010103231021.A27703@dnepr.net>; from land@dnepr.net on Wed, Jan 03, 2001 at 11:10:21PM +0200 X-URL: http://www.tmp.com.br Sender: prallon@liliput.tmp.com.br Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Wed, Jan 03, 2001 at 11:10:21PM +0200, Andrey Lakhno wrote: > Hi Sergio! > > I need load balancing with 4 B-channels. So I'll use userland ppp. > [...] > It seems it works. At least computer doesn't reboots. > Tomorrow I'll try to test it with 2 ISDN lines. Only one line available now. > Cool! That will be a good test for the driver. > In logs I noticed strange messages: > > Jan 3 22:54:07 radi /kernel: i4b-L2 F_ILL: FSM function F_ILL execu > ting > Jan 3 22:54:07 radi /kernel: i4b-L2 i4b_next_l2state: FSM illegal s > tate, state = ST_EST_AW_TEI, event = EV_DLESTRQ! > Jan 3 22:54:07 radi /kernel: i4b: unit 1, assigned TEI = 92 = 0x5c > Jan 3 22:54:14 radi /kernel: i4b-L2 i4b_rxd_ack: ((N(R)-1)=6) != (U > A=7) !!! > Jan 3 22:56:59 radi /kernel: i4b-L2 i4b_rxd_ack: ((N(R)-1)=12) != ( > UA=13) !!! > 101032257 > Jan 3 22:57:07 radi /kernel: i4b-L1 itjc_dma_rx_intr: CRC (crc=0x00 > 97, len=322, unit=0) > > Is this error indication ? > Looks like a physical problem (cables, termination). It can also be related to a problem that occurs on my machine: on almost every connection establishment I get a "i4b-L2 T200_timeout" or a "i4b-L2 T202_timeout". After that things goes just fine. It doesn't occurs on a friend's box that is also helping me debug the driver. For now I don't have a clue for what it can be. Isdntrace gives even stranger results, because I see the INFO and IND messages coming from the interrupt handler saying the connection is active well before (a second o so) the timeout message. If I use the userland PPP (I normally use the kernel one), after a dial command, I get the timeout message and for the PPP point of view, the connection fails. But if I look at the `isdnd -f' VTY, I see the connection is active. It shows up on the hangup menu and times out normally if left idle for a long period. If I dial again, the connection is established and uses the SAME controller/B-channel pair. Any pointers on this subject anyone can give me will be greatly appreciated. I have a reasonable experience with networks and some on protocol implementation but I never read any of the ISDN specs so I don't know what FSM event or message is missing. []'s -- Prallon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message From owner-freebsd-isdn Thu Jan 4 2: 3:32 2001 From owner-freebsd-isdn@FreeBSD.ORG Thu Jan 4 02:03:30 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from storm.FreeBSD.org.uk (storm.freebsd.org.uk [194.242.139.170]) by hub.freebsd.org (Postfix) with ESMTP id 4ED4037B402 for ; Thu, 4 Jan 2001 02:03:29 -0800 (PST) Received: (from brian@localhost) by storm.FreeBSD.org.uk (8.11.1/8.11.1) id f04A3SZ45131; Thu, 4 Jan 2001 10:03:28 GMT (envelope-from brian) Date: Thu, 4 Jan 2001 10:03:28 GMT From: Brian Somers Message-Id: <200101041003.f04A3SZ45131@storm.FreeBSD.org.uk> To: freebsd-isdn@FreeBSD.org Subject: ISDN ``SABME'' event ? Cc: brian@Awfulhak.org Sender: brian@storm.FreeBSD.org.uk Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi, I've got a machine that occasionally loses it's ISDN connection in such a way that I need to kill and restart isdnd to get things to work again. I have no details at the moment except to say that it does this every few days of continuous connection, and the attached appeared on my screen today when I was remotely logged in as root to do some maintenance on /home. Is this ``SABME'' event something unusual ? Should isdnd/i4b recover ok from it ? I'm (of course :) using the i4brbch0 device and don't expect anything else to be going on (although it's possible that I received an incoming call or that my wife made an outgoing call via a TA connected to the same bus). The machine's -stable from about 1 week ago. If this info isn't enough, I can crank up logging etc, this message is only really a probe to see if these errors are enough in themselves to mean something :-) Cheers. -- Brian Don't _EVER_ lose your sense of humour ! Jan 4 09:35:41 gate /kernel: i4b-L2-i4b_mdl_error_ind: unit = 0, location = F_MF07 Jan 4 09:35:41 gate /kernel: i4b-L2-i4b_mdl_error_ind: unit = 0, location = F_MF07 Jan 4 09:35:41 gate /kernel: i4b-L2-i4b_mdl_error_ind: error = MDL_ERR_F: peer initiated re-establishment - SABME Jan 4 09:35:41 gate /kernel: i4b-L2-i4b_mdl_error_ind: error = MDL_ERR_F: peer initiated re-establishment - SABME Jan 4 09:35:42 gate /kernel: i4b-L2-i4b_mdl_error_ind: unit = 0, location = F_MF07 Jan 4 09:35:42 gate /kernel: i4b-L2-i4b_mdl_error_ind: unit = 0, location = F_MF07 Jan 4 09:35:42 gate /kernel: i4b-L2-i4b_mdl_error_ind: error = MDL_ERR_F: peer initiated re-establishment - SABME Jan 4 09:35:42 gate /kernel: i4b-L2-i4b_mdl_error_ind: error = MDL_ERR_F: peer initiated re-establishment - SABME Jan 4 09:35:43 gate /kernel: i4b-L2-i4b_mdl_error_ind: unit = 0, location = F_MF07 Jan 4 09:35:43 gate /kernel: i4b-L2-i4b_mdl_error_ind: unit = 0, location = F_MF07 Jan 4 09:35:43 gate /kernel: i4b-L2-i4b_mdl_error_ind: error = MDL_ERR_F: peer initiated re-establishment - SABME Jan 4 09:35:43 gate /kernel: i4b-L2-i4b_mdl_error_ind: error = MDL_ERR_F: peer initiated re-establishment - SABME Jan 4 09:35:44 gate /kernel: i4b-L2-i4b_mdl_error_ind: unit = 0, location = F_MF07 Jan 4 09:35:44 gate /kernel: i4b-L2-i4b_mdl_error_ind: unit = 0, location = F_MF07 Jan 4 09:35:44 gate /kernel: i4b-L2-i4b_mdl_error_ind: error = MDL_ERR_F: peer initiated re-establishment - SABME Jan 4 09:35:44 gate /kernel: i4b-L2-i4b_mdl_error_ind: error = MDL_ERR_F: peer initiated re-establishment - SABME To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message From owner-freebsd-isdn Thu Jan 4 2:58:48 2001 From owner-freebsd-isdn@FreeBSD.ORG Thu Jan 4 02:58:46 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from hcshh.hcs.de (hcshh.hcs.de [194.123.40.1]) by hub.freebsd.org (Postfix) with ESMTP id B9AB637B400 for ; Thu, 4 Jan 2001 02:58:45 -0800 (PST) Received: from hcswork.hcs.de (hcswork.hcs.de [192.76.124.5]) by hcshh.hcs.de (Postfix) with ESMTP id 372095D2C; Thu, 4 Jan 2001 11:58:01 +0100 (CET) Received: by hcswork.hcs.de (Postfix, from userid 200) id 4C3B4520; Thu, 4 Jan 2001 12:07:26 +0100 (MET) Subject: Re: 2 Teles PCI cards in one PC In-Reply-To: <20010103202838.A26571@tmp.com.br> "from Sergio de Souza Prallon at Jan 3, 2001 08:28:38 pm" To: Sergio de Souza Prallon Date: Thu, 4 Jan 2001 12:07:26 +0100 (MET) Cc: ISDN Mailinglist Reply-To: hm@hcs.de Organization: HCS Hanseatischer Computerservice GmbH X-Mailer: ELM [version 2.4ME+ PL84 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Message-Id: <20010104110726.4C3B4520@hcswork.hcs.de> From: hm@hcs.de (Hellmuth Michaelis) Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org From the keyboard of Sergio de Souza Prallon: > > In logs I noticed strange messages: > > > > Jan 3 22:54:07 radi /kernel: i4b-L2 F_ILL: FSM function F_ILL execu > > ting > > Jan 3 22:54:07 radi /kernel: i4b-L2 i4b_next_l2state: FSM illegal s > > tate, state = ST_EST_AW_TEI, event = EV_DLESTRQ! > > Jan 3 22:54:07 radi /kernel: i4b: unit 1, assigned TEI = 92 = 0x5c This looks like a problem when the first connection is established and a TEI needs to be assigned. But finally all goes well, the TEI has been assigned. I'd ignore it for the moment. > > Jan 3 22:54:14 radi /kernel: i4b-L2 i4b_rxd_ack: ((N(R)-1)=6) != (U > > A=7) !!! > > Jan 3 22:56:59 radi /kernel: i4b-L2 i4b_rxd_ack: ((N(R)-1)=12) != ( > > UA=13) !!! This are D-channel Layer 2 recovered errors, they are quite normal from time to time but there is something wrong when they appear massively. > > Jan 3 22:57:07 radi /kernel: i4b-L1 itjc_dma_rx_intr: CRC (crc=0x00 > > 97, len=322, unit=0) This is a layer one error from the hardware driver. It may appear when the Layer 1 is being shut off or started. > It can also be related to a problem that occurs on my machine: > on almost every connection establishment I get a "i4b-L2 T200_timeout" > or a "i4b-L2 T202_timeout". This is strange and should be looked after. Sergio, perhaps you should get yourself the Q.921 european equivalent ETS 300 125 describing the timers and the whole layer 2 implementation, its available free of charge from www.etsi.org. Just for completeness, perhaps you might want to get ETS 300 012 for the layer 1 (this affects every i4b hardware driver writer) which is the european version of I.430 and ETS 300 403-1 and ETS 300 403-2 for the layer 3 which are the european version of Q.931. hellmuth -- Hellmuth Michaelis Tel +49 40 55 97 47-70 HCS Hanseatischer Computerservice GmbH Fax +49 40 55 97 47-77 Oldesloer Strasse 97-99 Mail hm [at] hcs.de D-22457 Hamburg WWW http://www.hcs.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message From owner-freebsd-isdn Thu Jan 4 3: 8:19 2001 From owner-freebsd-isdn@FreeBSD.ORG Thu Jan 4 03:08:18 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from hcshh.hcs.de (hcshh.hcs.de [194.123.40.1]) by hub.freebsd.org (Postfix) with ESMTP id 4293537B400 for ; Thu, 4 Jan 2001 03:08:17 -0800 (PST) Received: from hcswork.hcs.de (hcswork.hcs.de [192.76.124.5]) by hcshh.hcs.de (Postfix) with ESMTP id D96A15D2C; Thu, 4 Jan 2001 12:07:36 +0100 (CET) Received: by hcswork.hcs.de (Postfix, from userid 200) id 110DF520; Thu, 4 Jan 2001 12:17:02 +0100 (MET) Subject: Re: ISDN ``SABME'' event ? In-Reply-To: <200101041003.f04A3SZ45131@storm.FreeBSD.org.uk> "from Brian Somers at Jan 4, 2001 10:03:28 am" To: Brian Somers Date: Thu, 4 Jan 2001 12:17:01 +0100 (MET) Cc: freebsd-isdn@FreeBSD.org Reply-To: hm@hcs.de Organization: HCS Hanseatischer Computerservice GmbH X-Mailer: ELM [version 2.4ME+ PL84 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Message-Id: <20010104111702.110DF520@hcswork.hcs.de> From: hm@hcs.de (Hellmuth Michaelis) Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org From the keyboard of Brian Somers: > I've got a machine that occasionally loses it's ISDN > connection in such a way that I need to kill and > restart isdnd to get things to work again. > > Is this ``SABME'' event something unusual ? Should > isdnd/i4b recover ok from it ? > Jan 4 09:35:41 gate /kernel: i4b-L2-i4b_mdl_error_ind: unit = 0, location = F_MF07 > Jan 4 09:35:41 gate /kernel: i4b-L2-i4b_mdl_error_ind: error = MDL_ERR_F: peer initiated re-establishment - SABME This is some sort of layer 2 error recovery which might not function since i never had the chance to test it. On the other hand it might be a bug or malfunction in the exchange or PBX you are connected to. SABME is used to setup a layer 2 connection and this error says that an SABME was received while the connection is already there. Since you can obviously reproduce it, perhaps you can try fix it ? :-))) You'll find all the details about this in the ETS 300 125 available free of charge from www.etsi.org. hellmuth -- Hellmuth Michaelis Tel +49 40 55 97 47-70 HCS Hanseatischer Computerservice GmbH Fax +49 40 55 97 47-77 Oldesloer Strasse 97-99 Mail hm [at] hcs.de D-22457 Hamburg WWW http://www.hcs.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message From owner-freebsd-isdn Thu Jan 4 4:26:53 2001 From owner-freebsd-isdn@FreeBSD.ORG Thu Jan 4 04:26:49 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from mail.gmx.net (pop.gmx.net [194.221.183.20]) by hub.freebsd.org (Postfix) with SMTP id EAC7637B404 for ; Thu, 4 Jan 2001 04:26:48 -0800 (PST) Received: (qmail 31265 invoked by uid 0); 4 Jan 2001 12:26:46 -0000 Received: from p3e9bc1bc.dip.t-dialin.net (HELO forge.local) (62.155.193.188) by mail.gmx.net (mail07) with SMTP; 4 Jan 2001 12:26:46 -0000 Received: from thomas by forge.local with local (Exim 3.16 #1 (Debian)) id 14E9rh-0000HM-00 for ; Thu, 04 Jan 2001 13:51:33 +0100 Date: Thu, 4 Jan 2001 13:51:33 +0100 To: freebsd-isdn@freebsd.org Subject: Problems with ISDN SyncPPP in -CURRENT Message-ID: <20010104135132.A1052@crow.dom2ip.de> Mail-Followup-To: tmoestl@gmx.net, freebsd-isdn@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i From: Thomas Moestl Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi, I am trying to set up ISDN SyncPPP on a very recently cvsupped -CURRENT box, but can not get it to work. I have got a AVM Fritz Card PCI, dmesg (sorry for over-long lines): ifpi0: port 0xcc 00-0xcc1f mem 0xefffeee0-0xefffeeff irq 12 at device 13.0 on pci0 ifpi0: ISAC 2085 Version A1/A2 or 2086/2186 Version 1.1 (IOM-2) ifpi0: passive stack unit 0 I use isp0 for SyncPPP: raven# ifconfig isp0 isp0: flags=a011 mtu 1500 inet 0.0.0.0 --> 0.0.0.1 netmask 0xff000000 ether 00:00:00:00:00:00 raven# ispppcontrol isp0 isp0: phase=dead myauthproto=pap myauthname="XXX" lcp timeout: 3.000 s enable_vj: on The ispppcontrol call to set the device up is: ispppcontrol myauthproto=pap myauthname='XXX' myauthsecret='YYY' hisauthproto=none Everytime I try to dial up isp0, the connection is established, the LCP negotiation seems to be OK, but there is just no answer received on the PAP authetication try: isp0: lcp open(initial) isp0: phase establish isp0: Up event isp0: lcp up(starting) isp0: lcp output isp0: lcp input(req-sent): isp0: lcp parse opts: mru auth-proto lcp/0x11 [rej] lcp/0x13 [rej] send conf-rej isp0: lcp output isp0: lcp input(req-sent): isp0: lcp input(ack-rcvd): isp0: lcp parse opts: mru auth-proto isp0: lcp parse opt values: mru 1524 auth-proto send conf-ack isp0: lcp output isp0: lcp tlu isp0: phase authenticate isp0: pap output isp0: pap peer TO isp0: pap output isp0: lcp down(opened) isp0: phase terminate isp0: Down event (carrier loss) isp0: lcp close(starting) isp0: phase dead , and so forth, all PAP tries time out (the timeouts are reasonably long). I have a -STABLE setup (on a different box) with a setup that is identical as much as possible. Dialup works with the same auth data. Toying with timeout and compression options does not help. My ISP is T-Online in Germany. I have not tried -STABLE on the same box, so I cannot confirm that this is not caused by flaky hardware. On some boots, I additionally get messages like: Jan 3 23:57:06 raven /boot/kernel/kernel: i4b-L1 ifpi_isac_exir_hdlr: EXIRQ Rx Frame Overflow But even on successful boots, I do not get past the PAP authentication. Has anyone experienced similar problems? I suppose that my ISP's PPP implementation may be somewhat flawed. Besides, there seems to be a small typo in usr.sbin/i4b/isdnd/rc_scan.l that breaks the ppp-expect-* options. This patch should fix it: *** usr.sbin/i4b/isdnd/rc_scan.l~ Mon Oct 9 16:22:39 2000 --- usr.sbin/i4b/isdnd/rc_scan.l Thu Jan 4 00:29:44 2001 *************** *** 149,155 **** ppp-auth-paranoid { return PPP_AUTH_PARANOID; } ppp-expect-auth { return PPP_EXPECT_AUTH; } ppp-expect-name { return PPP_EXPECT_NAME; } ! ppp-expect-password { return PPP_EXPECT_NAME; } ppp-send-auth { return PPP_SEND_AUTH; } ppp-send-name { return PPP_SEND_NAME; } ppp-send-password { return PPP_SEND_PASSWORD; } --- 149,155 ---- ppp-auth-paranoid { return PPP_AUTH_PARANOID; } ppp-expect-auth { return PPP_EXPECT_AUTH; } ppp-expect-name { return PPP_EXPECT_NAME; } ! ppp-expect-password { return PPP_EXPECT_PASSWORD; } ppp-send-auth { return PPP_SEND_AUTH; } ppp-send-name { return PPP_SEND_NAME; } ppp-send-password { return PPP_SEND_PASSWORD; } TIA, - thomas To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message From owner-freebsd-isdn Thu Jan 4 11:11: 9 2001 From owner-freebsd-isdn@FreeBSD.ORG Thu Jan 4 11:11:07 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from gw2.dnepr.net (CoreGW2-TBone.dnepr.net [195.24.156.97]) by hub.freebsd.org (Postfix) with ESMTP id 5175237B400 for ; Thu, 4 Jan 2001 11:11:01 -0800 (PST) Received: from dnepr.net (dnepr.net [195.24.156.98]) by gw2.dnepr.net (8.8.8/8.6.18/01) with ESMTP id VAA04179; Thu, 4 Jan 2001 21:10:02 +0200 (EET) Received: (from land@localhost) by dnepr.net (8.8.8/8.8.8) id VAA19394; Thu, 4 Jan 2001 21:09:57 +0200 (EET) Date: Thu, 4 Jan 2001 21:09:57 +0200 From: Andrey Lakhno To: freebsd-isdn@freebsd.org Cc: prallon@tmp.com.br Subject: Re: 2 Teles PCI cards in one PC Message-ID: <20010104210957.A18832@dnepr.net> Mail-Followup-To: freebsd-isdn@freebsd.org, prallon@tmp.com.br References: <20010102093844.A10729@dnepr.net> <20010102085741.ED8243A1@hcswork.hcs.de> <20010102110719.A829@dnepr.net> <20010102151432.A21821@tmp.com.br> <20010103002019.A11223@dnepr.net> <20010103150832.A19526@tmp.com.br> <20010103231021.A27703@dnepr.net> <20010103202838.A26571@tmp.com.br> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010103202838.A26571@tmp.com.br>; from prallon@tmp.com.br on Wed, Jan 03, 2001 at 20:28:38 -0200 Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi Sergio! On Wed, 03 Jan 2001, Sergio de Souza Prallon wrote: > On Wed, Jan 03, 2001 at 11:10:21PM +0200, Andrey Lakhno wrote: > > Hi Sergio! > > > > I need load balancing with 4 B-channels. So I'll use userland ppp. > > > [...] > > It seems it works. At least computer doesn't reboots. > > Tomorrow I'll try to test it with 2 ISDN lines. Only one line available now. > > > > Cool! That will be a good test for the driver. It works ! 4 B-channels with userland ppp (Multi-Link mode). -- Best regards, Andrey To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message From owner-freebsd-isdn Fri Jan 5 8:28:20 2001 From owner-freebsd-isdn@FreeBSD.ORG Fri Jan 5 08:28:14 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from ns.raditex.se (mail.raditex.se [192.5.36.21]) by hub.freebsd.org (Postfix) with ESMTP id 3056637B404 for ; Fri, 5 Jan 2001 08:28:13 -0800 (PST) Received: from bombadil.sickla.raditex.se (gandalf.raditex.se [192.5.36.18]) by ns.raditex.se (8.9.3/8.9.3) with ESMTP id RAA29989 for ; Fri, 5 Jan 2001 17:28:11 +0100 (CET) (envelope-from anygard@raditex.se) Date: Fri, 5 Jan 2001 17:28:11 +0100 (CET) From: Anders Nygard X-Sender: anygard@bombadil.sickla.raditex.se To: freebsd-isdn@FreeBSD.ORG Subject: Massive problems Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org If this is a FAQ, point me to it, please. My system is a plain vanilla 4.1-STABLE, I have read and followed the CFI4B ('The Care and Feeding of ISDN4BSD') 0.90.=20 I have recently installed FreeBSD on my 'server/router/firewall' at home but my ISDN problems has gotten me into considering switching back to Linux=20 this is my isdnd.rc: system acctall =3D on # generate info for everything acctfile =3D /var/log/isdnd.acct # name & location of accounting file useacctfile =3D yes # generate accouting info to file monitor-allowed =3D no # global switch: monitor on/off rtprio =3D 25 # modify isdnd's process priority beepconnect =3D on entry name =3D FNV usrdevicename =3D isp usrdeviceunit =3D 0 isdncontroller =3D 0 isdnchannel =3D -1 local-phone-incoming =3D remote-phone-incoming =3D * local-phone-dialout =3D remote-phone-dialout =3D remdial-handling =3D first dialin-reaction =3D accept dialout-type =3D normal b1protocol =3D hdlc idletime-incoming =3D 180 idletime-outgoing =3D 180 ratetype =3D 0 unitlength =3D 90 unitlengthsrc =3D rate dialretries =3D 10 dialrandincr =3D on recoverytime =3D 5 usedown =3D off downtries =3D 2 downtime =3D 30 I HUP isdnd and it does not complain, I the proceed with a=20 =09spppcontrol isp0 myauthproto=3Dchap=20 and get the response =09spppcontrol: SIOCGIFGENERIC(SPPPIOGDEFS): Bad address What does that mean? If I then try: =09ifconfig isp0 0.0.0.0 192.168.254.1 netmask 0xffffffff link1 debug I get =09ifconfig: ioctl (SIOCAIFADDR): File exists Although it seems to do its thing since ifconfig returns: =09isp0: flags=3Da015 mtu 1500 =09=09inet 0.0.0.0 --> 192.168.254.1 netmask 0xffffffff=20 =09=09inet6 fe80::250:baff:fe06:df15%isp0 --> :: prefixlen 64 scopeid 0xc=20 =09=09ether 00:00:00:00:00:00 I then find the follwing in /var/log/messages=20 Jan 5 17:18:15 fnv /kernel: isp0: lcp close(initial) Jan 5 17:18:15 fnv /kernel: isp0: lcp open(initial) Jan 5 17:18:15 fnv /kernel: isp0: phase establish Jan 5 17:18:15 fnv /kernel: i4b: unit 0, assigned TEI =3D 65 =3D 0x41 Jan 5 17:18:15 fnv /kernel: isp0: Up event Jan 5 17:18:15 fnv /kernel: isp0: lcp up(starting) Jan 5 17:18:15 fnv /kernel: isp0: lcp output Jan 5 17:18:15 fnv /kernel: i4b-L4 i4b_l4_setup_timeout_fix_unit: 978711495: ERROR: idletime[180]+earlyhup[5] > unitlength[60]! Jan 5 17:18:15 fnv /kernel: isp0: lcp input(req-sent): Jan 5 17:18:15 fnv /kernel: isp0: lcp parse opts: mru async-map auth-proto [not configured] magic addr-comp [rej] lcp/0x11 [rej] lcp/0x13 [rej] lcp/0x17 [rej] send conf-rej Jan 5 17:18:15 fnv /kernel: isp0: lcp output Jan 5 17:18:15 fnv /kernel: isp0: lcp input(req-sent): Jan 5 17:18:16 fnv /kernel: isp0: lcp input(ack-rcvd): Jan 5 17:18:16 fnv /kernel: isp0: lcp parse opts: mru async-map magic= =20 Jan 5 17:18:16 fnv /kernel: isp0: lcp parse opt values: mru 1524 async-map magic 0x1f046a95 send conf-ack Jan 5 17:18:16 fnv /kernel: isp0: lcp output Jan 5 17:18:16 fnv /kernel: isp0: lcp tlu Jan 5 17:18:16 fnv /kernel: isp0: phase network Jan 5 17:18:16 fnv /kernel: isp0: ipcp open(initial) Jan 5 17:18:16 fnv /kernel: isp0: ipcp up(starting) Jan 5 17:18:16 fnv /kernel: isp0: ipcp output Jan 5 17:18:16 fnv /kernel: isp0: lcp input(opened): Jan 5 17:18:16 fnv /kernel: isp0: phase terminate Jan 5 17:18:16 fnv /kernel: isp0: ipcp down(req-sent) Jan 5 17:18:16 fnv /kernel: isp0: ipcp close(starting) Jan 5 17:18:16 fnv /kernel: isp0: lcp send terminate-ack Jan 5 17:18:16 fnv /kernel: isp0: lcp output Jan 5 17:18:16 fnv /kernel: isp0: lcp down(stopping) Jan 5 17:18:16 fnv /kernel: isp0: Down event (carrier loss) Jan 5 17:18:16 fnv /kernel: isp0: lcp close(starting) Jan 5 17:18:16 fnv /kernel: isp0: phase dead Jan 5 17:18:21 fnv /kernel: isp0: lcp open(initial) Jan 5 17:18:21 fnv /kernel: isp0: phase establish Jan 5 17:18:22 fnv /kernel: isp0: Up event Jan 5 17:18:22 fnv /kernel: isp0: lcp up(starting) Jan 5 17:18:22 fnv /kernel: isp0: lcp output Jan 5 17:18:22 fnv /kernel: i4b-L4 i4b_l4_setup_timeout_fix_unit: 978711502: ERROR: idletime[180]+earlyhup[5] > unitlength[60]! Jan 5 17:18:22 fnv /kernel: isp0: lcp input(req-sent): Jan 5 17:18:22 fnv /kernel: isp0: lcp parse opts: mru async-map auth-proto [not configured] magic addr-comp [rej] lcp/0x11 [rej] lcp/0x13 [rej] lcp/0x17 [rej] send conf-rej Jan 5 17:18:22 fnv /kernel: isp0: lcp output Jan 5 17:18:22 fnv /kernel: isp0: lcp input(req-sent): Jan 5 17:18:22 fnv /kernel: isp0: lcp input(ack-rcvd): Jan 5 17:18:22 fnv /kernel: isp0: lcp parse opts: mru async-map magic= =20 Jan 5 17:18:22 fnv /kernel: isp0: lcp parse opt values: mru 1524 async-map magic 0x1f046cdd send conf-ack Jan 5 17:18:22 fnv /kernel: isp0: lcp output Jan 5 17:18:22 fnv /kernel: isp0: lcp tlu Jan 5 17:18:22 fnv /kernel: isp0: phase network Jan 5 17:18:22 fnv /kernel: isp0: ipcp open(initial) Jan 5 17:18:22 fnv /kernel: isp0: ipcp up(starting) Jan 5 17:18:22 fnv /kernel: isp0: ipcp output Jan 5 17:18:22 fnv /kernel: isp0: lcp input(opened): Jan 5 17:18:22 fnv /kernel: isp0: phase terminate Jan 5 17:18:22 fnv /kernel: isp0: ipcp down(req-sent) Jan 5 17:18:22 fnv /kernel: isp0: ipcp close(starting) Jan 5 17:18:22 fnv /kernel: isp0: lcp send terminate-ack Jan 5 17:18:22 fnv /kernel: isp0: lcp output Jan 5 17:18:22 fnv /kernel: isp0: lcp down(stopping) Jan 5 17:18:22 fnv /kernel: isp0: Down event (carrier loss) Jan 5 17:18:22 fnv /kernel: isp0: lcp close(starting) Jan 5 17:18:22 fnv /kernel: isp0: phase dead =20 --=20 &ers Anders Nyg=E5rd * anygard@raditex.se * +46 (0)8 694 92 70 * UIN: 92006290= =20 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message From owner-freebsd-isdn Fri Jan 5 13:11:26 2001 From owner-freebsd-isdn@FreeBSD.ORG Fri Jan 5 13:11:24 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from ns.raditex.se (mail.raditex.se [192.5.36.21]) by hub.freebsd.org (Postfix) with ESMTP id D1F6237B402 for ; Fri, 5 Jan 2001 13:11:23 -0800 (PST) Received: from gandalf.raditex.se (gandalf.raditex.se [192.5.36.18]) by ns.raditex.se (8.9.3/8.9.3) with ESMTP id WAA30979; Fri, 5 Jan 2001 22:11:22 +0100 (CET) (envelope-from gh@raditex.se) Date: Fri, 5 Jan 2001 22:11:22 +0100 (CET) From: G Hasse X-Sender: gh@gandalf.sickla.raditex.se To: Anders Nygard Cc: freebsd-isdn@FreeBSD.ORG Subject: Re: Massive problems In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Fri, 5 Jan 2001, Anders Nygard wrote: > > If this is a FAQ, point me to it, please. > > My system is a plain vanilla 4.1-STABLE, I have read and followed the > CFI4B ('The Care and Feeding of ISDN4BSD') 0.90. > > I have recently installed FreeBSD on my 'server/router/firewall' at home > but my ISDN problems has gotten me into considering switching back to > Linux Hm... > > and get the response > > spppcontrol: SIOCGIFGENERIC(SPPPIOGDEFS): Bad address Read man ispppcontrol !!!!!! ^ ! > > What does that mean? > > If I then try: > > ifconfig isp0 0.0.0.0 192.168.254.1 netmask 0xffffffff link1 debug > > I get > > ifconfig: ioctl (SIOCAIFADDR): File exists No problem. The route entry already exists if you give several ifconfig after one another. Chech with netstat -rn locale: sv_SE.ISO_8859-1 Frågra Rasmus han har precis gjort denna resa. Göran Hasse ---------------------------------------------------------------- Göran Hasse email: gh@raditex.se Tel: +46 8 694 92 70 Raditex AB http://www.raditex.se Fax: +46 8 442 05 91 Sickla Alle 7, 1tr Mob: 070-5530148 131 34 NACKA, SWEDEN To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message From owner-freebsd-isdn Sat Jan 6 3:59:18 2001 From owner-freebsd-isdn@FreeBSD.ORG Sat Jan 6 03:59:17 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from hcshh.hcs.de (hcshh.hcs.de [194.123.40.1]) by hub.freebsd.org (Postfix) with ESMTP id D119A37B400 for ; Sat, 6 Jan 2001 03:59:16 -0800 (PST) Received: from hcswork.hcs.de (hcswork.hcs.de [192.76.124.5]) by hcshh.hcs.de (Postfix) with ESMTP id 295BA5D1B; Sat, 6 Jan 2001 12:58:34 +0100 (CET) Received: by hcswork.hcs.de (Postfix, from userid 200) id 8506E38F; Sat, 6 Jan 2001 13:08:05 +0100 (MET) Subject: Re: Massive problems In-Reply-To: "from G Hasse at Jan 5, 2001 10:11:22 pm" To: G Hasse Date: Sat, 6 Jan 2001 13:08:05 +0100 (MET) Cc: Anders Nygard , freebsd-isdn@FreeBSD.ORG Reply-To: hm@hcs.de Organization: HCS Hanseatischer Computerservice GmbH X-Mailer: ELM [version 2.4ME+ PL84 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Message-Id: <20010106120805.8506E38F@hcswork.hcs.de> From: hm@hcs.de (Hellmuth Michaelis) Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > My system is a plain vanilla 4.1-STABLE, I have read and followed the > > CFI4B ('The Care and Feeding of ISDN4BSD') 0.90. [...] > > and get the response > > > > spppcontrol: SIOCGIFGENERIC(SPPPIOGDEFS): Bad address > > Read man ispppcontrol !!!!!! No. One must use ispppcontrol with the isp interfaces from i4b 0.95 on, before that (and he uses 0.90 if he runs a plain 4.1) ispppcontrol is nonexistent and one has to use spppcontrol. Other than that i can only recommend upgrading to i4b 0.96 to Anders Nygard. hellmuth -- Hellmuth Michaelis Tel +49 40 55 97 47-70 HCS Hanseatischer Computerservice GmbH Fax +49 40 55 97 47-77 Oldesloer Strasse 97-99 Mail hm [at] hcs.de D-22457 Hamburg WWW http://www.hcs.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message From owner-freebsd-isdn Sat Jan 6 6:28:59 2001 From owner-freebsd-isdn@FreeBSD.ORG Sat Jan 6 06:28:57 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from ns.raditex.se (mail.raditex.se [192.5.36.21]) by hub.freebsd.org (Postfix) with ESMTP id 68D7437B402 for ; Sat, 6 Jan 2001 06:28:56 -0800 (PST) Received: from gandalf.raditex.se (gandalf.raditex.se [192.5.36.18]) by ns.raditex.se (8.9.3/8.9.3) with ESMTP id PAA34355; Sat, 6 Jan 2001 15:28:53 +0100 (CET) (envelope-from gh@raditex.se) Date: Sat, 6 Jan 2001 15:28:53 +0100 (CET) From: G Hasse X-Sender: gh@gandalf.sickla.raditex.se To: Hellmuth Michaelis Cc: Anders Nygard , freebsd-isdn@FreeBSD.ORG Subject: Re: Massive problems In-Reply-To: <20010106120805.8506E38F@hcswork.hcs.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sat, 6 Jan 2001, Hellmuth Michaelis wrote: > No. One must use ispppcontrol with the isp interfaces from i4b 0.95 on, > before that (and he uses 0.90 if he runs a plain 4.1) ispppcontrol is > nonexistent and one has to use spppcontrol. Sorry - I did not notice that he used the old version... :-( GH ---------------------------------------------------------------- Göran Hasse email: gh@raditex.se Tel: +46 8 694 92 70 Raditex AB http://www.raditex.se Fax: +46 8 442 05 91 Sickla Alle 7, 1tr Mob: 070-5530148 131 34 NACKA, SWEDEN To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message From owner-freebsd-isdn Sat Jan 6 7:12: 3 2001 From owner-freebsd-isdn@FreeBSD.ORG Sat Jan 6 07:11:59 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from mail4.svr.pol.co.uk (mail4.svr.pol.co.uk [195.92.193.211]) by hub.freebsd.org (Postfix) with ESMTP id 871E037B402 for ; Sat, 6 Jan 2001 07:11:58 -0800 (PST) Received: from modem-207.connecticut.dialup.pol.co.uk ([62.137.58.207] helo=DEDICATION1) by mail4.svr.pol.co.uk with smtp (Exim 3.13 #0) id 14Ev0e-0000m3-00 for isdn@freebsd.org; Sat, 06 Jan 2001 15:11:57 +0000 Message-ID: <003b01c077f3$00949670$01010a0a@DEDICATIONINET.local> From: "Andy Chantrill" To: Subject: Help Date: Sat, 6 Jan 2001 15:10:44 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hey, I'm reposting this after I got no response - can you tell I'm desperate? :) Here's some data printed to the screen just after the login prompt appears: -- i4b-L1-timer3_expired: state = F5 Identifying Input i4b-L1-isic_recover: HSCX B: ISTA = 0x0 i4b-L1-isic_recover: ISAC: ISTA = 0x0 i4b-L1-isic_recover: HSCX B: IMASK = 0x0 i4b-L1-isic_recover: HSCX A: IMASK = 0x0 i4b-L1-isic_recover: ISAC: IMASK = 0x2a i4b-L2-i4b_T202_timeout: unit 0, M202 = 3 i4b-L1-ph_data_reg: still in state F3! i4b-L3-T303_timeout: SETUP not answered, cr = 43 i4b-L3-next_l3state: FSM illegal state, state = ST_OW - Out Wait EST, event = EV_T303EXP - T303 timeout! i4b-L1-timer3_expired: state = F5 identifying input i4b-L1-isic_recover: HSCX B: ISTA = 0x0 i4b-L1-isic_recover: ISAC: ISTA = 0x0 i4b-L1-isic_recover: HSCX B: IMASK = 0x0 i4b-L1-isic_recover: HSCX A: IMASK = 0x0 i4b-L1-isic_recover: ISAC: IMASK = 0x2a -- I compiled the following settings into the kernel - anything missing or anything there I don't really need (for PPP)? -- #-- ISDN Configuration Block. --# pseudo-device "i4bq921" pseudo-device "i4bq931" pseudo-device "i4b" pseudo-device "i4btrc" 4 pseudo-device "i4bctl" pseudo-device "i4brbch" 4 pseudo-device "i4btel" 4 pseudo-device "i4bipr" 4 pseudo-device "i4bisppp" 4 pseudo-device sppp 4 options IPR_VJ #-- AVM Fritz!Card (BT Speedway). --# options "AVM_A1_PCI" device isic -- Can anyone suggest what might be causing my problems (isdnd won't dial out)? Thanks, Andy. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message From owner-freebsd-isdn Sat Jan 6 9:51:15 2001 From owner-freebsd-isdn@FreeBSD.ORG Sat Jan 6 09:51:07 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from ns.internet.dk (ns.internet.dk [194.19.140.1]) by hub.freebsd.org (Postfix) with ESMTP id 2F4B237B402; Sat, 6 Jan 2001 09:51:06 -0800 (PST) Received: (from uucp@localhost) by ns.internet.dk (8.11.1/8.11.1) with UUCP id f06HoxO75206; Sat, 6 Jan 2001 18:50:59 +0100 (CET) (envelope-from leifn@neland.dk) Received: from localhost (localhost [127.0.0.1]) by arnold.neland.dk (8.11.1/8.11.0) with ESMTP id f06HojO01838; Sat, 6 Jan 2001 18:50:51 +0100 (CET) (envelope-from leifn@neland.dk) Date: Sat, 6 Jan 2001 18:50:45 +0100 (CET) From: Leif Neland To: freebsd-isdn@freebsd.org Cc: freebsd-current@freebsd.org Subject: i4b: I'm missing something in my kernel config. Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org (fbsd-current) I lost my kernel config in august; now I'm trying to make a new. But I must be missing something in my config. I'm getting this from make buildkernel: Script started on Sat Jan 6 15:53:44 2001 gina/usr/src # make -DNOCLEAN buildkernel KERNEL=ARNOLD (I'm getting the same error without NOCLEAN; it's just for getting the typescript) -------------------------------------------------------------- >>> Rebuilding kernel(s) -------------------------------------------------------------- ===> ARNOLD mkdir -p /usr/obj/usr/src/sys cd /usr/src/sys/i386/conf; PATH=/usr/obj/usr/src/i386/usr/sbin:/usr/obj/usr/src/i386/usr/bin:/usr/obj/usr/src/i386/usr/games:/sbin:/bin:/usr/sbin:/usr/bin config -d /usr/obj/usr/src/sys/ARNOLD ARNOLD ... cd /usr/obj/usr/src/sys/ARNOLD; MAKEOBJDIRPREFIX=/usr/obj COMPILER_PATH=/usr/obj/usr/src/i386/usr/libexec:/usr/obj/usr/src/i386/usr/bin LIBRARY_PATH=/usr/obj/usr/src/i386/usr/lib:/usr/obj/usr/src/i386/usr/lib OBJFORMAT_PATH=/usr/obj/usr/src/i386/usr/libexec PERL5LIB=/usr/obj/usr/src/i386/usr/libdata/perl/5.6.0 DESTDIR=/usr/obj/usr/src/i386 INSTALL="sh /usr/src/tools/install.sh" PATH=/usr/obj/usr/src/i386/usr/sbin:/usr/obj/usr/src/i386/usr/bin:/usr/obj/usr/src/i386/usr/games:/sbin:/bin:/usr/sbin:/usr/bin MACHINE=i386 make KERNEL=kernel all linking kernel i4b_ctl.o: In function `i4bctlioctl': i4b_ctl.o(.text+0x131): undefined reference to `i4b_l1_debug' i4b_ctl.o(.text+0x157): undefined reference to `i4b_l1_debug' i4b_l2.o: In function `i4b_ph_activate_ind': i4b_l2.o(.text+0x1ea): undefined reference to `i4b_l1_debug' i4b_l2.o: In function `i4b_ph_deactivate_ind': i4b_l2.o(.text+0x22a): undefined reference to `i4b_l1_debug' i4b_l2.o: In function `i4b_mph_status_ind': i4b_l2.o(.text+0x366): undefined reference to `i4b_l1_debug' i4b_l2.o: In function `i4b_mdl_command_req': i4b_l2.o(.text+0x4f2): undefined reference to `i4b_l1l2_func' i4b_uframe.o: In function `i4b_tx_sabme': i4b_uframe.o(.text+0x422): undefined reference to `i4b_l1l2_func' i4b_uframe.o: In function `i4b_tx_dm': i4b_uframe.o(.text+0x46e): undefined reference to `i4b_l1l2_func' i4b_uframe.o: In function `i4b_tx_disc': i4b_uframe.o(.text+0x4ba): undefined reference to `i4b_l1l2_func' i4b_uframe.o: In function `i4b_tx_ua': i4b_uframe.o(.text+0x506): undefined reference to `i4b_l1l2_func' i4b_uframe.o(.text+0x555): more undefined references to `i4b_l1l2_func' follow *** Error code 1 Stop in /usr/obj/usr/src/sys/ARNOLD. *** Error code 1 Script done on Sat Jan 6 15:55:49 2001 My config is this: machine i386 cpu I586_CPU ident ARNOLD maxusers 32 options INET #InterNETworking options INET6 #IPv6 communications protocols options FFS #Berkeley Fast Filesystem options FFS_ROOT #FFS usable as root device [keep this!] options SOFTUPDATES #Enable FFS soft updates support options MFS #Memory Filesystem options MD_ROOT #MD is a potential root device options NFS #Network Filesystem options NFS_ROOT #NFS usable as root device, NFS required options MSDOSFS #MSDOS Filesystem options CD9660 #ISO 9660 Filesystem options CD9660_ROOT #CD-ROM usable as root, CD9660 required options PROCFS #Process filesystem options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!] options SCSI_DELAY=15000 #Delay (in ms) before probing SCSI options UCONSOLE #Allow users to grab the console options USERCONFIG #boot -c editor options VISUAL_USERCONFIG #visual boot -c editor options KTRACE #ktrace(1) support options SYSVSHM #SYSV-style shared memory options SYSVMSG #SYSV-style message queues options SYSVSEM #SYSV-style semaphores options P1003_1B #Posix P1003_1B real-time extensions options _KPOSIX_PRIORITY_SCHEDULING options KBD_INSTALL_CDEV # install a CDEV entry in /dev options SHOW_BUSYBUFS device isa device eisa device pci device ncr # NCR/Symbios Logic device scbus # SCSI bus (required) device da # Direct Access (disks) device sa # Sequential Access (tape etc) device cd # CD device pass # Passthrough device (direct SCSI access) device atkbdc 1 # At keyboard controller device atkbd # at keyboard device psm # psm mouse device vga # VGA screen device splash device sc 1 device npx device pmtimer device sio # 8250, 16[45]50 based serial ports device ppc device ppbus # Parallel port bus (required) device lpt # Printer device plip # TCP/IP over parallel device ppi # Parallel port interface device device miibus # MII bus support device ed # NE[12]000, SMC Ultra, 3c503, DS8390 cards device random # Entropy device options NOBLOCKRANDOM # avoid any blocking on device random device loop # Network loopback device ether # Ethernet support device sl # Kernel SLIP device ppp 1 # Kernel PPP device tun # Packet tunnel. device pty # Pseudo-ttys (telnet etc) device md # Memory "disks" device gif 4 # IPv6 and IPv4 tunneling device faith 1 # IPv6-to-IPv4 relaying (translation) device bpf # Berkeley packet filter device sppp #Generic Synchronous PPP options DRN_NGO device "i4bq921" device "i4bq931" device "i4b" device "i4btrc" 4 device "i4bctl" device "i4btel" 2 device "i4bipr" 4 device "i4bisppp" 4 Leif Neland To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message From owner-freebsd-isdn Sat Jan 6 10: 9:13 2001 From owner-freebsd-isdn@FreeBSD.ORG Sat Jan 6 10:09:10 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from hub-wue.franken.de (hub-wue.franken.de [193.141.110.10]) by hub.freebsd.org (Postfix) with ESMTP id 50E8437B400; Sat, 6 Jan 2001 10:09:10 -0800 (PST) Received: from gaspode.franken.de ([193.141.110.4]:34309 "EHLO gaspode.franken.de" ident: "NO-IDENT-SERVICE") by hub-wue.franken.de with ESMTP id <381203-14075>; Sat, 6 Jan 2001 19:09:30 +0100 Received: (from tanis@localhost) by gaspode.franken.de (8.11.1/8.9.3) id f06I97O03616; Sat, 6 Jan 2001 19:09:07 +0100 (CET) (envelope-from tanis) From: German Tischler To: Leif Neland Cc: freebsd-isdn@freebsd.org, freebsd-current@freebsd.org Subject: Re: i4b: I'm missing something in my kernel config. Message-ID: <20010106190907.A3567@gaspode.franken.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: ; from leifn@neland.dk on Sat, Jan 06, 2001 at 06:51:42PM +0100 Date: Sat, 6 Jan 2001 19:09:30 +0100 Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sat, Jan 06, 2001 at 06:51:42PM +0100, Leif Neland wrote: > options DRN_NGO > device "i4bq921" > device "i4bq931" > device "i4b" > device "i4btrc" 4 > device "i4bctl" > device "i4btel" 2 > device "i4bipr" 4 > device "i4bisppp" 4 Seems you left out "device isic". --gt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message From owner-freebsd-isdn Sat Jan 6 10:32: 9 2001 From owner-freebsd-isdn@FreeBSD.ORG Sat Jan 6 10:32:08 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from mail6.svr.pol.co.uk (mail6.svr.pol.co.uk [195.92.193.212]) by hub.freebsd.org (Postfix) with ESMTP id A82CE37B400 for ; Sat, 6 Jan 2001 10:32:07 -0800 (PST) Received: from modem-249.phosphorus.dialup.pol.co.uk ([62.136.14.249] helo=DEDICATION1) by mail6.svr.pol.co.uk with smtp (Exim 3.13 #0) id 14Ey8M-0004Et-00 for freebsd-isdn@freebsd.org; Sat, 06 Jan 2001 18:32:06 +0000 Message-ID: <001501c0780e$f6ebd5e0$01010a0a@DEDICATIONINET.local> From: "Andy Chantrill" To: Subject: Kernel Config Date: Sat, 6 Jan 2001 18:29:34 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hey, Is the following kernel configuration alright? Does it have anything I don't need / needs something else? -- #-- ISDN Configuration Block. --# pseudo-device "i4bq921" pseudo-device "i4bq931" pseudo-device "i4b" pseudo-device "i4btrc" 4 pseudo-device "i4bctl" pseudo-device "i4brbch" 4 pseudo-device "i4btel" 4 pseudo-device "i4bipr" 4 pseudo-device "i4bisppp" 4 pseudo-device sppp 4 options IPR_VJ #-- AVM Fritz!Card (BT Speedway). --# options "AVM_A1_PCI" device isic -- I'm desperate to get this working! :) Thanks, Andy. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message From owner-freebsd-isdn Sat Jan 6 10:45:14 2001 From owner-freebsd-isdn@FreeBSD.ORG Sat Jan 6 10:45:11 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from hcshh.hcs.de (hcshh.hcs.de [194.123.40.1]) by hub.freebsd.org (Postfix) with ESMTP id 3BFD337B402 for ; Sat, 6 Jan 2001 10:45:11 -0800 (PST) Received: from hcswork.hcs.de (hcswork.hcs.de [192.76.124.5]) by hcshh.hcs.de (Postfix) with ESMTP id 083195D1B; Sat, 6 Jan 2001 19:44:29 +0100 (CET) Received: by hcswork.hcs.de (Postfix, from userid 200) id 3951038F; Sat, 6 Jan 2001 19:54:01 +0100 (MET) Subject: Re: Help In-Reply-To: <003b01c077f3$00949670$01010a0a@DEDICATIONINET.local> "from Andy Chantrill at Jan 6, 2001 03:10:44 pm" To: Andy Chantrill Date: Sat, 6 Jan 2001 19:54:01 +0100 (MET) Cc: isdn@freebsd.org Reply-To: hm@hcs.de Organization: HCS Hanseatischer Computerservice GmbH X-Mailer: ELM [version 2.4ME+ PL84 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Message-Id: <20010106185401.3951038F@hcswork.hcs.de> From: hm@hcs.de (Hellmuth Michaelis) Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org From the keyboard of Andy Chantrill: > i4b-L1-timer3_expired: state = F5 Identifying Input > i4b-L1-isic_recover: HSCX B: ISTA = 0x0 > i4b-L1-isic_recover: ISAC: ISTA = 0x0 > i4b-L1-isic_recover: HSCX B: IMASK = 0x0 > i4b-L1-isic_recover: HSCX A: IMASK = 0x0 > i4b-L1-isic_recover: ISAC: IMASK = 0x2a > i4b-L2-i4b_T202_timeout: unit 0, M202 = 3 > i4b-L1-ph_data_reg: still in state F3! > i4b-L3-T303_timeout: SETUP not answered, cr = 43 > i4b-L3-next_l3state: FSM illegal state, state = ST_OW - Out Wait EST, event > = EV_T303EXP - T303 timeout! The interrupt which is generated by the card is not routed through to the drivers interrupt service routine. I answered this question the last time you asked and i remember the card was using irq 5. This irq may already be occupied by a printer port, please check your BIOS settings. And finally, this is an FAQ, please check the i4b FAQ for hints how to solve this problem and/or the FreeBSD isdn mailinglist archive. hellmuth -- Hellmuth Michaelis Tel +49 40 55 97 47-70 HCS Hanseatischer Computerservice GmbH Fax +49 40 55 97 47-77 Oldesloer Strasse 97-99 Mail hm [at] hcs.de D-22457 Hamburg WWW http://www.hcs.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message From owner-freebsd-isdn Sat Jan 6 10:56:53 2001 From owner-freebsd-isdn@FreeBSD.ORG Sat Jan 6 10:56:50 2001 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from mail2.svr.pol.co.uk (mail2.svr.pol.co.uk [195.92.193.210]) by hub.freebsd.org (Postfix) with ESMTP id 1258937B400 for ; Sat, 6 Jan 2001 10:56:50 -0800 (PST) Received: from modem-157.colorado.dialup.pol.co.uk ([62.137.57.157] helo=DEDICATION1) by mail2.svr.pol.co.uk with smtp (Exim 3.13 #0) id 14EyWE-0008FP-00; Sat, 06 Jan 2001 18:56:47 +0000 Message-ID: <002a01c07812$694d9350$01010a0a@DEDICATIONINET.local> From: "Andy Chantrill" To: Cc: References: <20010106185401.3951038F@hcswork.hcs.de> Subject: Re: Help Date: Sat, 6 Jan 2001 18:56:02 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I changed the card to a different slot (seeing as I can't assign irqs in BIOS). Grepping "irq" out of the bootlog yields the following: -- IOAPIC #0 intpin 2 -> irq 0 sym0: <875> port 0x7000-0x70ff mem 0x40100000-0x40100fff,0x40101000-0x401010ff irq 5 at device 4.0 on pci1 isic0: port 0x6000-0x601f mem 0x40000000-0x4000001f irq 10 at device 10.0 on pci0 tl0: port 0x6020-0x602f mem 0x40000020-0x4000002f irq 9 at device 16.0 on pci0 ata0: at 0x1f0 irq 14 on atapci0 fdc0: at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0 atkbd0: flags 0x1 irq 1 on atkbdc0 sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 sio1 at port 0x2f8-0x2ff irq 3 on isa0 -- Thanks, Andy. ----- Original Message ----- From: "Hellmuth Michaelis" To: "Andy Chantrill" Cc: Sent: Saturday, January 06, 2001 6:54 PM Subject: Re: Help > From the keyboard of Andy Chantrill: > > > i4b-L1-timer3_expired: state = F5 Identifying Input > > i4b-L1-isic_recover: HSCX B: ISTA = 0x0 > > i4b-L1-isic_recover: ISAC: ISTA = 0x0 > > i4b-L1-isic_recover: HSCX B: IMASK = 0x0 > > i4b-L1-isic_recover: HSCX A: IMASK = 0x0 > > i4b-L1-isic_recover: ISAC: IMASK = 0x2a > > i4b-L2-i4b_T202_timeout: unit 0, M202 = 3 > > i4b-L1-ph_data_reg: still in state F3! > > i4b-L3-T303_timeout: SETUP not answered, cr = 43 > > i4b-L3-next_l3state: FSM illegal state, state = ST_OW - Out Wait EST, event > > = EV_T303EXP - T303 timeout! > > The interrupt which is generated by the card is not routed through to > the drivers interrupt service routine. > > I answered this question the last time you asked and i remember the > card was using irq 5. This irq may already be occupied by a printer port, > please check your BIOS settings. > > And finally, this is an FAQ, please check the i4b FAQ for hints how to > solve this problem and/or the FreeBSD isdn mailinglist archive. > > hellmuth > -- > Hellmuth Michaelis Tel +49 40 55 97 47-70 > HCS Hanseatischer Computerservice GmbH Fax +49 40 55 97 47-77 > Oldesloer Strasse 97-99 Mail hm [at] hcs.de > D-22457 Hamburg WWW http://www.hcs.de > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-isdn" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message