From owner-freebsd-net@FreeBSD.ORG Sat Jul 13 20:30:49 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DF25784A for ; Sat, 13 Jul 2013 20:30:49 +0000 (UTC) (envelope-from longwitz@incore.de) Received: from dss.incore.de (dss.incore.de [195.145.1.138]) by mx1.freebsd.org (Postfix) with ESMTP id A14421EED for ; Sat, 13 Jul 2013 20:30:49 +0000 (UTC) Received: from inetmail.dmz (inetmail.dmz [10.3.0.3]) by dss.incore.de (Postfix) with ESMTP id A9D2C5CDE2; Sat, 13 Jul 2013 22:30:42 +0200 (CEST) X-Virus-Scanned: amavisd-new at incore.de Received: from dss.incore.de ([10.3.0.3]) by inetmail.dmz (inetmail.dmz [10.3.0.3]) (amavisd-new, port 10024) with LMTP id lyAkIEvQ7YJA; Sat, 13 Jul 2013 22:30:41 +0200 (CEST) Received: from mail.incore (fwintern.dmz [10.0.0.253]) by dss.incore.de (Postfix) with ESMTP id C53D95CDDD; Sat, 13 Jul 2013 22:30:41 +0200 (CEST) Received: from bsdmhs.longwitz (unknown [192.168.99.6]) by mail.incore (Postfix) with ESMTP id 5F20850861; Sat, 13 Jul 2013 22:30:41 +0200 (CEST) Message-ID: <51E1B8F0.5030100@incore.de> Date: Sat, 13 Jul 2013 22:30:40 +0200 From: Andreas Longwitz User-Agent: Thunderbird 2.0.0.19 (X11/20090113) MIME-Version: 1.0 To: pyunyh@gmail.com Subject: Re: sis(4) flow control References: <51DC1599.8040805@incore.de> <20130710023512.GB2753@michelle.cdnetworks.com> <51DDDDAB.6070100@incore.de> <20130711002557.GA6697@michelle.cdnetworks.com> In-Reply-To: <20130711002557.GA6697@michelle.cdnetworks.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jul 2013 20:30:49 -0000 Yonghyeon PYUN wrote: >>> Try attached patch and let me know how it works. >> Thanks for your patch. I will test it on next update of my soekris boxes >> with sis interfaces. Because they are all remote far away this will need >> some time. > > Ok. Make sure to check established link before testing > flow-control. 'ifconfig sis0' will show current media and you > should have something like the following. > ... > media: Ethernet autoselect (100baseTX ) > > If you don't see 'rxpause', re-negotiate flow-control with > 'ifconfig sis0 mediaopt flow'. Because sis(4) (soekris 4801) is not available for me at the moment, I tried with vr(4) (soekris 5501). In production I run both types of boxes with FreeBSD 6 and a simple SETBIT patch to honor RX pause frames. Now I want to go with FreeBSD 8 Stable and eliminate my patch. "ifconfig vr0" gives media: Ethernet autoselect (100baseTX ), therefore I tried (using serial console) "ifconfig vr0 flow" and now "ifconfig vr0" as expected gives media: Ethernet autoselect (100baseTX ), but the interface vr0 hangs. Outgoing packets are ok, but all incoming packets are blocked. In this situation I can give "ifconfig vr0 -mediaopt flowcontrol" and see after "ifconfig vr0" media: Ethernet autoselect (none) status: no carrier and one second later media: Ethernet autoselect (100baseTX ) status: active and interface works correct again. >From console: vr0: port 0xe100-0xe1ff mem 0xa0004000-0xa00040ff irq 11 at device 6.0 on pci0 vr0: Quirks: 0x2 vr0: Revision: 0x96 miibus0: on vr0 ukphy0: PHY 1 on miibus0 ukphy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto, auto-flow vr0: Ethernet address: 00:00:24:cb:1e:34 vr0: [ITHREAD] My switch is D-Link DGS-1008D green Ethernet (has support for IEEE 802.3x Flow-Control). On the same switch I have connected two other machines using msk driver (88E8050 and 88E8055) and "ifconfig msk0" gives always media: Ethernet autoselect (1000baseT ) Maybe there is a bug in vr(4) that generates the hang, but why is negotiation of flowcontrol on vr(4) not done at boot time as shown for msk(4) ? If you need more information about the hang let me know. -- Andreas Longwitz