aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx/patches-3.10/206-b44-activate-PHY-when-MAC-is-off.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@openwrt.org>2013-10-06 18:31:32 +0000
committerHauke Mehrtens <hauke@openwrt.org>2013-10-06 18:31:32 +0000
commite0f3beb7cce2533220e6642db55048df50b29762 (patch)
tree7b5b4605847117ea899238febafe37a380647fa8 /target/linux/brcm47xx/patches-3.10/206-b44-activate-PHY-when-MAC-is-off.patch
parent06712cae90ecadbae490ec6967e5ab8805ec4a25 (diff)
downloadmaster-187ad058-e0f3beb7cce2533220e6642db55048df50b29762.tar.gz
master-187ad058-e0f3beb7cce2533220e6642db55048df50b29762.tar.bz2
master-187ad058-e0f3beb7cce2533220e6642db55048df50b29762.zip
brcm47xx: b44: fix some problems with the phy
* do not try initialize a unused phy * some improvements to the phylib patch * do not turn the phy off when mac is off Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38306 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm47xx/patches-3.10/206-b44-activate-PHY-when-MAC-is-off.patch')
-rw-r--r--target/linux/brcm47xx/patches-3.10/206-b44-activate-PHY-when-MAC-is-off.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/patches-3.10/206-b44-activate-PHY-when-MAC-is-off.patch b/target/linux/brcm47xx/patches-3.10/206-b44-activate-PHY-when-MAC-is-off.patch
new file mode 100644
index 0000000000..e6c39b0547
--- /dev/null
+++ b/target/linux/brcm47xx/patches-3.10/206-b44-activate-PHY-when-MAC-is-off.patch
@@ -0,0 +1,28 @@
+From 444044a410d4cf3b6dd462f2c9352d56039d9e07 Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Sun, 6 Oct 2013 17:58:24 +0200
+Subject: [PATCH 6/6] b44: activate PHY when MAC is off
+
+Without this patch we can not access the PHY when the MAC is switched
+off. This PHY access is needed to configure the switch, which is done
+through PHY registers.
+
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+---
+ drivers/net/ethernet/broadcom/b44.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/broadcom/b44.c
++++ b/drivers/net/ethernet/broadcom/b44.c
+@@ -1358,7 +1358,10 @@ static void b44_halt(struct b44 *bp)
+ bw32(bp, B44_MAC_CTRL, MAC_CTRL_PHY_PDOWN);
+ /* now reset the chip, but without enabling the MAC&PHY
+ * part of it. This has to be done _after_ we shut down the PHY */
+- b44_chip_reset(bp, B44_CHIP_RESET_PARTIAL);
++ if (bp->has_phy)
++ b44_chip_reset(bp, B44_CHIP_RESET_FULL);
++ else
++ b44_chip_reset(bp, B44_CHIP_RESET_PARTIAL);
+ }
+
+ /* bp->lock is held. */