From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36450) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWjwD-0000Yx-LV for qemu-devel@nongnu.org; Thu, 17 Oct 2013 05:32:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VWjw7-0007zh-NU for qemu-devel@nongnu.org; Thu, 17 Oct 2013 05:32:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15947) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWjw7-0007zY-Gk for qemu-devel@nongnu.org; Thu, 17 Oct 2013 05:32:07 -0400 Date: Thu, 17 Oct 2013 12:34:40 +0300 From: "Michael S. Tsirkin" Message-ID: <20131017093440.GE14596@redhat.com> References: <1381999114-3596-1-git-send-email-akong@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1381999114-3596-1-git-send-email-akong@redhat.com> Subject: Re: [Qemu-devel] [PATCH] net: update nic info during device reset List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amos Kong Cc: anthony@codemonkey.ws, qemu-devel@nongnu.org, stefanha@redhat.com On Thu, Oct 17, 2013 at 04:38:34PM +0800, Amos Kong wrote: > macaddr is reset during device reset, but nic info > isn't updated, this problem exists in e1000 & rtl8139 > > Signed-off-by: Amos Kong Acked-by: Michael S. Tsirkin > --- > hw/net/e1000.c | 1 + > hw/net/rtl8139.c | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/hw/net/e1000.c b/hw/net/e1000.c > index 7769be0..70a59fd 100644 > --- a/hw/net/e1000.c > +++ b/hw/net/e1000.c > @@ -401,6 +401,7 @@ static void e1000_reset(void *opaque) > d->mac_reg[RA] |= macaddr[i] << (8 * i); > d->mac_reg[RA + 1] |= (i < 2) ? macaddr[i + 4] << (8 * i) : 0; > } > + qemu_format_nic_info_str(qemu_get_queue(d->nic), macaddr); > } > > static void > diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c > index 248d9e9..3225f3d 100644 > --- a/hw/net/rtl8139.c > +++ b/hw/net/rtl8139.c > @@ -1214,6 +1214,7 @@ static void rtl8139_reset(DeviceState *d) > > /* restore MAC address */ > memcpy(s->phys, s->conf.macaddr.a, 6); > + qemu_format_nic_info_str(qemu_get_queue(s->nic), s->phys); > > /* reset interrupt mask */ > s->IntrStatus = 0; > -- > 1.8.3.1