From owner-freebsd-current@FreeBSD.ORG Mon Nov 16 20:32:40 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 E96031065670 for ; Mon, 16 Nov 2009 20:32:39 +0000 (UTC) (envelope-from gleb.kurtsou@gmail.com) Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com [209.85.218.213]) by mx1.freebsd.org (Postfix) with ESMTP id 73C7D8FC15 for ; Mon, 16 Nov 2009 20:32:39 +0000 (UTC) Received: by bwz5 with SMTP id 5so6435967bwz.3 for ; Mon, 16 Nov 2009 12:32:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=LByBMd6EDi3rhXWmn2k9zVEZ/93UKSWf29TgPojUeJ4=; b=xLOV5CIZyjHwbzLw0zvYCTrZGx43f/GvUptC+VZYpGxj6AZEyNHcvNGPw9FcRdxqhG NtZwV1Rs4lEsdwYSLjXWHb4wD8dCxSJ9wbijrLOTbTIZsteNFyRXek5LiojemaRsUfS4 6b1FB+svT+Mq6tMPoJzqdbkHLApXRpfvUcg84= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=rl1z+Kk+qu31fY4FUJPpUcUUZHJ3QBA/+LCYAAD43fJD5nv2n3Tf2kwjwUPrjIu73h 1DbZBAPmmOSXTUdJfRjtLAjtc6qb8EizilRgiOeWxcmeHrO33rspuFnnKAkpRjR2Qu9b oOZi+CdJqJqKU+jzRxKhXJRKw7idPyE5+nnyQ= Received: by 10.204.10.143 with SMTP id p15mr4116836bkp.183.1258403558349; Mon, 16 Nov 2009 12:32:38 -0800 (PST) Received: from localhost (lan-78-157-90-54.vln.skynet.lt [78.157.90.54]) by mx.google.com with ESMTPS id k29sm5036332fkk.25.2009.11.16.12.32.36 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 16 Nov 2009 12:32:37 -0800 (PST) Date: Mon, 16 Nov 2009 22:32:31 +0200 From: Gleb Kurtsou To: Pyun YongHyeon Message-ID: <20091116203231.GA1597@tops.skynet.lt> References: <200911112311.51709.mel.flynn+fbsd.current@mailing.thruhere.net> <20091111231426.GF15449@michelle.cdnetworks.com> <20091115091309.GA1539@tops.skynet.lt> <20091116181304.GC1262@michelle.cdnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20091116181304.GC1262@michelle.cdnetworks.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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 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 20:32:40 -0000 On (16/11/2009 10:13), Pyun YongHyeon wrote: > On Sun, Nov 15, 2009 at 11:13:10AM +0200, Gleb Kurtsou wrote: [...] > > 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? Patch fixes the issue. I tried rebooting several times with connected/disconnected cable. I'll let you know if any problem shows up later. Thanks, Gleb. > 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); > }