Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Nov 1999 22:49:05 +0100
From:      Gary Jennejohn <garyj@peedub.muc.de>
To:        Mark Knight <markk@knigma.org>
Cc:        freebsd-isdn@FreeBSD.ORG
Subject:   Re: Panic caused by mbuf exhaustion in i4b with AVM PCI 
Message-ID:  <199911282149.WAA01298@peedub.muc.de>
In-Reply-To: Your message of "Sun, 28 Nov 1999 11:45:01 GMT." <0jKsSAA9WRQ4EwMj@knigma.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
Mark Knight writes:
>In article <199911271916.UAA07365@peedub.muc.de>, Gary Jennejohn
><garyj@muc.de> writes
>>OK, I talked to Hellmuth about the problem and it looks like a change to
>>i4b_hscx.c, which handles it, was not back-ported to the Fritz! PCI driver.
>>
>>This patch will hopefully alleviate, or maybe even fix, the problem. This
>>one compiles :) Please test and report back to the list, thanks.
>>
>
>Thanks again!
>
>Basically the same result as the last patch when two simultaneous calls
>are placed.
>
>Only noticeable improvement was that now only one call is necessary to
>clear the problem and prevent panic.
>

Hey, my new trace appeared this time :)

So it still causes a panic ? The change should prevent that, since it
discards the receive mbuf if the queue is full, and the queue is much
smaller than the number of available mbufs.

I guess my original hack to fix this is also needed. The problem seems
to be associated with not being able to really disable the B-channel if
both are active, which appears to be the case here.

Try this patch, please. Not this is relative to the already patched code.

*** i4b_avm_fritz_pci.c_patched1	Sun Nov 28 22:35:50 1999
--- i4b_avm_fritz_pci.c_patched	Sun Nov 28 22:43:08 1999
***************
*** 1003,1008 ****
--- 1003,1027 ----
  			error++;				
  		}
  	
+ 		/*
+ 		 * check whether we're receiving data for an inactive B-channel
+ 		 * and discard it. This appears to happen for telephony when
+ 		 * both B-channels are active and one is deactivated. Since
+ 		 * it is not really possible to deactivate the channel in that
+ 		 * case (the ASIC seems to deactivate _both_ channels), the
+ 		 * "deactivated" channel keeps receiving data which can lead
+ 		 * to exhaustion of mbufs and a kernel panic.
+ 		 *
+ 		 * This is a hack, but it's the only solution I can think of
+ 		 * without having the documentation for the ASIC.
+ 		 * GJ - 28 Nov 1999
+ 		 */
+ 		 if (chan->state == HSCX_IDLE)
+ 		 {
+ 			DBGL1(L1_H_XFRERR, "avma1pp_hscx_intr", ("toss data from %d\n", h_chan));
+ 		 	error++;
+ 		 }
+ 
  		fifo_data_len = ((stat & HSCX_STAT_RML_MASK) >> 8);
  		
  		if(fifo_data_len == 0)

---
Gary Jennejohn / garyj@muc.de garyj@fkr.cpqcorp.net gj@freebsd.org




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isdn" in the body of the message




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