[PATCH 1/9] net: gmac_rockchip: Fix misuse of GENMASK macro

Ramon Fried rfried.dev at gmail.com
Thu Mar 17 20:13:47 CET 2022


On Wed, Mar 16, 2022 at 5:40 PM Pierre-Clément Tosi <ptosi at google.com> wrote:
>
> Swap the arguments as that seems to have been the author's intention.
>
> Note: This fix wasn't tested on hardware and will result in more bits
>       being set by the underlying writel() in rk_clrsetreg(), which
>       might bring unexpected behavioural changes.
>
> Fixes: b07911840025 ("net: gmac_rockchip: add support for px30")
> Signed-off-by: Pierre-Clément Tosi <ptosi at google.com>
> Cc: Joe Hershberger <joe.hershberger at ni.com>
> Cc: Heiko Stuebner <heiko at sntech.de>
> Cc: Kever Yang <kever.yang at rock-chips.com>
> Cc: Tom Rini <trini at konsulko.com>
> ---
>  drivers/net/gmac_rockchip.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/gmac_rockchip.c b/drivers/net/gmac_rockchip.c
> index 04008d2b19..0ecbcdf641 100644
> --- a/drivers/net/gmac_rockchip.c
> +++ b/drivers/net/gmac_rockchip.c
> @@ -350,7 +350,7 @@ static void px30_gmac_set_to_rmii(struct gmac_rockchip_plat *pdata)
>         struct px30_grf *grf;
>         enum {
>                 PX30_GMAC_PHY_INTF_SEL_SHIFT = 4,
> -               PX30_GMAC_PHY_INTF_SEL_MASK  = GENMASK(4, 6),
> +               PX30_GMAC_PHY_INTF_SEL_MASK  = GENMASK(6, 4),
>                 PX30_GMAC_PHY_INTF_SEL_RMII  = BIT(6),
>         };
>
> --
> 2.35.1.723.g4982287a31-goog
>
I would love to see tested-by before I merge this.


More information about the U-Boot mailing list