sonic: fix typo
PATCH 1/3 sonic: fix typo
Signed-off-by Hervé Poussineau <[email protected]>
--- hw/dp8393x.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
hw/dp8393x.c +1 -1
@@ -515,7 +515,7 @@ static void write_register(dp8393xState *s, int reg, uint16_t val)switch (reg) {/* Command register */ case SONIC_CR : -do_command (s, val);; +do_command (s, val);break ;/* Prevent write to read-only registers */ case SONIC_CAP2 :
Signature · 1 line
1.7.6.3
PATCH 3/3 sonic: reset all bits of in_use field when required
This field is 16 or 32 bit wide depending of SONIC_DCR_DW bit. Fixes network in NetBSD 5.1/arc
Signed-off-by Hervé Poussineau <[email protected]>
--- hw/dp8393x.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
hw/dp8393x.c +1 -1
@@ -817,7 +817,7 @@ static ssize_t nic_receive(VLANClientState *nc, const uint8_t * buf, size_t size/* EOL detected */ s->regs[SONIC_ISR ] |=SONIC_ISR_RDE ; }else { - data[0 * width] =0 ;/* in_use */ +memset (&data[0 * width],0 , width *sizeof (uint16_t ));/* in_use */ s->memory_rw (s->mem_opaque, ((s->regs[SONIC_URDA ] <<16 ) | s->regs[SONIC_CRDA ]) +sizeof (uint16_t ) *6 * width, (uint8_t *)data, size,1 );
Signature · 1 line
1.7.6.3
PATCH 2/3 sonic: fix netcard reset
In reply to Hervé PoussineauFrom: Herv Poussineau <[email protected]>
Signed-off-by Hervé Poussineau <[email protected]>
--- hw/dp8393x.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
hw/dp8393x.c +1 -2
@@ -845,8 +845,7 @@ static void nic_reset(void *opaque) s->regs[SONIC_CR ] =SONIC_CR_RST |SONIC_CR_STP |SONIC_CR_RXDIS ; s->regs[SONIC_DCR ] &= ~(SONIC_DCR_EXBUS |SONIC_DCR_LBR ); s->regs[SONIC_RCR ] &= ~(SONIC_RCR_LB0 |SONIC_RCR_LB1 |SONIC_RCR_BRD |SONIC_RCR_RNT ); - s->regs[SONIC_TCR ] |=SONIC_TCR_NCRS |SONIC_TCR_PTX ; - s->regs[SONIC_TCR ] &= ~SONIC_TCR_BCM ; + s->regs[SONIC_TCR ] =SONIC_TCR_NCRS |SONIC_TCR_PTX ; s->regs[SONIC_IMR ] =0 ; s->regs[SONIC_ISR ] =0 ; s->regs[SONIC_DCR2 ] =0 ;
Signature · 1 line
1.7.6.3
Would be nice to add description:
Remove a doubled semicolon.
Am 06.11.2011 22:48, schrieb Hervé Poussineau:
Quoted 2 lines
Signed-off-by Hervé Poussineau <[email protected]>
Reviewed-by Andreas Färber <[email protected]>
Andreas
Quoted 17 lines
--- hw/dp8393x.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)hw/dp8393x.c +1
-1@@ -515,7 +515,7 @@ static void write_register(dp8393xState *s, int reg, uint16_t val)switch (reg) {/* Command register */ case SONIC_CR : -do_command (s, val);; +do_command (s, val);break ;/* Prevent write to read-only registers */ case SONIC_CAP2 :
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Re: [Qemu-devel] [PATCH 2/3] sonic: fix netcard reset
In reply to Hervé PoussineauAm 06.11.2011 22:48, schrieb Hervé Poussineau:
Quoted 1 line
From: Herv Poussineau <[email protected]>
Typo.
At least to me it's not obvious why this is correct, so please add an explanatory patch description.
Andreas
Quoted 19 lines
Signed-off-by Hervé Poussineau <[email protected]>--- hw/dp8393x.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)hw/dp8393x.c +1
-2@@ -845,8 +845,7 @@ static void nic_reset(void *opaque) s->regs[SONIC_CR ] =SONIC_CR_RST |SONIC_CR_STP |SONIC_CR_RXDIS ; s->regs[SONIC_DCR ] &= ~(SONIC_DCR_EXBUS |SONIC_DCR_LBR ); s->regs[SONIC_RCR ] &= ~(SONIC_RCR_LB0 |SONIC_RCR_LB1 |SONIC_RCR_BRD |SONIC_RCR_RNT ); - s->regs[SONIC_TCR ] |=SONIC_TCR_NCRS |SONIC_TCR_PTX ; - s->regs[SONIC_TCR ] &= ~SONIC_TCR_BCM ; + s->regs[SONIC_TCR ] =SONIC_TCR_NCRS |SONIC_TCR_PTX ; s->regs[SONIC_IMR ] =0 ; s->regs[SONIC_ISR ] =0 ; s->regs[SONIC_DCR2 ] =0 ;
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Stefan Hajnoczi
AppliedQuoted 5 lines · Hervé Poussineau
Signed-off-by Hervé Poussineau <[email protected]>--- hw/dp8393x.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Thanks, applied to the trivial patches tree:
http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches
Stefan