Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jun 2009 00:40:05 GMT
From:      Pyun YongHyeon <pyunyh@gmail.com>
To:        freebsd-net@FreeBSD.org
Subject:   Re: kern/124127: [msk] watchdog timeout (missed Tx interrupts) -- recovering
Message-ID:  <200906190040.n5J0e519069495@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/124127; it has been noted by GNATS.

From: Pyun YongHyeon <pyunyh@gmail.com>
To: Duckhawk <archi.kun@gmail.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/124127: [msk] watchdog timeout (missed Tx interrupts) -- recovering
Date: Fri, 19 Jun 2009 09:43:05 +0900

 --47eKBCiAZYFK5l32
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 On Sun, Feb 22, 2009 at 07:50:03AM +0000, Duckhawk wrote:
 > The following reply was made to PR kern/124127; it has been noted by GNATS.
 > 
 > From: Duckhawk <archi.kun@gmail.com>
 > To: bug-followup@FreeBSD.org, skylord@linkline.ru
 > Cc:  
 > Subject: Re: kern/124127: [msk] watchdog timeout (missed Tx interrupts) -- 
 > 	recovering
 > Date: Sun, 22 Feb 2009 12:26:51 +0500
 > 
 >  --001636c5a26744f2de04637ccfc6
 >  Content-Type: text/plain; charset=ISO-8859-1
 >  Content-Transfer-Encoding: 7bit
 >  
 >  also, same problem. D-Link DGE-560T
 >  
 >  %uname -a
 >  FreeBSD  7.1-STABLE FreeBSD 7.1-STABLE #2: Sat Feb 21 08:32:29 YEKT 2009
 >  duckhawk@:/usr/obj/usr/src/sys/GENERIC  i386
 >  
 >  %dmesg | grep "msk"
 >  mskc0: <D-Link 560T Gigabit Ethernet> port 0x7000-0x70ff mem
 >  0xfb000000-0xfb003fff irq 16 at device 0.0 on pci1
 >  msk0: <Marvell Technology Group Ltd. Yukon EC Id 0xb6 Rev 0x02> on mskc0
 >  msk0: Ethernet address: 00:1b:11:79:53:eb
 >  miibus0: <MII bus> on msk0
 >  mskc0: [FILTER]
 >  
 >  %pciconf -lv
 >  mskc0@pci0:1:0:0:       class=0x020000 card=0x4b001186 chip=0x4b001186
 >  rev=0x13 hdr=0x00
 >      vendor     = 'D-Link System Inc'
 >      device     = 'DGE-560T PCIe Gigabit Ethernet Adapter'
 >      class      = network
 >      subclass   = ethernet
 
 Please try the following patch.
 
 --47eKBCiAZYFK5l32
 Content-Type: text/x-diff; charset=us-ascii
 Content-Disposition: attachment; filename="msk.EC.patch"
 
 Index: sys/dev/msk/if_msk.c
 ===================================================================
 --- sys/dev/msk/if_msk.c	(revision 194467)
 +++ sys/dev/msk/if_msk.c	(working copy)
 @@ -1387,27 +1387,26 @@
  	CSR_WRITE_4(sc, STAT_LIST_ADDR_HI, MSK_ADDR_HI(addr));
  	/* Set the status list last index. */
  	CSR_WRITE_2(sc, STAT_LAST_IDX, MSK_STAT_RING_CNT - 1);
 -	if (sc->msk_hw_id == CHIP_ID_YUKON_EC &&
 -	    sc->msk_hw_rev == CHIP_REV_YU_EC_A1) {
 -		/* WA for dev. #4.3 */
 -		CSR_WRITE_2(sc, STAT_TX_IDX_TH, ST_TXTH_IDX_MASK);
 -		/* WA for dev. #4.18 */
 -		CSR_WRITE_1(sc, STAT_FIFO_WM, 0x21);
 -		CSR_WRITE_1(sc, STAT_FIFO_ISR_WM, 0x07);
 -	} else {
 -		CSR_WRITE_2(sc, STAT_TX_IDX_TH, 0x0a);
 -		CSR_WRITE_1(sc, STAT_FIFO_WM, 0x10);
 -		if (sc->msk_hw_id == CHIP_ID_YUKON_XL &&
 -		    sc->msk_hw_rev == CHIP_REV_YU_XL_A0)
 -			CSR_WRITE_1(sc, STAT_FIFO_ISR_WM, 0x04);
 -		else
 -			CSR_WRITE_1(sc, STAT_FIFO_ISR_WM, 0x10);
 -		CSR_WRITE_4(sc, STAT_ISR_TIMER_INI, 0x0190);
 -	}
  	/*
 -	 * Use default value for STAT_ISR_TIMER_INI, STAT_LEV_TIMER_INI.
 +	 * XXX
 +	 * Interrupt moderation and coalescing frames should be
 +	 * controllable with sysctl variables or loader tunables
 +	 * but the relationship between status updates and
 +	 * interrupt moderation are not clear to me. Some hardware
 +	 * revisions seem to very sensitive to these parameters
 +	 * and could be resulted in poor performance as well as 
 +	 * non-working situation if improper values were chosen.
  	 */
 +	CSR_WRITE_2(sc, STAT_TX_IDX_TH, 0x0a);
 +	CSR_WRITE_1(sc, STAT_FIFO_WM, 0x10);
 +	if (sc->msk_hw_id == CHIP_ID_YUKON_XL &&
 +	    sc->msk_hw_rev == CHIP_REV_YU_XL_A0)
 +		CSR_WRITE_1(sc, STAT_FIFO_ISR_WM, 0x04);
 +	else
 +		CSR_WRITE_1(sc, STAT_FIFO_ISR_WM, 0x10);
  	CSR_WRITE_4(sc, STAT_TX_TIMER_INI, MSK_USECS(sc, 1000));
 +	CSR_WRITE_4(sc, STAT_ISR_TIMER_INI, MSK_USECS(sc, 30));
 +	CSR_WRITE_4(sc, STAT_LEV_TIMER_INI, MSK_USECS(sc, 50));
  
  	/* Enable status unit. */
  	CSR_WRITE_4(sc, STAT_CTRL, SC_STAT_OP_ON);
 
 --47eKBCiAZYFK5l32--



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