# Re: \[PATCH v2 4/6\] net: ethernet: bgmac: convert to feature flags

- From: Rafał Miłecki \<hidden\>
- Date: 2016-08-17 11:34:18 
- List: netdev
- Page: https://ratatoskr.run/netdev/2016/08/4816384
- Thread: https://ratatoskr.run/netdev/2016/07/4790560/t.md

```text
On 8 July 2016 at 01:08, Jon Mason [ref] wrote:
>         mode = (bgmac_read(bgmac, BGMAC_DEV_STATUS) & BGMAC_DS_MM_MASK) >>
>                 BGMAC_DS_MM_SHIFT;
> -       if (ci->id != BCMA_CHIP_ID_BCM47162 || mode != 0)
> +       if (bgmac->feature_flags & BGMAC_FEAT_CLKCTLST || mode != 0)
>                 bgmac_set(bgmac, BCMA_CLKCTLST, BCMA_CLKCTLST_FORCEHT);
> -       if (ci->id == BCMA_CHIP_ID_BCM47162 && mode == 2)
> +       if (bgmac->feature_flags & BGMAC_FEAT_CLKCTLST && mode == 2)
>                 bcma_chipco_chipctl_maskset(&bgmac->core->bus->drv_cc, 1, ~0,
>                                             BGMAC_CHIPCTL_1_RXC_DLL_BYPASS);

Jon, it looks to me you translated two following conditions:
ci->id != BCMA_CHIP_ID_BCM47162
and
ci->id == BCMA_CHIP_ID_BCM47162
into the same flag check:
bgmac->feature_flags & BGMAC_FEAT_CLKCTLST

I don't think it's intentional, is it? Do you have a moment to fix this?
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
```
