diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2013-10-06 18:31:32 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2013-10-06 18:31:32 +0000 |
commit | 2c5e4aa6add7eefb6663893a47cc6ffbb0241c68 (patch) | |
tree | c26da8ee9f0d3c8bf51af2bc020dd2df536bd625 /target/linux/brcm47xx/patches-3.10/204-b44-rename-b44_mii_-read-write-to-b44_mdio_-read-wri.patch | |
parent | 048fc8f0c149731229463f6fe97ce0a536b33a99 (diff) | |
download | mtk-20170518-2c5e4aa6add7eefb6663893a47cc6ffbb0241c68.zip mtk-20170518-2c5e4aa6add7eefb6663893a47cc6ffbb0241c68.tar.gz mtk-20170518-2c5e4aa6add7eefb6663893a47cc6ffbb0241c68.tar.bz2 |
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>
SVN-Revision: 38306
Diffstat (limited to 'target/linux/brcm47xx/patches-3.10/204-b44-rename-b44_mii_-read-write-to-b44_mdio_-read-wri.patch')
-rw-r--r-- | target/linux/brcm47xx/patches-3.10/204-b44-rename-b44_mii_-read-write-to-b44_mdio_-read-wri.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/patches-3.10/204-b44-rename-b44_mii_-read-write-to-b44_mdio_-read-wri.patch b/target/linux/brcm47xx/patches-3.10/204-b44-rename-b44_mii_-read-write-to-b44_mdio_-read-wri.patch new file mode 100644 index 0000000..4758875 --- /dev/null +++ b/target/linux/brcm47xx/patches-3.10/204-b44-rename-b44_mii_-read-write-to-b44_mdio_-read-wri.patch @@ -0,0 +1,48 @@ +From 6dcaccfc1e0046632dd54d91b6f679fee7f841bc Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens <hauke@hauke-m.de> +Date: Sun, 6 Oct 2013 15:31:04 +0200 +Subject: [PATCH 4/5] b44: rename b44_mii_{read,write} to + b44_mdio_{read,write}_mii + +The next patch will add these functions for phylib, and we should +rename the old ones before. This now indicates that these functions are +used for the mdio registers and on the mii interface. + +Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> +--- + drivers/net/ethernet/broadcom/b44.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +--- a/drivers/net/ethernet/broadcom/b44.c ++++ b/drivers/net/ethernet/broadcom/b44.c +@@ -299,7 +299,7 @@ static inline int b44_writephy(struct b4 + } + + /* miilib interface */ +-static int b44_mii_read(struct net_device *dev, int phy_id, int location) ++static int b44_mdio_read_mii(struct net_device *dev, int phy_id, int location) + { + u32 val; + struct b44 *bp = netdev_priv(dev); +@@ -309,8 +309,8 @@ static int b44_mii_read(struct net_devic + return val; + } + +-static void b44_mii_write(struct net_device *dev, int phy_id, int location, +- int val) ++static void b44_mdio_write_mii(struct net_device *dev, int phy_id, int location, ++ int val) + { + struct b44 *bp = netdev_priv(dev); + __b44_writephy(bp, phy_id, location, val); +@@ -2214,8 +2214,8 @@ static int b44_init_one(struct ssb_devic + } + + bp->mii_if.dev = dev; +- bp->mii_if.mdio_read = b44_mii_read; +- bp->mii_if.mdio_write = b44_mii_write; ++ bp->mii_if.mdio_read = b44_mdio_read_mii; ++ bp->mii_if.mdio_write = b44_mdio_write_mii; + bp->mii_if.phy_id = bp->phy_addr; + bp->mii_if.phy_id_mask = 0x1f; + bp->mii_if.reg_num_mask = 0x1f; |