From: Jeff Garzik <jgarzik@pobox.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Marcus Meissner <meissner@suse.de>,
"David S. Miller" <davem@redhat.com>,
Linux Kernel Development <linux-kernel@vger.kernel.org>,
engebret@us.ibm.com
Subject: Re: [PATCH] fixed pcnet32 multicast listen on big endian
Date: Wed, 26 Feb 2003 10:21:39 -0500 [thread overview]
Message-ID: <3E5CDB83.1070400@pobox.com> (raw)
In-Reply-To: <Pine.GSO.4.21.0302231154190.28500-100000@vervain.sonytel.be>
Geert Uytterhoeven wrote:
> On Sun, 23 Feb 2003, Geert Uytterhoeven wrote:
>
>>On Wed, 5 Feb 2003, Marcus Meissner wrote:
>>
>>>This fixes multicast listen for pcnet32 on at least powerpc and powerpc64
>>>kernels.
>>>
>>>The mcast_table is in memory referenced by the card and so it needs
>>>to be accessed in little endian mode.
>>>
>>>Ciao, Marcus
>>>
>>>--- linux-2.4.19/drivers/net/pcnet32.c.be 2003-02-05 07:59:27.000000000 +0100
>>>+++ linux-2.4.19/drivers/net/pcnet32.c 2003-02-05 08:00:22.000000000 +0100
>>>@@ -1534,7 +1534,9 @@
>>>
>>> crc = ether_crc_le(6, addrs);
>>> crc = crc >> 26;
>>>- mcast_table [crc >> 4] |= 1 << (crc & 0xf);
>>>+ mcast_table [crc >> 4] = le16_to_cpu(
>>
>> ^^^^^^^^^^^
>>
>>>+ le16_to_cpu(mcast_table [crc >> 4]) | (1 << (crc & 0xf))
>>>+ );
>>
>>Shouldn't the first conversion be `cpu_to_le16'?
>
>
> Ugh, a quick grep shows that this driver _always_ uses `le*_to_cpu()' to
> convert from CPU to little endian.
Cosmetically you are correct, and I prefer it to be changed eventually.
However programatically, it has no effect, because those cpu_to_foo and
foo_to_cpu functions either swap, or they don't. Direction doesn't
matter terribly much :)
Jeff
next prev parent reply other threads:[~2003-02-26 15:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-05 10:26 [PATCH] fixed pcnet32 multicast listen on big endian Marcus Meissner
2003-02-23 10:14 ` Geert Uytterhoeven
2003-02-23 10:56 ` Geert Uytterhoeven
2003-02-26 15:21 ` Jeff Garzik [this message]
2003-02-26 15:37 ` Geert Uytterhoeven
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=3E5CDB83.1070400@pobox.com \
--to=jgarzik@pobox.com \
--cc=davem@redhat.com \
--cc=engebret@us.ibm.com \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=meissner@suse.de \
/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