272ec5c3f3614b71ad16f69b44759c9f6cd404ba
[openwrt/staging/jow.git] /
1 From e2d8f646c79f26e094bfaf9b21be614d1e148a67 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Wed, 17 Aug 2016 23:11:52 +0200
4 Subject: [PATCH] net: bgmac: make it clear when setting interface type to RMII
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 It doesn't really change anything as BGMAC_CHIPCTL_1_IF_TYPE_RMII is
10 equal to 0. It make code a bit clener, so far when reading it one could
11 think we forgot to set a proper mode. It also keeps this mode code in
12 sync with other ones.
13
14 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
15 Signed-off-by: David S. Miller <davem@davemloft.net>
16 ---
17 drivers/net/ethernet/broadcom/bgmac.c | 3 ++-
18 1 file changed, 2 insertions(+), 1 deletion(-)
19
20 --- a/drivers/net/ethernet/broadcom/bgmac.c
21 +++ b/drivers/net/ethernet/broadcom/bgmac.c
22 @@ -935,7 +935,8 @@ static void bgmac_chip_reset(struct bgma
23 et_swtype <<= 4;
24 sw_type = et_swtype;
25 } else if (bgmac->feature_flags & BGMAC_FEAT_SW_TYPE_EPHYRMII) {
26 - sw_type = BGMAC_CHIPCTL_1_SW_TYPE_EPHYRMII;
27 + sw_type = BGMAC_CHIPCTL_1_IF_TYPE_RMII |
28 + BGMAC_CHIPCTL_1_SW_TYPE_EPHYRMII;
29 } else if (bgmac->feature_flags & BGMAC_FEAT_SW_TYPE_RGMII) {
30 sw_type = BGMAC_CHIPCTL_1_IF_TYPE_RGMII |
31 BGMAC_CHIPCTL_1_SW_TYPE_RGMII;