summaryrefslogtreecommitdiff
path: root/target/linux
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2014-02-23 18:51:56 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2014-02-23 18:51:56 +0000
commit5b388e571629afea236d3b70fdfeebc28c0da6dd (patch)
tree1e3b03e7754bb75f41ff7af7d7c1a8d063f902ee /target/linux
parenta90ec7a0ef43c4fdaacdcb9156f9f2bfd92d1dac (diff)
downloadmtk-20170518-5b388e571629afea236d3b70fdfeebc28c0da6dd.zip
mtk-20170518-5b388e571629afea236d3b70fdfeebc28c0da6dd.tar.gz
mtk-20170518-5b388e571629afea236d3b70fdfeebc28c0da6dd.tar.bz2
brcm47xx: b44: some fixes in combination with the switch
Let the switch start the carrier and set the duplex mode independently if this nic is up of not. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 39733
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/brcm47xx/patches-3.10/211-b44-start_phy.patch28
1 files changed, 26 insertions, 2 deletions
diff --git a/target/linux/brcm47xx/patches-3.10/211-b44-start_phy.patch b/target/linux/brcm47xx/patches-3.10/211-b44-start_phy.patch
index 4668f16..c542966 100644
--- a/target/linux/brcm47xx/patches-3.10/211-b44-start_phy.patch
+++ b/target/linux/brcm47xx/patches-3.10/211-b44-start_phy.patch
@@ -1,6 +1,14 @@
--- a/drivers/net/ethernet/broadcom/b44.c
+++ b/drivers/net/ethernet/broadcom/b44.c
-@@ -1511,6 +1511,10 @@ static int b44_open(struct net_device *d
+@@ -576,7 +576,6 @@ static void b44_check_phy(struct b44 *bp
+ else
+ val &= ~TX_CTRL_DUPLEX;
+ bw32(bp, B44_TX_CTRL, val);
+- netif_carrier_on(bp->dev);
+ b44_link_report(bp);
+ }
+ return;
+@@ -1511,6 +1510,10 @@ static int b44_open(struct net_device *d
add_timer(&bp->timer);
b44_enable_ints(bp);
@@ -11,7 +19,7 @@
netif_start_queue(dev);
out:
return err;
-@@ -1673,6 +1677,9 @@ static int b44_close(struct net_device *
+@@ -1673,6 +1676,9 @@ static int b44_close(struct net_device *
netif_stop_queue(dev);
@@ -21,3 +29,19 @@
napi_disable(&bp->napi);
del_timer_sync(&bp->timer);
+@@ -2251,8 +2257,13 @@ static void b44_adjust_link(struct net_d
+ }
+
+ if (status_changed) {
+- b44_check_phy(bp);
+- phy_print_status(phydev);
++ u32 val = br32(bp, B44_TX_CTRL);
++ if (bp->flags & B44_FLAG_FULL_DUPLEX)
++ val |= TX_CTRL_DUPLEX;
++ else
++ val &= ~TX_CTRL_DUPLEX;
++ bw32(bp, B44_TX_CTRL, val);
++ b44_link_report(bp);
+ }
+ }
+