Skip to content

Commit cdb26d3

Browse files
Rafał Miłeckidavem330
authored andcommitted
net: bgmac: fix reversed checks for clock control flag
This fixes regression introduced by patch adding feature flags. It was already reported and patch followed (it got accepted) but it appears it was incorrect. Instead of fixing reversed condition it broke a good one. This patch was verified to actually fix SoC hanges caused by bgmac on BCM47186B0. Fixes: db791eb ("net: ethernet: bgmac: convert to feature flags") Fixes: 4af1474 ("net: bgmac: Fix errant feature flag check") Cc: Jon Mason <[email protected]> Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d667f78 commit cdb26d3

File tree

1 file changed

+2
-2
lines changed
  • drivers/net/ethernet/broadcom

1 file changed

+2
-2
lines changed

drivers/net/ethernet/broadcom/bgmac.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,9 +1049,9 @@ static void bgmac_enable(struct bgmac *bgmac)
10491049

10501050
mode = (bgmac_read(bgmac, BGMAC_DEV_STATUS) & BGMAC_DS_MM_MASK) >>
10511051
BGMAC_DS_MM_SHIFT;
1052-
if (!(bgmac->feature_flags & BGMAC_FEAT_CLKCTLST) || mode != 0)
1052+
if (bgmac->feature_flags & BGMAC_FEAT_CLKCTLST || mode != 0)
10531053
bgmac_set(bgmac, BCMA_CLKCTLST, BCMA_CLKCTLST_FORCEHT);
1054-
if (bgmac->feature_flags & BGMAC_FEAT_CLKCTLST && mode == 2)
1054+
if (!(bgmac->feature_flags & BGMAC_FEAT_CLKCTLST) && mode == 2)
10551055
bgmac_cco_ctl_maskset(bgmac, 1, ~0,
10561056
BGMAC_CHIPCTL_1_RXC_DLL_BYPASS);
10571057

0 commit comments

Comments
 (0)