On 30 June 2011 20:28, Anthony PERARD <[email protected]> wrote:
> @@ -202,6 +201,11 @@ rxbufsize(uint32_t v)
> static void
> set_ctrl(E1000State *s, int index, uint32_t val)
> {
> + DBGOUT(IO, "set ctrl = %08x\n", val);
> + if (val & E1000_CTRL_RST) {
> + s->mac_reg[CTRL] = val;
> + e1000_reset(s);
> + }
> /* RST is self clearing */
> s->mac_reg[CTRL] = val & ~E1000_CTRL_RST;
> }
This is still not right -- you want something like:
if (val & E1000_CTRL_RST) {
e1000_reset(s);
return;
}
s->mac_reg[CTRL] = val;
-- PMM