Skip to contentSkip to conversation

net: bgmac: make it clear when setting interface type to RMII

PATCH Applied Rafał Miłecki 2 participants 2 messages Aug 17, 2016 – Aug 19, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: bgmac: make it clear when setting interface type to RMII

From: Rafał Miłecki <[email protected]>

It doesn't really change anything as BGMAC_CHIPCTL_1_IF_TYPE_RMII is equal to 0. It make code a bit clener, so far when reading it one could think we forgot to set a proper mode. It also keeps this mode code in sync with other ones.

---
 drivers/net/ethernet/broadcom/bgmac.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/broadcom/bgmac.c +2 -1
index 63ef7235..6ea0e5f 100644
@@ -932,7 +932,8 @@ static void bgmac_chip_reset(struct bgmac *bgmac)
 			et_swtype <<= 4;
 			sw_type = et_swtype;
 		} else if (bgmac->feature_flags & BGMAC_FEAT_SW_TYPE_EPHYRMII) {
-			sw_type = BGMAC_CHIPCTL_1_SW_TYPE_EPHYRMII;
+			sw_type = BGMAC_CHIPCTL_1_IF_TYPE_RMII |
+				  BGMAC_CHIPCTL_1_SW_TYPE_EPHYRMII;
 		} else if (bgmac->feature_flags & BGMAC_FEAT_SW_TYPE_RGMII) {
 			sw_type = BGMAC_CHIPCTL_1_IF_TYPE_RGMII |
 				  BGMAC_CHIPCTL_1_SW_TYPE_RGMII;
Signature · 1 line
1.8.4.5
maintainer Applied
#1 lore raw

From: Rafał Miłecki <[email protected]>
Date: Wed, 17 Aug 2016 23:11:52 +0200

Quoted 8 lines

From: Rafał Miłecki <[email protected]>

It doesn't really change anything as BGMAC_CHIPCTL_1_IF_TYPE_RMII is equal to 0. It make code a bit clener, so far when reading it one could think we forgot to set a proper mode. It also keeps this mode code in sync with other ones.

Applied.