On Friday 12 December 2008 14:09:27 Felix Fietkau wrote:
> Florian Fainelli wrote:
> > Le Friday 12 December 2008 02:25:00 Michael Buesch, vous avez écrit :
> >> On Friday 12 December 2008 01:59:48 [email protected] wrote:
> >> > Added:
> >> > branches/8.09/target/linux/brcm47xx/patches-2.6.25/211-b44_bcm4713_phy
> >> >.pa tch
> >> > ===================================================================
> >> > ---
> >> > branches/8.09/target/linux/brcm47xx/patches-2.6.25/211-b44_bcm4713_phy
> >> >.pa tch                           (rev 0) +++
> >> > branches/8.09/target/linux/brcm47xx/patches-2.6.25/211-b44_bcm4713_phy
> >> >.pa tch   2008-12-12 00:59:47 UTC (rev 13610) @@ -0,0 +1,14 @@
> >> > +--- a/drivers/net/b44.c 2008-11-16 15:33:32.000000000 +0100
> >> > ++++ b/drivers/net/b44.c 2008-11-18 10:36:18.000000000 +0100
> >> > +@@ -2094,6 +2094,11 @@
> >> > +                return -EINVAL;
> >> > +        }
> >> > +
> >> > ++       if (bp->sdev->id.coreid == 0x806 && bp->sdev->id.revision == 
> >> > 0x0) {
> >> > ++               bp->phy_addr = B44_PHY_ADDR_NO_PHY;
> >> > ++               bp->dma_offset = 0;
> >> > ++       }
> >> > ++
> >>
> >> this is a little bit weird.
> >> coreid == 0x806 will always be true.
> >> So you will always set phy_addr to NO_PHY for every device with core
> >> revision 0. That smells like incorrect code to me...
> >
> > I tested it with success on an Asus WL500G Deluxe. Will do more testing
> > on a WRT54GS.
>
> I also think that code is wrong. Whether the device has a PHY
> connected or not depends on the actual board, not the chip.
> So PHY related checks should probably depend on some nvram values
> and should be #ifdef'd for CONFIG_BRCM47xx

Right. bus->boardinfo probably is the way to go here. Probably also a check
for bus->chip_id/rev. I'm not sure on that.
sdev->id certainly is not correct. I'm pretty sure I own a device where the 
original
patch would break things. (I'm too lazy to check now).

-- 
Greetings, Michael.
_______________________________________________
openwrt-devel mailing list
[email protected]
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to