openwrtv4/target/linux/brcm47xx/patches-3.10/207-b44-do-not-set-phy-addr-to-30-for-every-ext-phy.patch

26 lines
858 B
Diff
Raw Normal View History

From c2ecc401a08f0bda3b2483b93989d9792cadf6b2 Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Mon, 21 Oct 2013 20:30:04 +0200
Subject: [PATCH 8/9] b44: do not set phy addr to 30 for every ext phy
---
drivers/net/ethernet/broadcom/b44.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- a/drivers/net/ethernet/broadcom/b44.c
+++ b/drivers/net/ethernet/broadcom/b44.c
@@ -2408,8 +2408,11 @@ static int b44_init_one(struct ssb_devic
b44_chip_reset(bp, B44_CHIP_RESET_FULL);
/* do a phy reset to test if there is an active phy */
- if (b44_phy_reset(bp) < 0)
- bp->phy_addr = B44_PHY_ADDR_NO_LOACL_PHY;
+ err = b44_phy_reset(bp);
+ if (err < 0) {
+ dev_err(sdev->dev, "phy reset failed\n");
+ goto err_out_unregister_netdev;
+ }
if (bp->flags & B44_FLAG_EXTERNAL_PHY) {
err = b44_register_phy_one(bp);