From: Jeff Garzik <jeff@garzik.org>
To: Michael Buesch <mb@bu3sch.de>
Cc: agb@openwrt.org, Gary Zambrano <zambrano@broadcom.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH] b44: Truncate PHY address
Date: Tue, 25 Mar 2008 23:20:49 -0400 [thread overview]
Message-ID: <47E9C111.2020005@garzik.org> (raw)
In-Reply-To: <200803251804.46422.mb@bu3sch.de>
Michael Buesch wrote:
> Some ROMs on embedded devices store incorrect values for
> the PHY address of the ethernet device.
> It looks like the number is sign-extended.
> Truncate the value by applying the PHY-address mask to it.
> The patch was tested on a bcm47xx embedded system (where the bug
> triggers) and a bcm4400 PCI card.
>
> Signed-off-by: Michael Buesch <mb@bu3sch.de>
>
> ---
>
> Jeff, this is a bugfix for 2.6.25.
>
>
> Index: wireless-testing/drivers/net/b44.c
> ===================================================================
> --- wireless-testing.orig/drivers/net/b44.c 2008-02-16 19:08:12.000000000 +0100
> +++ wireless-testing/drivers/net/b44.c 2008-03-22 01:13:21.000000000 +0100
> @@ -2082,6 +2082,11 @@ static int __devinit b44_get_invariants(
> addr = sdev->bus->sprom.et0mac;
> bp->phy_addr = sdev->bus->sprom.et0phyaddr;
> }
> + /* Some ROMs have buggy PHY addresses with the high
> + * bits set (sign extension?). Truncate them to a
> + * valid PHY address. */
> + bp->phy_addr &= 0x1F;
> +
> memcpy(bp->dev->dev_addr, addr, 6);
applied
prev parent reply other threads:[~2008-03-26 3:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-25 17:04 [PATCH] b44: Truncate PHY address Michael Buesch
2008-03-26 3:20 ` Jeff Garzik [this message]
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=47E9C111.2020005@garzik.org \
--to=jeff@garzik.org \
--cc=agb@openwrt.org \
--cc=mb@bu3sch.de \
--cc=netdev@vger.kernel.org \
--cc=zambrano@broadcom.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).