bcm53xx: 3.18: add early support for Buffalo WZR-900DHP
[openwrt/svn-archive/archive.git] / target / linux / brcm47xx / patches-3.10 / 207-b44-do-not-set-PHY-address-to-30-for-every-ext-PHY.patch
1 From 656a7c2b1210deddf76444ecc76e058c0404ce80 Mon Sep 17 00:00:00 2001
2 From: Hauke Mehrtens <hauke@hauke-m.de>
3 Date: Fri, 20 Dec 2013 02:16:12 +0100
4 Subject: [PATCH 207/208] b44: do not set PHY address to 30 for every ext PHY
5
6 b44_phy_reset() will fail for an external PHY and only work with the
7 internal PHY, this was an old workaround when the detection of an
8 external switch based on the PHY address failed and it is not needed
9 any more.
10
11 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
12 Signed-off-by: David S. Miller <davem@davemloft.net>
13 ---
14 drivers/net/ethernet/broadcom/b44.c | 7 +++++--
15 1 file changed, 5 insertions(+), 2 deletions(-)
16
17 --- a/drivers/net/ethernet/broadcom/b44.c
18 +++ b/drivers/net/ethernet/broadcom/b44.c
19 @@ -2413,8 +2413,11 @@ static int b44_init_one(struct ssb_devic
20 b44_chip_reset(bp, B44_CHIP_RESET_FULL);
21
22 /* do a phy reset to test if there is an active phy */
23 - if (b44_phy_reset(bp) < 0)
24 - bp->phy_addr = B44_PHY_ADDR_NO_LOCAL_PHY;
25 + err = b44_phy_reset(bp);
26 + if (err < 0) {
27 + dev_err(sdev->dev, "phy reset failed\n");
28 + goto err_out_unregister_netdev;
29 + }
30
31 if (bp->flags & B44_FLAG_EXTERNAL_PHY) {
32 err = b44_register_phy_one(bp);