diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2013-10-22 21:01:35 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2013-10-22 21:01:35 +0000 |
commit | 6d2136c3f2acfdef23677973c3e8d21f92f6fe18 (patch) | |
tree | 2913979d3e903ff3a09b0fa5a8dd8fe5d8d4330a /target/linux/brcm47xx/patches-3.10/202-b44-rename-B44_PHY_ADDR_NO_PHY-to-B44_PHY_ADDR_NO_LO.patch | |
parent | 5d4cc68b66516322240d906827d424df55ee0905 (diff) | |
download | upstream-6d2136c3f2acfdef23677973c3e8d21f92f6fe18.tar.gz upstream-6d2136c3f2acfdef23677973c3e8d21f92f6fe18.tar.bz2 upstream-6d2136c3f2acfdef23677973c3e8d21f92f6fe18.zip |
brcm47xx: b44: detect external phy by bit set in DevControl register
Without this patch we treated only phy addr 30 as an external phy, but
there is a register to check that. Now we do not have to try to reset
the switch to check for an external switch.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
SVN-Revision: 38502
Diffstat (limited to 'target/linux/brcm47xx/patches-3.10/202-b44-rename-B44_PHY_ADDR_NO_PHY-to-B44_PHY_ADDR_NO_LO.patch')
-rw-r--r-- | target/linux/brcm47xx/patches-3.10/202-b44-rename-B44_PHY_ADDR_NO_PHY-to-B44_PHY_ADDR_NO_LO.patch | 53 |
1 files changed, 4 insertions, 49 deletions
diff --git a/target/linux/brcm47xx/patches-3.10/202-b44-rename-B44_PHY_ADDR_NO_PHY-to-B44_PHY_ADDR_NO_LO.patch b/target/linux/brcm47xx/patches-3.10/202-b44-rename-B44_PHY_ADDR_NO_PHY-to-B44_PHY_ADDR_NO_LO.patch index 8610f0c51c..4534d8da6b 100644 --- a/target/linux/brcm47xx/patches-3.10/202-b44-rename-B44_PHY_ADDR_NO_PHY-to-B44_PHY_ADDR_NO_LO.patch +++ b/target/linux/brcm47xx/patches-3.10/202-b44-rename-B44_PHY_ADDR_NO_PHY-to-B44_PHY_ADDR_NO_LO.patch @@ -1,7 +1,7 @@ -From 991b6722fb727b6e2a98e7e8b57176ac68626110 Mon Sep 17 00:00:00 2001 +From 888594b4a1f70d02b7f6b05e868b00514b5cf559 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens <hauke@hauke-m.de> Date: Thu, 3 Oct 2013 20:41:29 +0200 -Subject: [PATCH 2/5] b44: rename B44_PHY_ADDR_NO_PHY to +Subject: [PATCH 3/9] b44: rename B44_PHY_ADDR_NO_PHY to B44_PHY_ADDR_NO_LOCAL_PHY The PHY address 30 means there is no local PHY, but there could be an @@ -10,57 +10,12 @@ embedded home routers where this driver is used. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> --- - drivers/net/ethernet/broadcom/b44.c | 12 ++++++------ + drivers/net/ethernet/broadcom/b44.c | 2 +- drivers/net/ethernet/broadcom/b44.h | 6 +++--- - 2 files changed, 9 insertions(+), 9 deletions(-) + 2 files changed, 4 insertions(+), 4 deletions(-) --- a/drivers/net/ethernet/broadcom/b44.c +++ b/drivers/net/ethernet/broadcom/b44.c -@@ -284,7 +284,7 @@ static int __b44_writephy(struct b44 *bp - - static inline int b44_readphy(struct b44 *bp, int reg, u32 *val) - { -- if (bp->phy_addr == B44_PHY_ADDR_NO_PHY) -+ if (bp->phy_addr == B44_PHY_ADDR_NO_LOACL_PHY) - return 0; - - return __b44_readphy(bp, bp->phy_addr, reg, val); -@@ -292,7 +292,7 @@ static inline int b44_readphy(struct b44 - - static inline int b44_writephy(struct b44 *bp, int reg, u32 val) - { -- if (bp->phy_addr == B44_PHY_ADDR_NO_PHY) -+ if (bp->phy_addr == B44_PHY_ADDR_NO_LOACL_PHY) - return 0; - - return __b44_writephy(bp, bp->phy_addr, reg, val); -@@ -321,7 +321,7 @@ static int b44_phy_reset(struct b44 *bp) - u32 val; - int err; - -- if (bp->phy_addr == B44_PHY_ADDR_NO_PHY) -+ if (bp->phy_addr == B44_PHY_ADDR_NO_LOACL_PHY) - return 0; - err = b44_writephy(bp, MII_BMCR, BMCR_RESET); - if (err) -@@ -423,7 +423,7 @@ static int b44_setup_phy(struct b44 *bp) - - b44_wap54g10_workaround(bp); - -- if (bp->phy_addr == B44_PHY_ADDR_NO_PHY) -+ if (bp->phy_addr == B44_PHY_ADDR_NO_LOACL_PHY) - return 0; - if ((err = b44_readphy(bp, B44_MII_ALEDCTRL, &val)) != 0) - goto out; -@@ -521,7 +521,7 @@ static void b44_check_phy(struct b44 *bp - { - u32 bmsr, aux; - -- if (bp->phy_addr == B44_PHY_ADDR_NO_PHY) { -+ if (bp->phy_addr == B44_PHY_ADDR_NO_LOACL_PHY) { - bp->flags |= B44_FLAG_100_BASE_T; - bp->flags |= B44_FLAG_FULL_DUPLEX; - if (!netif_carrier_ok(bp->dev)) { @@ -2238,7 +2238,7 @@ static int b44_init_one(struct ssb_devic /* do a phy reset to test if there is an active phy */ |