pcnet: Preserve link state across device reset
PATCH 1/1 pcnet: Preserve link state across device reset
A device reset does not affect the link state, only set_link does.
Signed-off-by Jan Kiszka <[email protected]>
--- hw/pcnet.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
hw/pcnet.c +2 -1
@@ -688,7 +688,6 @@ static void pcnet_s_reset(PCNetState *s)printf ("pcnet_s_reset\n" );#endif - s->lnkst =0x40 ; s->rdra =0 ; s->tdra =0 ; s->rap =0 ;
@@ -1751,5 +1750,7 @@ int pcnet_common_init(DeviceState *dev, PCNetState *s, NetClientInfo *info) } *(uint16_t *)&s->prom[12 ] =cpu_to_le16 (checksum); + s->lnkst =0x40 ;/* initial link state: up */ +return 0 ; }
Signature · 1 line
1.7.3.4
Quoted 20 lines · Jan Kiszka
A device reset does not affect the link state, only
set_linkdoes.Signed-off-by Jan Kiszka <[email protected]>--- hw/pcnet.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)hw/pcnet.c +0
-1@@ -688,7 +688,6 @@ static void pcnet_s_reset(PCNetState *s)printf ("pcnet_s_reset\n" );#endif - s->lnkst =0x40 ; s->rdra =0 ; s->tdra =0 ; s->rap =0 ;
hw/pcnet.c int pcnet_common_init(DeviceState *dev, PCNetState *s, NetClientInfo *info) · line 1756
Quoted 7 lines
hw/pcnet.c +2
-0@@ -1751,5 +1750,7 @@ int pcnet_common_init(DeviceState *dev, PCNetState *s, NetClientInfo *info) } *(uint16_t *)&s->prom[12 ] =cpu_to_le16 (checksum); + s->lnkst =0x40 ;/* initial link state: up */ +return 0 ; }
Also rather trivial.
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux
Stefan Hajnoczi
AppliedQuoted 6 lines · Jan Kiszka
A device reset does not affect the link state, only
set_linkdoes.Signed-off-by Jan Kiszka <[email protected]>--- hw/pcnet.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches
Stefan