2023-08-04 20:44:22

by Da Xue

[permalink] [raw]
Subject: [PATCH] [PATCH v2] net: phy: meson-gxl: implement meson_gxl_phy_resume()

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 <[email protected]>
Reviewed-by: Da Xue <[email protected]>
---
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();
+ 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



2023-08-06 06:05:50

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH] [PATCH v2] net: phy: meson-gxl: implement meson_gxl_phy_resume()

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/[email protected]/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230806/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

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

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

2023-08-07 15:34:54

by Simon Horman

[permalink] [raw]
Subject: Re: [PATCH] [PATCH v2] net: phy: meson-gxl: implement meson_gxl_phy_resume()

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 <[email protected]>
> Reviewed-by: Da Xue <[email protected]>

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 <[email protected]>

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
>
>