From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXzdk-0003G7-RI for qemu-devel@nongnu.org; Wed, 09 Apr 2014 17:02:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WXzde-0004cZ-SZ for qemu-devel@nongnu.org; Wed, 09 Apr 2014 17:02:36 -0400 Received: from mail-ee0-x230.google.com ([2a00:1450:4013:c00::230]:54680) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXzde-0004cU-LO for qemu-devel@nongnu.org; Wed, 09 Apr 2014 17:02:30 -0400 Received: by mail-ee0-f48.google.com with SMTP id b57so2304910eek.35 for ; Wed, 09 Apr 2014 14:02:29 -0700 (PDT) Date: Wed, 9 Apr 2014 23:02:18 +0200 From: Beniamino Galvani Message-ID: <20140409210217.GB794@gmail.com> References: <92818a0dc14afd5bc49ea630f1a12b13b909c71d.1397008011.git.peter.crosthwaite@xilinx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <92818a0dc14afd5bc49ea630f1a12b13b909c71d.1397008011.git.peter.crosthwaite@xilinx.com> Subject: Re: [Qemu-devel] [PATCH microblaze v1 1/1] net: xilinx_axienet.c: Add phy soft reset bit clearing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: edgar.iglesias@gmail.com, nathan.rossi@xilinx.com, qemu-devel@nongnu.org, stefanha@redhat.com On Tue, Apr 08, 2014 at 06:52:39PM -0700, Peter Crosthwaite wrote: > From: Nathan Rossi > > Clear the BMCR Reset when writing to registers. > > Signed-off-by: Nathan Rossi > [ PC: > * Trivial style fixes to commit message > ] > Signed-off-by: Peter Crosthwaite > --- > > hw/net/xilinx_axienet.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/hw/net/xilinx_axienet.c b/hw/net/xilinx_axienet.c > index 839d97c..0f485a0 100644 > --- a/hw/net/xilinx_axienet.c > +++ b/hw/net/xilinx_axienet.c > @@ -142,6 +142,9 @@ tdk_write(struct PHY *phy, unsigned int req, unsigned int data) > phy->regs[regnum] = data; > break; > } > + > + /* Unconditionally clear regs[BMCR][BMCR_RESET] */ > + phy->regs[0] &= ~0x8000; > } > > static void > -- Reviewed-by: Beniamino Galvani Ideally we should also restore default values of registers after a reset, but probably it is not required for the guest to operate properly. Beniamino