Message ID | 92818a0dc14afd5bc49ea630f1a12b13b909c71d.1397008011.git.peter.crosthwaite@xilinx.com |
---|---|
State | New |
Headers | show |
On Tue, Apr 08, 2014 at 06:52:39PM -0700, Peter Crosthwaite wrote: > From: Nathan Rossi <nathan.rossi@xilinx.com> > > Clear the BMCR Reset when writing to registers. > > Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com> > [ PC: > * Trivial style fixes to commit message > ] > Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> > --- > > 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 <b.galvani@gmail.com> 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
On Tue, Apr 08, 2014 at 06:52:39PM -0700, Peter Crosthwaite wrote: > From: Nathan Rossi <nathan.rossi@xilinx.com> > > Clear the BMCR Reset when writing to registers. > > Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com> > [ PC: > * Trivial style fixes to commit message > ] > Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> > --- > > hw/net/xilinx_axienet.c | 3 +++ > 1 file changed, 3 insertions(+) Will this patch go through Edgar's MicroBlaze tree? Just wanted to check I'm not holding it up :). Stefan
On Thu, Apr 24, 2014 at 02:03:45PM +0200, Stefan Hajnoczi wrote: > On Tue, Apr 08, 2014 at 06:52:39PM -0700, Peter Crosthwaite wrote: > > From: Nathan Rossi <nathan.rossi@xilinx.com> > > > > Clear the BMCR Reset when writing to registers. > > > > Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com> > > [ PC: > > * Trivial style fixes to commit message > > ] > > Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> > > --- > > > > hw/net/xilinx_axienet.c | 3 +++ > > 1 file changed, 3 insertions(+) > > Will this patch go through Edgar's MicroBlaze tree? Just wanted to > check I'm not holding it up :). > Hi Stefan, Feel free to take it via your tree. Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Thanks, Edgar
On Tue, Apr 08, 2014 at 06:52:39PM -0700, Peter Crosthwaite wrote: > From: Nathan Rossi <nathan.rossi@xilinx.com> > > Clear the BMCR Reset when writing to registers. > > Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com> > [ PC: > * Trivial style fixes to commit message > ] > Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> > --- > > hw/net/xilinx_axienet.c | 3 +++ > 1 file changed, 3 insertions(+) Thanks, applied to my net tree: https://github.com/stefanha/qemu/commits/net Stefan
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