From: "Reimar Döffinger" <Reimar.Doeffinger@gmx.de>
To: Naphtali Sprei <nsprei@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] hw/eepro100.c: Use extended TBD only where applicable
Date: Thu, 13 Aug 2009 15:06:38 +0200 [thread overview]
Message-ID: <20090813130638.GA19891@1und1.de> (raw)
In-Reply-To: <4A840090.8050304@redhat.com>
On Thu, Aug 13, 2009 at 03:01:20PM +0300, Naphtali Sprei wrote:
> I don't feel 100% OK with the "s->device >= i82558B" condition
> since it relies on the numeric (hex) value of those defines, which currently
> is correct, but changes (which I don't forsee now) might break it.
I think it might be best to add a
switch (device)
to nic_init and set a flag in the device context there.
There is other device-dependent stuff that needs to be added to fix some
issues, e.g. I have just added this code in order to fix the statistics
counters:
@@ -1772,6 +1751,23 @@ static void nic_init(PCIDevice *pci_dev, uint32_t device)
s = &d->eepro100;
s->device = device;
s->pci_dev = &d->dev;
+ s->stats_size = 64;
+ switch (device) {
+ case i82551:
+ break;
+ case i82557B:
+ case i82557C:
+ break;
+ case i82558B:
+ s->stats_size = 76;
+ break;
+ case i82559C:
+ case i82559ER:
+ s->stats_size = 80;
+ break;
+ default:
+ assert(!"Unknown device set");
+ }
pci_reset(s);
next prev parent reply other threads:[~2009-08-13 13:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-13 12:01 [Qemu-devel] [PATCH] hw/eepro100.c: Use extended TBD only where applicable Naphtali Sprei
2009-08-13 13:06 ` Reimar Döffinger [this message]
2009-08-29 18:17 ` Reimar Döffinger
2009-08-29 18:50 ` Reimar Döffinger
2009-08-31 16:20 ` [Qemu-devel] [PATCH] Fix for commit 3f9cb1c14dc368f41447db5f78d6248c4f100ad4 Naphtali Sprei
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=20090813130638.GA19891@1und1.de \
--to=reimar.doeffinger@gmx.de \
--cc=nsprei@redhat.com \
/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).