* [Qemu-devel] [PATCH] net: update nic info during device reset
@ 2013-10-17 8:38 Amos Kong
2013-10-17 9:34 ` Michael S. Tsirkin
2013-10-18 11:26 ` Stefan Hajnoczi
0 siblings, 2 replies; 3+ messages in thread
From: Amos Kong @ 2013-10-17 8:38 UTC (permalink / raw)
To: qemu-devel; +Cc: anthony, stefanha, mst
macaddr is reset during device reset, but nic info
isn't updated, this problem exists in e1000 & rtl8139
Signed-off-by: Amos Kong <akong@redhat.com>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] net: update nic info during device reset
2013-10-17 8:38 [Qemu-devel] [PATCH] net: update nic info during device reset Amos Kong
@ 2013-10-17 9:34 ` Michael S. Tsirkin
2013-10-18 11:26 ` Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Michael S. Tsirkin @ 2013-10-17 9:34 UTC (permalink / raw)
To: Amos Kong; +Cc: anthony, qemu-devel, stefanha
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 <akong@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] net: update nic info during device reset
2013-10-17 8:38 [Qemu-devel] [PATCH] net: update nic info during device reset Amos Kong
2013-10-17 9:34 ` Michael S. Tsirkin
@ 2013-10-18 11:26 ` Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2013-10-18 11:26 UTC (permalink / raw)
To: Amos Kong; +Cc: stefanha, qemu-devel, anthony, mst
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 <akong@redhat.com>
> ---
> hw/net/e1000.c | 1 +
> hw/net/rtl8139.c | 1 +
> 2 files changed, 2 insertions(+)
Thanks, applied to my net tree:
https://github.com/stefanha/qemu/commits/net
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-10-18 11:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-17 8:38 [Qemu-devel] [PATCH] net: update nic info during device reset Amos Kong
2013-10-17 9:34 ` Michael S. Tsirkin
2013-10-18 11:26 ` Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).