diff mbox series

[v2] net: phy: meson-gxl: implement meson_gxl_phy_resume()

Message ID 20230804201903.1303713-1-da@libre.computer (mailing list archive)
State Superseded
Headers show
Series [v2] net: phy: meson-gxl: implement meson_gxl_phy_resume() | expand

Commit Message

Da Xue Aug. 4, 2023, 8:19 p.m. UTC
After suspend and resume, the meson GXL internal PHY config needs to be initialized again or the carrier cannot be found.

Signed-off-by: Luke Lu <luke.lu@libre.computer>
Reviewed-by: Da Xue <da@libre.computer>
---
 drivers/net/phy/meson-gxl.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

Comments

kernel test robot Aug. 6, 2023, 5:11 a.m. UTC | #1
Hi Da,

kernel test robot noticed the following build errors:

[auto build test ERROR on net-next/main]
[also build test ERROR on net/main linus/master v6.5-rc4 next-20230804]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Da-Xue/net-phy-meson-gxl-implement-meson_gxl_phy_resume/20230805-042033
base:   net-next/main
patch link:    https://lore.kernel.org/r/20230804201903.1303713-1-da%40libre.computer
patch subject: [PATCH] [PATCH v2] net: phy: meson-gxl: implement meson_gxl_phy_resume()
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20230806/202308061204.L4tEEJAa-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230806/202308061204.L4tEEJAa-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308061204.L4tEEJAa-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/net/phy/meson-gxl.c: In function 'meson_gxl_phy_resume':
>> drivers/net/phy/meson-gxl.c:139:9: error: too few arguments to function 'genphy_resume'
     139 |         genphy_resume();
         |         ^~~~~~~~~~~~~
   In file included from drivers/net/phy/meson-gxl.c:13:
   include/linux/phy.h:1794:5: note: declared here
    1794 | int genphy_resume(struct phy_device *phydev);
         |     ^~~~~~~~~~~~~


vim +/genphy_resume +139 drivers/net/phy/meson-gxl.c

   134	
   135	static int meson_gxl_phy_resume(struct phy_device *phydev)
   136	{
   137		int ret;
   138	
 > 139		genphy_resume();
   140		ret = meson_gxl_config_init(phydev);
   141		if (ret)
   142			return ret;
   143	
   144		return 0;
   145	}
   146
Simon Horman Aug. 7, 2023, 2:21 p.m. UTC | #2
On Fri, Aug 04, 2023 at 04:19:02PM -0400, Da Xue wrote:
> After suspend and resume, the meson GXL internal PHY config needs to be initialized again or the carrier cannot be found.
> 
> Signed-off-by: Luke Lu <luke.lu@libre.computer>
> Reviewed-by: Da Xue <da@libre.computer>

Hi Da Xue,

as the posted of this patch you need to provide your signed-off-by line.

From the way things are structured above it is unclear what Luke's
role is. Was he the author of the patch? If so the body of the email,
just above the patch description, should start with:

From: Luke Lu <luke.lu@libre.computer>

Link: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin

> ---
>  drivers/net/phy/meson-gxl.c | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/phy/meson-gxl.c b/drivers/net/phy/meson-gxl.c
> index bb9b33b6b..2df516ed4 100644
> --- a/drivers/net/phy/meson-gxl.c
> +++ b/drivers/net/phy/meson-gxl.c
> @@ -132,6 +132,18 @@ static int meson_gxl_config_init(struct phy_device *phydev)
>  	return 0;
>  }
>  
> +static int meson_gxl_phy_resume(struct phy_device *phydev)
> +{
> +	int ret;
> +
> +	genphy_resume();

This patch doesn't compile because the call to genphy_resume() has too
few arguments.

> +	ret = meson_gxl_config_init(phydev);
> +	if (ret)
> +		return ret;
> +
> +	return 0;
> +}
> +
>  /* This function is provided to cope with the possible failures of this phy
>   * during aneg process. When aneg fails, the PHY reports that aneg is done
>   * but the value found in MII_LPA is wrong:
> @@ -196,7 +208,7 @@ static struct phy_driver meson_gxl_phy[] = {
>  		.config_intr	= smsc_phy_config_intr,
>  		.handle_interrupt = smsc_phy_handle_interrupt,
>  		.suspend        = genphy_suspend,
> -		.resume         = genphy_resume,
> +		.resume         = meson_gxl_phy_resume,
>  		.read_mmd	= genphy_read_mmd_unsupported,
>  		.write_mmd	= genphy_write_mmd_unsupported,
>  	}, {
> -- 
> 2.39.2
> 
>
diff mbox series

Patch

diff --git a/drivers/net/phy/meson-gxl.c b/drivers/net/phy/meson-gxl.c
index bb9b33b6b..2df516ed4 100644
--- a/drivers/net/phy/meson-gxl.c
+++ b/drivers/net/phy/meson-gxl.c
@@ -132,6 +132,18 @@  static int meson_gxl_config_init(struct phy_device *phydev)
 	return 0;
 }
 
+static int meson_gxl_phy_resume(struct phy_device *phydev)
+{
+	int ret;
+
+	genphy_resume();
+	ret = meson_gxl_config_init(phydev);
+	if (ret)
+		return ret;
+
+	return 0;
+}
+
 /* This function is provided to cope with the possible failures of this phy
  * during aneg process. When aneg fails, the PHY reports that aneg is done
  * but the value found in MII_LPA is wrong:
@@ -196,7 +208,7 @@  static struct phy_driver meson_gxl_phy[] = {
 		.config_intr	= smsc_phy_config_intr,
 		.handle_interrupt = smsc_phy_handle_interrupt,
 		.suspend        = genphy_suspend,
-		.resume         = genphy_resume,
+		.resume         = meson_gxl_phy_resume,
 		.read_mmd	= genphy_read_mmd_unsupported,
 		.write_mmd	= genphy_write_mmd_unsupported,
 	}, {