From: Roger Luethi <rl@hellgate.ch>
To: Jeff Garzik <jgarzik@pobox.com>, Andrew Morton <akpm@osdl.org>
Cc: netdev@oss.sgi.com
Subject: [2/3][PATCH 2.6] netdrivers: fix mc_filter on big-endian arch
Date: Sun, 6 Jun 2004 18:53:36 +0200 [thread overview]
Message-ID: <20040606165336.GA13840@k3.hellgate.ch> (raw)
This untested patch fixes hardware mc filters for tulip_core, winbond,
and atp. Hopefully :-).
Please review and test.
Signed-off-by: Roger Luethi <rl@hellgate.ch>
--- 2.6-bk/drivers/net/tulip/winbond-840.c.orig 2004-06-06 18:03:51.502473098 +0200
+++ 2.6-bk/drivers/net/tulip/winbond-840.c 2004-06-06 18:04:18.807205433 +0200
@@ -1439,7 +1439,7 @@
i++, mclist = mclist->next) {
int filterbit = (ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26) ^ 0x3F;
filterbit &= 0x3f;
- mc_filter[filterbit >> 5] |= cpu_to_le32(1 << (filterbit & 31));
+ mc_filter[filterbit >> 5] |= 1 << (filterbit & 31);
}
rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys;
}
--- 2.6-bk/drivers/net/tulip/tulip_core.c.orig 2004-06-06 18:03:46.319283616 +0200
+++ 2.6-bk/drivers/net/tulip/tulip_core.c 2004-06-06 18:04:36.263478849 +0200
@@ -1059,7 +1059,7 @@
else
filterbit = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26;
filterbit &= 0x3f;
- mc_filter[filterbit >> 5] |= cpu_to_le32(1 << (filterbit & 31));
+ mc_filter[filterbit >> 5] |= 1 << (filterbit & 31);
if (tulip_debug > 2) {
printk(KERN_INFO "%s: Added filter for %2.2x:%2.2x:%2.2x:"
"%2.2x:%2.2x:%2.2x %8.8x bit %d.\n", dev->name,
--- 2.6-bk/drivers/net/atp.c.orig 2004-06-06 18:03:34.351155626 +0200
+++ 2.6-bk/drivers/net/atp.c 2004-06-06 18:04:55.176526236 +0200
@@ -909,7 +909,7 @@
i++, mclist = mclist->next)
{
int filterbit = ether_crc_le(ETH_ALEN, mclist->dmi_addr) & 0x3f;
- mc_filter[filterbit >> 5] |= cpu_to_le32(1 << (filterbit & 31));
+ mc_filter[filterbit >> 5] |= 1 << (filterbit & 31);
}
new_mode = CMR2h_Normal;
}
reply other threads:[~2004-06-06 16:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20040606165336.GA13840@k3.hellgate.ch \
--to=rl@hellgate.ch \
--cc=akpm@osdl.org \
--cc=jgarzik@pobox.com \
--cc=netdev@oss.sgi.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).