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

2022-04-07 Thread David Wu

Hi Pierre-Clément,

Thanks for your correction, there was wrong mask here.
Reviewed-by: David Wu 

在 2022/4/6 23:08, Kever Yang 写道:

Add David,

Hi David,

     Could you help to check this patch?


Thanks,
- Kever
On 2022/3/16 23:39, Pierre-Clément Tosi 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 
Cc: Joe Hershberger 
Cc: Heiko Stuebner 
Cc: Kever Yang 
Cc: Tom Rini 
---
  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),
  };


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

2022-04-06 Thread Kever Yang

Add David,

Hi David,

    Could you help to check this patch?


Thanks,
- Kever
On 2022/3/16 23:39, Pierre-Clément Tosi 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 
Cc: Joe Hershberger 
Cc: Heiko Stuebner 
Cc: Kever Yang 
Cc: Tom Rini 
---
  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),
};
  


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

2022-03-17 Thread Ramon Fried
On Wed, Mar 16, 2022 at 5:40 PM Pierre-Clément Tosi  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 
> Cc: Joe Hershberger 
> Cc: Heiko Stuebner 
> Cc: Kever Yang 
> Cc: Tom Rini 
> ---
>  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.