summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorDon Koch <dkoch@verizon.com>2015-01-16 14:21:39 -0500
committerMichael Tokarev <mjt@tls.msk.ru>2015-02-10 09:27:20 +0300
commit15cae340094402bfe77565d7c6d09e2bb9d6601b (patch)
tree6d120c155b5f394f6936d201ba76832b38f2e653 /hw
parent32c952498b6ab740894fe83513bf43e872bf56a2 (diff)
downloadhqemu-15cae340094402bfe77565d7c6d09e2bb9d6601b.zip
hqemu-15cae340094402bfe77565d7c6d09e2bb9d6601b.tar.gz
Convert some debugging printfs to trace calls in pcnet.c.
Signed-off-by: Don Koch <dkoch@verizon.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw')
-rw-r--r--hw/net/pcnet.c28
1 files changed, 8 insertions, 20 deletions
diff --git a/hw/net/pcnet.c b/hw/net/pcnet.c
index 8486b80..7778b9a 100644
--- a/hw/net/pcnet.c
+++ b/hw/net/pcnet.c
@@ -40,6 +40,7 @@
#include "qemu/timer.h"
#include "qemu/sockets.h"
#include "sysemu/sysemu.h"
+#include "trace.h"
#include "pcnet.h"
@@ -685,9 +686,7 @@ static void pcnet_bcr_writew(PCNetState *s, uint32_t rap, uint32_t val);
static void pcnet_s_reset(PCNetState *s)
{
-#ifdef PCNET_DEBUG
- printf("pcnet_s_reset\n");
-#endif
+ trace_pcnet_s_reset(s);
s->rdra = 0;
s->tdra = 0;
@@ -760,9 +759,7 @@ static void pcnet_update_irq(PCNetState *s)
s->csr[4] |= 0x0040;
s->csr[0] |= 0x0080;
isr = 1;
-#ifdef PCNET_DEBUG
- printf("pcnet user int\n");
-#endif
+ trace_pcnet_user_int(s);
}
#if 1
@@ -777,9 +774,7 @@ static void pcnet_update_irq(PCNetState *s)
}
if (isr != s->isr) {
-#ifdef PCNET_DEBUG
- printf("pcnet: INTA=%d\n", isr);
-#endif
+ trace_pcnet_isr_change(s, isr, s->isr);
}
qemu_set_irq(s->irq, isr);
s->isr = isr;
@@ -791,9 +786,7 @@ static void pcnet_init(PCNetState *s)
uint16_t padr[3], ladrf[4], mode;
uint32_t rdra, tdra;
-#ifdef PCNET_DEBUG
- printf("pcnet_init init_addr=0x%08x\n", PHYSADDR(s,CSR_IADR(s)));
-#endif
+ trace_pcnet_init(s, PHYSADDR(s, CSR_IADR(s)));
if (BCR_SSIZE32(s)) {
struct pcnet_initblk32 initblk;
@@ -831,9 +824,7 @@ static void pcnet_init(PCNetState *s)
tdra &= 0x00ffffff;
}
-#if defined(PCNET_DEBUG)
- printf("rlen=%d tlen=%d\n", rlen, tlen);
-#endif
+ trace_pcnet_rlen_tlen(s, rlen, tlen);
CSR_RCVRL(s) = (rlen < 9) ? (1 << rlen) : 512;
CSR_XMTRL(s) = (tlen < 9) ? (1 << tlen) : 512;
@@ -852,11 +843,8 @@ static void pcnet_init(PCNetState *s)
CSR_RCVRC(s) = CSR_RCVRL(s);
CSR_XMTRC(s) = CSR_XMTRL(s);
-#ifdef PCNET_DEBUG
- printf("pcnet ss32=%d rdra=0x%08x[%d] tdra=0x%08x[%d]\n",
- BCR_SSIZE32(s),
- s->rdra, CSR_RCVRL(s), s->tdra, CSR_XMTRL(s));
-#endif
+ trace_pcnet_ss32_rdra_tdra(s, BCR_SSIZE32(s),
+ s->rdra, CSR_RCVRL(s), s->tdra, CSR_XMTRL(s));
s->csr[0] |= 0x0101;
s->csr[0] &= ~0x0004; /* clear STOP bit */
OpenPOWER on IntegriCloud