From owner-freebsd-net@FreeBSD.ORG Thu Mar 14 07:29:54 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 75716B02 for ; Thu, 14 Mar 2013 07:29:54 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-pb0-f48.google.com (mail-pb0-f48.google.com [209.85.160.48]) by mx1.freebsd.org (Postfix) with ESMTP id 4D94E914 for ; Thu, 14 Mar 2013 07:29:53 +0000 (UTC) Received: by mail-pb0-f48.google.com with SMTP id wy12so1822275pbc.21 for ; Thu, 14 Mar 2013 00:29:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:date:to:cc:subject:message-id:reply-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=I/IvLQcSvAME9hUqikjqIFzSBWmPEFYVgIKB/3lPCuM=; b=cHbKQ4xXgdBGYm1KS5j2S6GVLjcyu7wkhbARXCYAJr+pchlc+o3DzBnr70cCtFyoFz FONDhQhRjC30Pg7qlTmYxOiPkmiK+STgLl6A6B5y0Tm2ulkNjmQinwl4YOHgjXg2NK9V T8JuwoaMQhlddjDosayt4qNhdvMX3GvpWxDRoJpriOaFbWEX05DoMPsz2kcLBb3MRvX/ KiIWSU4OsS7Jh+Q6Rqdem6xazKSUucF6gKjOJGEGl+0al5pfQFb/tXo5xP4Y2hhHi7VI Zxyv6FktRuD1FfDhzRIdYpnNTTEqziX8kYEPZy5eX+UlfecM6R5XcHvOL9NNla/Urpv1 wOTQ== X-Received: by 10.68.204.10 with SMTP id ku10mr3395141pbc.41.1363246193825; Thu, 14 Mar 2013 00:29:53 -0700 (PDT) Received: from pyunyh@gmail.com (lpe4.p59-icn.cdngp.net. [114.111.62.249]) by mx.google.com with ESMTPS id rr14sm1952978pbb.34.2013.03.14.00.29.50 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 14 Mar 2013 00:29:52 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Thu, 14 Mar 2013 16:29:46 +0900 From: YongHyeon PYUN Date: Thu, 14 Mar 2013 16:29:46 +0900 To: "Eugene M. Zheganin" Subject: Re: FreeBSD 9.1-RELEASE + bge0 == watchdog timeout Message-ID: <20130314072946.GA1519@michelle.cdnetworks.com> References: <5136D89D.4000902@norma.perm.ru> <20130306062658.GC1483@michelle.cdnetworks.com> <513713C2.1000007@norma.perm.ru> <20130307022446.GB3108@michelle.cdnetworks.com> <513820E2.806@norma.perm.ru> <20130307062335.GB1478@michelle.cdnetworks.com> <51383E3B.5030007@norma.perm.ru> <20130307081548.GD1478@michelle.cdnetworks.com> <20130313015753.GD3062@michelle.cdnetworks.com> <514171D1.50807@norma.perm.ru> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="YZ5djTAD1cGYuMQK" Content-Disposition: inline In-Reply-To: <514171D1.50807@norma.perm.ru> User-Agent: Mutt/1.4.2.3i Cc: freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2013 07:29:54 -0000 --YZ5djTAD1cGYuMQK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Mar 14, 2013 at 12:44:33PM +0600, Eugene M. Zheganin wrote: > Hi. > > On 13.03.2013 07:57, YongHyeon PYUN wrote: > > > > If your controller supports ASF/IPMI access please apply r248226 > > to stable/8 and let me know whether that makes any difference. > > I believe ignoring ASF/IPMI firmware is not good idea since the > > ASF/IPMI firmware will run regardless of hw.bge.allow_asf loader > > tunable configuration. You may have to set hw.bge.allow_asf=1 > > since it's off by default on stable/8. > I'm sorry, but obviously my C skills are way to low to make a local MFC > of if_bge.c - it differs way too much from the 8.3-STABLE version, and > it affects lots of other stuff (mostly in /usr/src/dev/mii and > /usr/src/sys/sys). I tried to do this, but I failed completely. Could I thought you were using stable/8 but it seems you have slightly older stable/8. The bge(4) code difference between CURRENT and stable9/stable8 is very minor. > you please do a patch for me or can this be really MFC'd ? I got a bunch > of bge timeouts on a 8.3-STABLE machine we talked about earlier just > this morning. I really think this may become a problem for other people > too. Yup, there's another option - to upgrade to 9.x, but right now I > have unresolved issues with 9.x. I've attached diff against stable/8 which will address ASF/IPMI issue but I'm not sure whether it helps watchdog timeout or not. I have plan to MFC the change but I need time for settlement before the MFC. --YZ5djTAD1cGYuMQK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="bge.asf.stable8.diff" Index: sys/dev/bge =================================================================== --- sys/dev/bge (revision 248264) +++ sys/dev/bge (working copy) Property changes on: sys/dev/bge ___________________________________________________________________ Modified: svn:mergeinfo Merged /head/sys/dev/bge:r248226 Index: sys/dev/bge/if_bge.c =================================================================== --- sys/dev/bge/if_bge.c (revision 248264) +++ sys/dev/bge/if_bge.c (working copy) @@ -3637,15 +3637,15 @@ bge_attach(device_t dev) } bge_stop_fw(sc); - bge_sig_pre_reset(sc, BGE_RESET_START); + bge_sig_pre_reset(sc, BGE_RESET_SHUTDOWN); if (bge_reset(sc)) { device_printf(sc->bge_dev, "chip reset failed\n"); error = ENXIO; goto fail; } - bge_sig_legacy(sc, BGE_RESET_START); - bge_sig_post_reset(sc, BGE_RESET_START); + bge_sig_legacy(sc, BGE_RESET_SHUTDOWN); + bge_sig_post_reset(sc, BGE_RESET_SHUTDOWN); if (bge_chipinit(sc)) { device_printf(sc->bge_dev, "chip initialization failed\n"); @@ -3998,6 +3998,20 @@ bge_reset(struct bge_softc *sc) } else write_op = bge_writereg_ind; + if (sc->bge_asicrev != BGE_ASICREV_BCM5700 && + sc->bge_asicrev != BGE_ASICREV_BCM5701) { + CSR_WRITE_4(sc, BGE_NVRAM_SWARB, BGE_NVRAMSWARB_SET1); + for (i = 0; i < 8000; i++) { + if (CSR_READ_4(sc, BGE_NVRAM_SWARB) & + BGE_NVRAMSWARB_GNT1) + break; + DELAY(20); + } + if (i == 8000) { + if (bootverbose) + device_printf(dev, "NVRAM lock timedout!\n"); + } + } /* Take APE lock when performing reset. */ bge_ape_lock(sc, BGE_APE_LOCK_GRC); --YZ5djTAD1cGYuMQK--