Changeset 15351


Ignore:
Timestamp:
2009-04-23T16:27:16+02:00 (9 years ago)
Author:
nbd
Message:

brcm47xx: 2.6.28 was accidentally committed with the old (and conceptually broken) b44 phy fix. replace it with my cleaned up version from 2.6.25 (thx, netprince)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/brcm47xx/patches-2.6.28/210-b44_phy_fix.patch

    r14722 r15351  
    11--- a/drivers/net/b44.c 
    22+++ b/drivers/net/b44.c 
     3@@ -339,7 +339,7 @@ static int b44_phy_reset(struct b44 *bp) 
     4                } 
     5        } 
     6  
     7-       return 0; 
     8+       return err; 
     9 } 
     10  
     11 static void __b44_set_flow_ctrl(struct b44 *bp, u32 pause_flags) 
    312@@ -384,7 +384,7 @@ static void b44_set_flow_ctrl(struct b44 
    413        __b44_set_flow_ctrl(bp, pause_enab); 
     
    1019 static void b44_wap54g10_workaround(struct b44 *bp) 
    1120 { 
    12 @@ -2068,6 +2068,28 @@ out: 
    13         return err; 
    14  } 
     21@@ -2213,6 +2213,10 @@ static int __devinit b44_init_one(struct 
     22         */ 
     23        b44_chip_reset(bp, B44_CHIP_RESET_FULL); 
    1524  
    16 +#ifdef CONFIG_SSB_DRIVER_MIPS 
    17 +static void b44_wrtsl54gs_workaround(struct b44 *bp) 
    18 +{ 
    19 +       const char *str; 
     25+       /* do a phy reset to test if there is an active phy */ 
     26+       if (b44_phy_reset(bp) < 0) 
     27+               bp->phy_addr = B44_PHY_ADDR_NO_PHY; 
    2028+ 
    21 +       /* 
    22 +        * workaround for physical wiring in Linksys WRSL54GS 
    23 +        * see https://dev.openwrt.org/ticket/2662 and 3903 
    24 +        * eth1 PHY is probably on BCM5325 switch accessed via eth0 
    25 +        */ 
    26 +       str = nvram_get("boardnum"); 
    27 +       if (!str) 
    28 +               return; 
    29 +       if (simple_strtoul(str, NULL, 0) == 42) { 
    30 +               bp->phy_addr = B44_PHY_ADDR_NO_PHY; 
    31 +       } 
    32 +       return; 
    33 +} 
    34 +#else 
    35 +static void b44_wrtsl54gs_workaround(struct b44 *bp) { } 
    36 +#endif 
    37 + 
    38  static int __devinit b44_get_invariants(struct b44 *bp) 
    39  { 
    40         struct ssb_device *sdev = bp->sdev; 
    41 @@ -2089,6 +2111,8 @@ static int __devinit b44_get_invariants( 
    42          * valid PHY address. */ 
    43         bp->phy_addr &= 0x1F; 
     29        printk(KERN_INFO "%s: Broadcom 44xx/47xx 10/100BaseT Ethernet %s\n", 
     30               dev->name, print_mac(mac, dev->dev_addr)); 
    4431  
    45 +       b44_wrtsl54gs_workaround(bp); 
    46 + 
    47         memcpy(bp->dev->dev_addr, addr, 6); 
    48   
    49         if (!is_valid_ether_addr(&bp->dev->dev_addr[0])){ 
Note: See TracChangeset for help on using the changeset viewer.