From: Stuart Brady <sdbrady@ntlworld.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] pcnet32 driver change, please test
Date: Fri, 2 Mar 2007 23:14:50 +0000 [thread overview]
Message-ID: <20070302231450.GA6741@miranda.arrow> (raw)
In-Reply-To: <20070302200949.GD27636@networkno.de>
On Fri, Mar 02, 2007 at 08:09:49PM +0000, Thiemo Seufer wrote:
> Hello All,
>
> I changed the pcnet32 driver to get rid of bitfields in its
> implementation, now it works also on big endian host systems.
I find this curious... C99 (6.7.2.1) says "the allocation order of
bit-fields within a unit (high-order to low-order or low-order to
high-order) is implementation defined". I can't see any requirement
for this, so is it just convention that bitfields on big endian systems
start from the most significant bit, and those on little endian systems
start from the least significant bit? (My thinking is that endianness
usually refers to byte ordering and not so much bit ordering.)
I ask this because I'd seen some code of the form:
#ifdef WORDS_BIGENDIAN
typedef struct { int b7:1; int b6:1; int b5:1; int b4:1;
int b3:1; int b2:1; int b1:1; int b0:1; } foo;
#else
typedef struct { int b0:1; int b1:1; int b2:1; int b3:1;
int b4:1; int b5:1; int b6:1; int b7:1; } foo;
#endif
and I had assumed that this was sheer nonsense...
> I tested only the 32 bit mode which is used by MIPS/Malta, and
> I'm not sure if it still works in Lance mode (as e.g. used on SPARC).
> So please test if it still works.
I've tried this patch with a SPARC target running Etch, with an i386 host.
No problems so far.
(FWIW, I have noticed one bug, but it's *not* a problem with this patch.
In the Sarge installer, I see "Error while running 'modprobe -v sunlance'".
ISTR that if I use the netinstall iso and persist with the installation,
Lance works after the reboot. This problem doesn't seem to affect Etch.)
Thanks,
--
Stuart Brady
next prev parent reply other threads:[~2007-03-02 23:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-02 20:09 [Qemu-devel] [PATCH] pcnet32 driver change, please test Thiemo Seufer
2007-03-02 20:29 ` Thiemo Seufer
2007-03-03 0:38 ` Fabrice Bellard
2007-03-03 21:44 ` Thiemo Seufer
2007-03-02 23:14 ` Stuart Brady [this message]
2007-03-03 0:53 ` M. Warner Losh
2007-03-03 1:01 ` Paul Brook
2007-03-03 2:30 ` M. Warner Losh
2007-03-03 10:25 ` Andreas Schwab
2007-03-03 13:24 ` M. Warner Losh
2007-03-03 14:46 ` Andreas Schwab
2007-03-03 15:47 ` M. Warner Losh
2007-03-03 17:23 ` Andreas Schwab
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=20070302231450.GA6741@miranda.arrow \
--to=sdbrady@ntlworld.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.