Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jan 2013 21:49:02 +0100
From:      Hans Petter Selasky <hselasky@c2i.net>
To:        Andreas Longwitz <longwitz@incore.de>
Cc:        freebsd-isdn@freebsd.org
Subject:   Re: ISDN4BSD (HPS version) is going into ports
Message-ID:  <201301152149.02167.hselasky@c2i.net>
In-Reply-To: <50F5BAF9.5020509@incore.de>
References:  <509E87EF.9070607@incore.de> <201301100813.33186.hselasky@c2i.net> <50F5BAF9.5020509@incore.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Andreas,

On Tuesday 15 January 2013 21:24:25 Andreas Longwitz wrote:
> Hi,
> 
> please forget the last passage of my last post.
> 
> In the meantime I changed some parts according to my former list to make
> 
> things work like BSD does:
> >> 2. DELAY times on startup is different: 4 ms in isdn4bsd, 10 ms in BSD
> >> 3. Initializing the chip is more expansive in BSD, otherwise the
> >> 
> >>    register cmdrd is only used in isdn4bsd.
> >> 
> >> 4. In avm_pci_fifo_reset() we write two single bytes, but BSD does one
> >> 
> >>    (atomic) four byte read. Particularly we do not write the HSCX_LEN
> >>    byte between the both written bytes (must set to 0 ?)
> >> 
> >> 5. In avm_pci_b_status_read() - analog to 4. - we read two single bytes,
> >> 
> >>    BSD (atomic) four bytes.
> 
> With these adaptions isdn4bsd/isdnd now works with my AVM Fritzcard !!
> 
> Because the driver works with "transparent mode" I observe that we have
> data exchange of 64kbit/s full duplex between chip and kernel as soon as
> a B-channel is up. And it makes no difference if I ping something over
> the line or run a ssh session or do nothing. I see about 500 irq's every
> second, I think that is the price for the tiny fifo buffer of 32 byte.

Beware that hardware HDLC can generate an even higher number of IRQ's, if 
specifically crafted messages are sent. Using transparent mode this rate is at 
least constant. I know at least one chip, the Winbond USB one, which has a 
neat feature to filter those flag datas once repeated. I was hoping the HSCX 
could do something similar.

> 
> Using the BSD driver I see for a ping only 12 irqs/sec and no irqs if
> the ping stops. Obviously thats not "transparent mode", the BSD driver
> uses HSCX_MODE_ITF_FLAG instead of HSCX_MODE_TRANS, that make probably
> the difference.
> 
> If the 500 irqs/sec is what you expected, I will send you a complete
> patchfile.

I would expect 500 * 32 = 16K. Maybe it is possible to use a timer instead for 
all cards, because 250 IRQ's second is sufficient.

Yes, I expect something like that.

> 
> Thanks again for helping to track down this long standing problem.

:-)

You're welcome!

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301152149.02167.hselasky>