Skip to contentSkip to conversation

sonic: fix typo

PATCH Applied Hervé Poussineau 3 participants 6 messages Nov 6, 2011 – Nov 8, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 sonic: fix typo

---
 hw/dp8393x.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
hw/dp8393x.c +1 -1
index f66844b..cfec4cb 100644
@@ -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
#3 lore raw

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

---
 hw/dp8393x.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
hw/dp8393x.c +1 -1
index acb1604..c3e86ce 100644
@@ -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
#1 lore raw

PATCH 2/3 sonic: fix netcard reset

In reply to Hervé Poussineau

From: Herv Poussineau <[email protected]>

---
 hw/dp8393x.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
hw/dp8393x.c +1 -2
index cfec4cb..acb1604 100644
@@ -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
Reviewed-by on v1 1/3
#4 lore raw
In reply to Hervé Poussineau

Would be nice to add description:

Remove a doubled semicolon.

Am 06.11.2011 22:48, schrieb Hervé Poussineau:

Quoted 2 lines

Andreas

Quoted 17 lines
---
 hw/dp8393x.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
hw/dp8393x.c +1 -1
index f66844b..cfec4cb 100644
@@ -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
#2 lore raw

Re: [Qemu-devel] [PATCH 2/3] sonic: fix netcard reset

In reply to Hervé Poussineau

Am 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
---
 hw/dp8393x.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
hw/dp8393x.c +1 -2
index cfec4cb..acb1604 100644
@@ -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