From owner-freebsd-current@FreeBSD.ORG Mon Nov 16 18:13:37 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98B381065670 for ; Mon, 16 Nov 2009 18:13:37 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.25]) by mx1.freebsd.org (Postfix) with ESMTP id 45A6C8FC12 for ; Mon, 16 Nov 2009 18:13:36 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 9so1088105qwb.7 for ; Mon, 16 Nov 2009 10:13:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=jffwZkgp1DinzfaHhzIWmIXocXSm19H/pCFmSs6EnwA=; b=pIeCWoXf1WSZQASeXQc+DvEk/7M9W+Ktaqpa5ein98ebIiA86DMx5hVZvO8Vxu19eL +uKW4y24RhNr4dUfUOeC/blzK0fOEEnEKnSetcQRi1UmB0sbEETPV8OB6jJ54OZ8EOVm 9FPjTbdbGbAZHl+dg2M9AN2PhpYAZPe01++v4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=YFh6gdvz5QVMq1zbgu+INJmFBskEWvc2hKriH/evm3715jxKYcF8ZA/YAuYu3qX08f /PHfhcR7uZDJFW9xYQojxRSroFzLKTCn7CinBhcLH+hkBtmLM9spKVe9xBvT9cQXfJ5q WAMwWsGFsj1V7MVrfOxAzWh1/oEbpMdsu2MwY= Received: by 10.224.121.203 with SMTP id i11mr4963054qar.199.1258395216574; Mon, 16 Nov 2009 10:13:36 -0800 (PST) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id 20sm2643403qyk.9.2009.11.16.10.13.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 16 Nov 2009 10:13:35 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Mon, 16 Nov 2009 10:13:04 -0800 From: Pyun YongHyeon Date: Mon, 16 Nov 2009 10:13:04 -0800 To: Gleb Kurtsou Message-ID: <20091116181304.GC1262@michelle.cdnetworks.com> References: <200911112311.51709.mel.flynn+fbsd.current@mailing.thruhere.net> <20091111231426.GF15449@michelle.cdnetworks.com> <20091115091309.GA1539@tops.skynet.lt> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="CE+1k2dSO48ffgeK" Content-Disposition: inline In-Reply-To: <20091115091309.GA1539@tops.skynet.lt> User-Agent: Mutt/1.4.2.3i Cc: Mel Flynn , freebsd-current@freebsd.org Subject: Re: Possible regression with msk driver X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2009 18:13:37 -0000 --CE+1k2dSO48ffgeK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Nov 15, 2009 at 11:13:10AM +0200, Gleb Kurtsou wrote: > On (11/11/2009 15:14), Pyun YongHyeon wrote: > > On Wed, Nov 11, 2009 at 11:11:51PM +0100, Mel Flynn wrote: > > > Hi, > > > > > > I just booted a box from 7.2-p4 to FreeBSD 8.0-PRERELEASE #0 r199185. It > > > didn't ping, even though the interface was marked up and active. No traffic at > > > all. > > > > > > The fix was to ifconfig msk0 down; ifconfig msk0 up. From then on, everything > > > worked and still is: > > > mskc0: port 0xe800-0xe8ff mem > > > 0xf9efc000-0xf9efffff irq 16 at device 0.0 on pci3 > > > msk0: on mskc0 > > > msk0: Ethernet address: 00:1b:fc:e3:9b:6a > > > miibus0: on msk0 > > > e1000phy0: PHY 0 on miibus0 > > > e1000phy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, > > > 1000baseT-FDX, auto > > > mskc0: [FILTER] > > > > > > mskc0@pci0:3:0:0: class=0x020000 card=0x826e1043 chip=0x436411ab > > > rev=0x12 hdr=0x00 > > > vendor = 'Marvell Semiconductor (Was: Galileo Technology Ltd)' > > > device = 'Yukon PCI-E Gigabit Ethernet Controller (88E8056)' > > > class = network > > > subclass = ethernet > > > > > > msk0: flags=8843 metric 0 mtu 1500 > > > options=11a > > > ether 00:1b:fc:xx:xx:xx > > > inet 192.168.xxx.xxx netmask 0xffffff00 broadcast 192.168.xxx.255 > > > media: Ethernet autoselect (1000baseT ) > > > status: active > > > > > > Now - this machine still had 7.x /etc/rc.d, but since ifconfig down/up fixed > > > the problem I don't know if this is a likely suspect. > > > > > > > Most likely it lost link state changes so I guess msk(4) still > > think it has no established link. > > Because there had been several problems with EC Ultra + 88E1149 I'm > > not sure it's newly introduced regression though. There are some > > changes in CURRENT. Would you try latest msk(4)/e1000phy(4) in > > CURRENT? I think you can download the following files from CURRENT. > > sys/dev/msk/if_msk.c > > sys/dev/msk/if_mskreg.h > > sys/dev/mii/e1000phy.c > > sys/dev/mii/e1000phyreg.h > I experience similar problem. After boot msk0 status is active, but I'm > not able to send anything: > % ping 172.21.21.21 > PING 172.21.21.21 (172.21.21.21): 56 data bytes > ping: sendto: No buffer space available > ping: sendto: No buffer space available > > After unplugging cable and putting it back everything works as > expected: > % ping 172.21.21.21 > PING 172.21.21.21 (172.21.21.21): 56 data bytes > 64 bytes from 172.21.21.21: icmp_seq=0 ttl=64 time=0.904 ms > > It is 100% reproducible, running recent current. > > % uname -a > FreeBSD tops 9.0-CURRENT FreeBSD 9.0-CURRENT #17 r199274+c8076f9: Sat Nov 14 22:59:26 EET 2009 root@tops:/usr/obj/usr/freebsd-src/local/sys/TOPS amd64 > > % ifconfig > msk0: flags=8843 metric 0 mtu 1500 > options=11a > ether * > inet 172.21.21.22 netmask 0xfffffff8 broadcast 172.21.21.23 > inet6 * prefixlen 64 scopeid 0x1 > nd6 options=29 > media: Ethernet autoselect (100baseTX ) > status: active > > My hardware: > mskc0@pci0:2:0:0: class=0x020000 card=0x902d104d chip=0x435311ab rev=0x15 hdr=0x00 > vendor = 'Marvell Semiconductor (Was: Galileo Technology Ltd)' > device = 'Gigabit (88E8039 - http://www.marvell.com/drivers/driverDis)' > class = network > subclass = ethernet > I guess some changes made to reduce unnecessary controller reinitialization seems to cause the issue. Would you try attached patch? --CE+1k2dSO48ffgeK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="msk.link.patch" Index: sys/dev/msk/if_msk.c =================================================================== --- sys/dev/msk/if_msk.c (revision 199322) +++ sys/dev/msk/if_msk.c (working copy) @@ -3198,6 +3198,8 @@ mii = device_get_softc(sc_if->msk_miibus); mii_tick(mii); + if ((sc_if->msk_flags & MSK_FLAG_LINK) == 0) + msk_miibus_statchg(sc_if->msk_if_dev); msk_watchdog(sc_if); callout_reset(&sc_if->msk_tick_ch, hz, msk_tick, sc_if); } --CE+1k2dSO48ffgeK--