qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Weil <weil@mail.berlios.de>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH 1/9] eepro100: Avoid duplicate debug messages
Date: Thu, 31 Mar 2011 22:33:23 +0200	[thread overview]
Message-ID: <1301603611-7964-2-git-send-email-weil@mail.berlios.de> (raw)
In-Reply-To: <1301603611-7964-1-git-send-email-weil@mail.berlios.de>

When DEBUG_EEPRO100 was enabled, unsupported writes were logged twice.
Now logging in eepro100_write1 and eepro100_write2 is similar to the
logging in eepro100_write4 (which already was correct).

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 hw/eepro100.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/hw/eepro100.c b/hw/eepro100.c
index edf48f6..f89ff17 100644
--- a/hw/eepro100.c
+++ b/hw/eepro100.c
@@ -1,7 +1,7 @@
 /*
  * QEMU i8255x (PRO100) emulation
  *
- * Copyright (C) 2006-2010 Stefan Weil
+ * Copyright (C) 2006-2011 Stefan Weil
  *
  * Portions of the code are copies from grub / etherboot eepro100.c
  * and linux e100.c.
@@ -1393,18 +1393,20 @@ static void eepro100_write1(EEPRO100State * s, uint32_t addr, uint8_t val)
         memcpy(&s->mem[addr], &val, sizeof(val));
     }
 
-    TRACE(OTHER, logout("addr=%s val=0x%02x\n", regname(addr), val));
-
     switch (addr) {
     case SCBStatus:
+        TRACE(OTHER, logout("addr=%s val=0x%02x\n", regname(addr), val));
         break;
     case SCBAck:
+        TRACE(OTHER, logout("addr=%s val=0x%02x\n", regname(addr), val));
         eepro100_acknowledge(s);
         break;
     case SCBCmd:
+        TRACE(OTHER, logout("addr=%s val=0x%02x\n", regname(addr), val));
         eepro100_write_command(s, val);
         break;
     case SCBIntmask:
+        TRACE(OTHER, logout("addr=%s val=0x%02x\n", regname(addr), val));
         if (val & BIT(1)) {
             eepro100_swi_interrupt(s);
         }
@@ -1418,6 +1420,7 @@ static void eepro100_write1(EEPRO100State * s, uint32_t addr, uint8_t val)
         TRACE(OTHER, logout("addr=%s val=0x%02x\n", regname(addr), val));
         break;
     case SCBeeprom:
+        TRACE(OTHER, logout("addr=%s val=0x%02x\n", regname(addr), val));
         eepro100_write_eeprom(s->eeprom, val);
         break;
     default:
@@ -1433,18 +1436,19 @@ static void eepro100_write2(EEPRO100State * s, uint32_t addr, uint16_t val)
         memcpy(&s->mem[addr], &val, sizeof(val));
     }
 
-    TRACE(OTHER, logout("addr=%s val=0x%04x\n", regname(addr), val));
-
     switch (addr) {
     case SCBStatus:
+        TRACE(OTHER, logout("addr=%s val=0x%04x\n", regname(addr), val));
         s->mem[SCBAck] = (val >> 8);
         eepro100_acknowledge(s);
         break;
     case SCBCmd:
+        TRACE(OTHER, logout("addr=%s val=0x%04x\n", regname(addr), val));
         eepro100_write_command(s, val);
         eepro100_write1(s, SCBIntmask, val >> 8);
         break;
     case SCBeeprom:
+        TRACE(OTHER, logout("addr=%s val=0x%04x\n", regname(addr), val));
         eepro100_write_eeprom(s->eeprom, val);
         break;
     default:
-- 
1.7.2.5

  reply	other threads:[~2011-03-31 20:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-31 20:33 [Qemu-devel] eepro100: Improve emulation and portability Stefan Weil
2011-03-31 20:33 ` Stefan Weil [this message]
2011-03-31 20:33 ` [Qemu-devel] [PATCH 2/9] eepro100: Fix endianness issues Stefan Weil
2011-03-31 21:52   ` [Qemu-devel] " Michael S. Tsirkin
2011-04-01 17:52     ` Stefan Weil
2011-04-03 11:40       ` Michael S. Tsirkin
2011-03-31 20:33 ` [Qemu-devel] [PATCH 3/9] eepro100: Support byte/word writes to port address Stefan Weil
2011-03-31 20:33 ` [Qemu-devel] [PATCH 4/9] eepro100: Support byte/word writes to pointer register Stefan Weil
2011-03-31 20:33 ` [Qemu-devel] [PATCH 5/9] eepro100: Support byte/word read/write access to MDI control register Stefan Weil
2011-03-31 20:33 ` [Qemu-devel] [PATCH 6/9] eepro100: Support byte read access to general " Stefan Weil
2011-03-31 20:33 ` [Qemu-devel] [PATCH 7/9] eepro100: Support 32 bit read access to flash register Stefan Weil
2011-03-31 20:33 ` [Qemu-devel] [PATCH 8/9] eepro100: Pad received short frames Stefan Weil
2011-03-31 21:41   ` [Qemu-devel] " Michael S. Tsirkin
2011-04-01 17:40     ` Stefan Weil
2011-03-31 20:33 ` [Qemu-devel] [PATCH 9/9] eepro100: Simplify receive data structure Stefan Weil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1301603611-7964-2-git-send-email-weil@mail.berlios.de \
    --to=weil@mail.berlios.de \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).