Changeset 21047


Ignore:
Timestamp:
2010-04-20T18:23:47+02:00 (7 years ago)
Author:
acoul
Message:

brcm47xx: fix r21042, nuke (boardnum == 42 section)

File:
1 edited

Legend:

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

    r21042 r21047  
    1 --- drivers/net/b44.c.orig      2010-04-18 08:40:30.000000000 +0300 
    2 +++ drivers/net/b44.c   2010-04-18 10:53:47.000000000 +0300 
    3 @@ -384,7 +384,7 @@ 
     1--- a/drivers/net/b44.c 
     2+++ b/drivers/net/b44.c  
     3@@ -384,7 +384,7 @@ static void b44_set_flow_ctrl(struct b44 
    44        __b44_set_flow_ctrl(bp, pause_enab); 
    55 } 
     
    1010 static void b44_wap54g10_workaround(struct b44 *bp) 
    1111 { 
    12 @@ -397,6 +397,7 @@ 
    13          * see https://dev.openwrt.org/ticket/146 
    14          * check and reset bit "isolate" 
    15          */ 
    16 + 
    17         str = nvram_get("boardnum"); 
    18         if (!str) 
    19                 return; 
    20 @@ -421,12 +422,49 @@ 
     12@@ -421,12 +421,40 @@ static inline void b44_wap54g10_workarou 
    2113 } 
    2214 #endif 
     
    2517+static inline int startswith (const char *source, const char *cmp)  
    2618+{  
    27 +       return !strncmp(source,cmp,strlen(cmp));  
     19+       return !strncmp(source,cmp,strlen(cmp));  
    2820+} 
    2921+ 
     
    3224+static inline void b44_bcm47xx_workarounds(struct b44 *bp) 
    3325+{ 
    34 +       /* 
    35 +        * workaround for physical wiring in Linksys WRSL54GS 
    36 +        * see https://dev.openwrt.org/ticket/2662 and 3903 
    37 +        * eth1 PHY is probably on BCM5325 switch accessed via eth0 
    38 +        */ 
    39 + 
    40 +       if (simple_strtoul(getvar("boardnum"), NULL, 0) == 42) { 
    41 +               bp->phy_addr = B44_PHY_ADDR_NO_PHY; 
    42 +       } else { 
    43 +               /* WL-HDD */ 
    44 +               struct ssb_device *sdev = bp->sdev; 
    45 +               if (startswith(getvar("hardware_version"), "WL300-")) { 
    46 +                       if (sdev->bus->sprom.et0phyaddr == 0 && 
    47 +                           sdev->bus->sprom.et1phyaddr == 1) 
    48 +                               bp->phy_addr = B44_PHY_ADDR_NO_PHY; 
    49 +               } 
     26+       /* WL-HDD */ 
     27+       struct ssb_device *sdev = bp->sdev; 
     28+       if (startswith(getvar("hardware_version"), "WL300-"))  
     29+       { 
     30+               if (sdev->bus->sprom.et0phyaddr == 0 && 
     31+                   sdev->bus->sprom.et1phyaddr == 1) 
     32+                       bp->phy_addr = B44_PHY_ADDR_NO_PHY; 
    5033+       } 
    5134+       return; 
     
    6851        if (bp->phy_addr == B44_PHY_ADDR_NO_PHY) 
    6952                return 0; 
    70 @@ -2089,6 +2127,8 @@ 
     53@@ -2089,6 +2117,8 @@ static int __devinit b44_get_invariants( 
    7154         * valid PHY address. */ 
    7255        bp->phy_addr &= 0x1F; 
Note: See TracChangeset for help on using the changeset viewer.