Date: Thu, 14 Mar 2013 16:29:46 +0900 From: YongHyeon PYUN <pyunyh@gmail.com> To: "Eugene M. Zheganin" <emz@norma.perm.ru> Cc: freebsd-net@freebsd.org Subject: Re: FreeBSD 9.1-RELEASE + bge0 == watchdog timeout Message-ID: <20130314072946.GA1519@michelle.cdnetworks.com> In-Reply-To: <514171D1.50807@norma.perm.ru> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130314072946.GA1519>