From owner-freebsd-current@FreeBSD.ORG Tue Nov 17 19:32:44 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 52F301065670 for ; Tue, 17 Nov 2009 19:32:44 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-qy0-f176.google.com (mail-qy0-f176.google.com [209.85.221.176]) by mx1.freebsd.org (Postfix) with ESMTP id 02FE08FC16 for ; Tue, 17 Nov 2009 19:32:43 +0000 (UTC) Received: by qyk6 with SMTP id 6so237694qyk.3 for ; Tue, 17 Nov 2009 11:32:43 -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=h7aHeyNXGaMEqDmz6RhOT65cg+J40ITeHOce11v80bw=; b=oDiZBOM8XyVnIlvdOI3PavkA0aaBoQXWS6pQ6KL8vdQ/3+yVUFl6OsWS4boESwx6r2 lRlqBDDE5IQhMXDLUdiDMvd57JE8TSMertOZVHKuI/uvdjrri+5tbDzztGdl58trqMhy RWPDb8HBbm5TtLK8Lj3lIfDM/XmeryD3AHYM8= 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=I7v7ZQ9gUuKcgKwzd+4+5V8oPoQs/0RVnHQcVxjszfQixqKTP3jOPJEtNKNsX0MhAR znkpIbbkrl5Bup6offPzLMvtNcCIfrG/BZzab8jef+aCOX1l8THYhwdAMa3CRkVV+8mf 4JIUig/rL2VXuuBdx5fEoPO50mHN9Zd/2jxwg= Received: by 10.224.66.193 with SMTP id o1mr5831782qai.190.1258486362379; Tue, 17 Nov 2009 11:32:42 -0800 (PST) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id 2sm276086qwi.2.2009.11.17.11.32.36 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 17 Nov 2009 11:32:38 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Tue, 17 Nov 2009 11:32:08 -0800 From: Pyun YongHyeon Date: Tue, 17 Nov 2009 11:32:08 -0800 To: Gonzalo Nemmi Message-ID: <20091117193208.GI1262@michelle.cdnetworks.com> References: <20091111223751.GE15449@michelle.cdnetworks.com> <200911161534.34028.gnemmi@gmail.com> <20091116175450.GB1262@michelle.cdnetworks.com> <200911171650.06834.gnemmi@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="XF85m9dhOBO43t/C" Content-Disposition: inline In-Reply-To: <200911171650.06834.gnemmi@gmail.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-apci@freebsd.org, freebsd-current@freebsd.org Subject: Re: Call for bge(4) testers 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: Tue, 17 Nov 2009 19:32:44 -0000 --XF85m9dhOBO43t/C Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Nov 17, 2009 at 04:50:06PM -0200, Gonzalo Nemmi wrote: [...] > Well, I proceeded as I told you I would, applied your patch and even if > it didn't solve the problem (bge still doesn't resume) at least it > improved the previous situation given that now it doesn't loop timing > out once and again as before. > > You can find a tail from /var/log/messages in here: > http://pastebin.com/f643555f7 > > As you can see, the first 3 lines corresponds to "kldload if_bge" > Line number 4 is "acpiconf -s3" > > At line number 17 bge0 finally fails and let's the machine wake up at > line 18. > > Then, as soon as I could I issued a "ifconfig bge0" to see what I could > get .. that's what you can see from line 20 to line 41. (as you can see Ok, would you try this one? I guess bge(4) register access method could be in uninitialized state after resume. > in there, I found there are problems resuming umass devices as > well ... ) > Probably Hans can help you on USB issues. > Line 42 to 53 correspond to "kldnuload if_bge" .. which, by the way, > once unloaded, I could load it again but bge0 never showed > on "ifconfig". > > Line 54 till the end correspond to "umount_msdos /dev/ad0s1" ... which > ended with pulling the pendrive out as the system coldn't umount it ... > > I also found I get wpi0 messages on resume .. it spouts: > wpi0 could not lock memory > wpi0 could not lock memory > wpi0 could not lock memory > wpi0 could not lock memory > wpi0 could not lock memory > wpi0 could not lock memory > wpi0 could not lock memory > and then it let's the system resume. > Don't know what it really means. You'd be better to ask wpi(4) author Benjamin Close(benjsc@). > All in all .. there's _a_lot_of_problems_on_resume_ > > > Pyun, if you'd like me to try a new patch or to do some tests or > whatever, just let me know. I'm here awaiting orders :) > > Best Regards > Gonzalo Nemmi --XF85m9dhOBO43t/C Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="bge.5906.diff2" Index: sys/dev/bge/if_bge.c =================================================================== --- sys/dev/bge/if_bge.c (revision 199411) +++ sys/dev/bge/if_bge.c (working copy) @@ -2995,6 +2995,15 @@ } } + if (sc->bge_asicrev == BGE_ASICREV_BCM5906) { + val = CSR_READ_4(sc, BGE_VCPU_STATUS); + CSR_WRITE_4(sc, BGE_VCPU_STATUS, + val | BGE_VCPU_STATUS_DRV_RESET); + val = CSR_READ_4(sc, BGE_VCPU_EXT_CTRL); + CSR_WRITE_4(sc, BGE_VCPU_EXT_CTRL, + val & ~BGE_VCPU_EXT_CTRL_HALT_CPU); + } + /* * Set GPHY Power Down Override to leave GPHY * powered up in D0 uninitialized. @@ -3005,15 +3014,6 @@ /* Issue global reset */ write_op(sc, BGE_MISC_CFG, reset); - if (sc->bge_asicrev == BGE_ASICREV_BCM5906) { - val = CSR_READ_4(sc, BGE_VCPU_STATUS); - CSR_WRITE_4(sc, BGE_VCPU_STATUS, - val | BGE_VCPU_STATUS_DRV_RESET); - val = CSR_READ_4(sc, BGE_VCPU_EXT_CTRL); - CSR_WRITE_4(sc, BGE_VCPU_EXT_CTRL, - val & ~BGE_VCPU_EXT_CTRL_HALT_CPU); - } - DELAY(1000); /* XXX: Broadcom Linux driver. */ @@ -4455,6 +4455,7 @@ sc = device_get_softc(dev); BGE_LOCK(sc); + bge_reset(sc); ifp = sc->bge_ifp; if (ifp->if_flags & IFF_UP) { bge_init_locked(sc); --XF85m9dhOBO43t/C--