1 From 991b6722fb727b6e2a98e7e8b57176ac68626110 Mon Sep 17 00:00:00 2001
2 From: Hauke Mehrtens <hauke@hauke-m.de>
3 Date: Thu, 3 Oct 2013 20:41:29 +0200
4 Subject: [PATCH 2/5] b44: rename B44_PHY_ADDR_NO_PHY to
5 B44_PHY_ADDR_NO_LOCAL_PHY
7 The PHY address 30 means there is no local PHY, but there could be an
8 external PHY like a switch connected via MII. This is the case on most
9 embedded home routers where this driver is used.
11 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
13 drivers/net/ethernet/broadcom/b44.c | 12 ++++++------
14 drivers/net/ethernet/broadcom/b44.h | 6 +++---
15 2 files changed, 9 insertions(+), 9 deletions(-)
17 --- a/drivers/net/ethernet/broadcom/b44.c
18 +++ b/drivers/net/ethernet/broadcom/b44.c
19 @@ -284,7 +284,7 @@ static int __b44_writephy(struct b44 *bp
21 static inline int b44_readphy(struct b44 *bp, int reg, u32 *val)
23 - if (bp->phy_addr == B44_PHY_ADDR_NO_PHY)
24 + if (bp->phy_addr == B44_PHY_ADDR_NO_LOACL_PHY)
27 return __b44_readphy(bp, bp->phy_addr, reg, val);
28 @@ -292,7 +292,7 @@ static inline int b44_readphy(struct b44
30 static inline int b44_writephy(struct b44 *bp, int reg, u32 val)
32 - if (bp->phy_addr == B44_PHY_ADDR_NO_PHY)
33 + if (bp->phy_addr == B44_PHY_ADDR_NO_LOACL_PHY)
36 return __b44_writephy(bp, bp->phy_addr, reg, val);
37 @@ -321,7 +321,7 @@ static int b44_phy_reset(struct b44 *bp)
41 - if (bp->phy_addr == B44_PHY_ADDR_NO_PHY)
42 + if (bp->phy_addr == B44_PHY_ADDR_NO_LOACL_PHY)
44 err = b44_writephy(bp, MII_BMCR, BMCR_RESET);
46 @@ -423,7 +423,7 @@ static int b44_setup_phy(struct b44 *bp)
48 b44_wap54g10_workaround(bp);
50 - if (bp->phy_addr == B44_PHY_ADDR_NO_PHY)
51 + if (bp->phy_addr == B44_PHY_ADDR_NO_LOACL_PHY)
53 if ((err = b44_readphy(bp, B44_MII_ALEDCTRL, &val)) != 0)
55 @@ -521,7 +521,7 @@ static void b44_check_phy(struct b44 *bp
59 - if (bp->phy_addr == B44_PHY_ADDR_NO_PHY) {
60 + if (bp->phy_addr == B44_PHY_ADDR_NO_LOACL_PHY) {
61 bp->flags |= B44_FLAG_100_BASE_T;
62 bp->flags |= B44_FLAG_FULL_DUPLEX;
63 if (!netif_carrier_ok(bp->dev)) {
64 @@ -2238,7 +2238,7 @@ static int b44_init_one(struct ssb_devic
66 /* do a phy reset to test if there is an active phy */
67 if (b44_phy_reset(bp) < 0)
68 - bp->phy_addr = B44_PHY_ADDR_NO_PHY;
69 + bp->phy_addr = B44_PHY_ADDR_NO_LOACL_PHY;
71 netdev_info(dev, "%s %pM\n", DRV_DESCRIPTION, dev->dev_addr);
73 --- a/drivers/net/ethernet/broadcom/b44.h
74 +++ b/drivers/net/ethernet/broadcom/b44.h
75 @@ -280,9 +280,9 @@ struct ring_info {
79 -#define B44_MCAST_TABLE_SIZE 32
80 -#define B44_PHY_ADDR_NO_PHY 30
81 -#define B44_MDC_RATIO 5000000
82 +#define B44_MCAST_TABLE_SIZE 32
83 +#define B44_PHY_ADDR_NO_LOACL_PHY 30 /* no local phy regs */
84 +#define B44_MDC_RATIO 5000000
86 #define B44_STAT_REG_DECLARE \
87 _B44(tx_good_octets) \