[PATCH v6 4/4] Marvell phy: add functions to suspend and resume both interfaces: fiber and copper links.

2016-07-19 Thread Charles-Antoine Couret
These functions used standards registers in a different page for both interfaces: copper and fiber. Reviewed-by: Andrew Lunn Signed-off-by: Charles-Antoine Couret --- drivers/net/phy/marvell.c | 73 +-- 1 file changed, 71 insertions(+), 2 deletions

[PATCH v6 3/4] Marvell phy: add configuration of autonegociation for fiber link.

2016-07-19 Thread Charles-Antoine Couret
To be correctly initilized, the fiber interface needs to be configured via autonegociation registers which use some customs options or registers. Reviewed-by: Andrew Lunn Signed-off-by: Charles-Antoine Couret --- drivers/net/phy/marvell.c | 111 +- 1

[PATCH v6 1/4] Marvell phy: check link status in case of fiber link.

2016-07-19 Thread Charles-Antoine Couret
Marvell 88E1512. Reviewed-by: Andrew Lunn Signed-off-by: Charles-Antoine Couret --- drivers/net/phy/marvell.c | 153 ++ 1 file changed, 141 insertions(+), 12 deletions(-) diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index ec2c1ee

[PATCH v6 0/4] Marvell phy: fiber interface configuration

2016-07-19 Thread Charles-Antoine Couret
Another patchset to manage correctly the fiber link for some concerned Marvell's phy like 88E1512. This patchset fixed the commit log for the third and last commits and a comment in the first commit. Charles-Antoine Couret (4): Marvell phy: check link status in case of fiber link. Ma

[PATCH v6 2/4] Marvell phy: add field to get errors from fiber link.

2016-07-19 Thread Charles-Antoine Couret
Add support for the fiber receiver error counter in the statistics. Rename the current counter which is for copper errors to phy_receive_errors_copper, so it is easy to distinguish copper from fiber. Reviewed-by: Andrew Lunn Signed-off-by: Charles-Antoine Couret --- drivers/net/phy/marvell.c

[PATCH 2/4] Marvell phy: add field to get errors from fiber link.

2016-07-18 Thread Charles-Antoine Couret
Add support for the fiber receiver error counter in the statistics. Rename the current counter which is for copper errors to phy_receive_errors_copper, so it is easy to distinguish copper from fiber. Signed-off-by: Charles-Antoine Couret --- drivers/net/phy/marvell.c | 9 +++-- 1 file

[PATCH 4/4] Marvell phy: add functions to suspend and resume both interfaces: fiber and copper links.

2016-07-18 Thread Charles-Antoine Couret
Signed-off-by: Charles-Antoine Couret --- drivers/net/phy/marvell.c | 73 +-- 1 file changed, 71 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index e05209b..ddb413a 100644 --- a/drivers/net/phy

[PATCH v5 0/4] Marvell phy: manage fiber link for some phys

2016-07-18 Thread Charles-Antoine Couret
Another patchset to manage correctly the fiber link for some concerned Marvell's phy like 88E1512. This patchset fixed the commit log for the second commit and a line from the first commit moved to the second commit. Charles-Antoine Couret (4): Marvell phy: check link status in case of

[PATCH 3/4] Marvell phy: add configuration of autonegociation for fiber link.

2016-07-18 Thread Charles-Antoine Couret
Signed-off-by: Charles-Antoine Couret --- drivers/net/phy/marvell.c | 111 +- 1 file changed, 109 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index 13a93d8..e05209b 100644 --- a/drivers/net/phy

[PATCH 1/4] Marvell phy: check link status in case of fiber link.

2016-07-18 Thread Charles-Antoine Couret
Marvell 88E1512. Signed-off-by: Charles-Antoine Couret --- drivers/net/phy/marvell.c | 151 ++ 1 file changed, 140 insertions(+), 11 deletions(-) diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index ec2c1ee..f2ca0d9 100644 --- a/drivers

[PATCH 4/4 v4] Marvell phy: add functions to suspend and resume both, interfaces: fiber and copper links.

2016-07-15 Thread Charles-Antoine Couret
>From 95a2a268629ee2778f0ad65a273d70bcf912c4b0 Mon Sep 17 00:00:00 2001 From: Charles-Antoine Couret Date: Fri, 15 Jul 2016 11:58:09 +0200 Subject: [PATCH 4/4] Marvell phy: add functions to suspend and resume both interfaces: fiber and copper links. Signed-off-by: Charles-Antoine Cou

[PATCH 4/4] Marvell phy: add functions to suspend and resume both interfaces

2016-07-15 Thread Charles-Antoine Couret
>From 95a2a268629ee2778f0ad65a273d70bcf912c4b0 Mon Sep 17 00:00:00 2001 From: Charles-Antoine Couret Date: Fri, 15 Jul 2016 11:58:09 +0200 Subject: [PATCH 4/4] Marvell phy: add functions to suspend and resume both interfaces: fiber and copper links. Signed-off-by: Charles-Antoine Cou

Re: [PATCH 3/4] Marvell phy: add configuration of autonegociation for fiber link.

2016-07-15 Thread Charles-Antoine Couret
Le 15/07/2016 à 16:08, Andrew Lunn a écrit : > On Fri, Jul 15, 2016 at 12:12:39PM +0200, Charles-Antoine Couret wrote: >> >From 5be52efa3f1c034c21f80850b651193d1f51a313 Mon Sep 17 00:00:00 2001 >> From: Charles-Antoine Couret >> Date: Fri, 15 Jul 2016 11:57:25 +020

[PATCH 3/4] Marvell phy: add configuration of autonegociation for fiber link.

2016-07-15 Thread Charles-Antoine Couret
>From 5be52efa3f1c034c21f80850b651193d1f51a313 Mon Sep 17 00:00:00 2001 From: Charles-Antoine Couret Date: Fri, 15 Jul 2016 11:57:25 +0200 Subject: [PATCH 3/4] Marvell phy: add configuration of autonegociation for fiber link. Signed-off-by: Charles-Antoine Couret --- drivers/net/phy/marvel

[PATCH 1/4 v4] Marvell phy: check link status in case of fiber link.

2016-07-15 Thread Charles-Antoine Couret
Hello, It's my 4rd patch set for this feature. Thanks to comment my work. :) >From 354c25b138f8da9a1f4f451698b3a9122f41717c Mon Sep 17 00:00:00 2001 From: Charles-Antoine Couret Date: Fri, 15 Jul 2016 11:51:48 +0200 Subject: [PATCH 1/4] Marvell phy: check link status in case of fiber li

[PATCH 2/4 v4] Marvell phy: add field to get errors from fiber link.

2016-07-15 Thread Charles-Antoine Couret
>From 6244e234cced4b3e5ee1f0ab735c4bd52b7ed0a4 Mon Sep 17 00:00:00 2001 From: Charles-Antoine Couret Date: Fri, 15 Jul 2016 11:56:12 +0200 Subject: [PATCH 2/4] Marvell phy: add field to get errors from fiber link. Phy not concerned by fiber link don't display that. Signed-off-by:

Re: [PATCH v3] Marvell phy: add fiber status check and configuration for some phys

2016-07-13 Thread Charles-Antoine Couret
goto error; >>>> + >>>> + err = genphy_resume(phydev); >>>> + if (err < 0) >>>> + goto error; >>>> + >>>> + /* Then, the copper link */ >>>> + err = phy_write(phydev, MII_MARVELL_PHY_PAGE, MII_M_COPPER); >>>> + if (err < 0) >>>> + goto error; >>>> + >>>> + return genphy_resume(phydev); >>> >>> Should it be resumed twice? Or just once at the end? Same question >>> for suspend. >> >> I don't understand your question. > > You call genphy_resume(phydev) twice. Once is sufficient. Yes, but it's normal because each interface could be suspended or resumed independently. genphy_* functions use BMCR register which are identical between fiber and copper link. But each link has its own register to change. Thank you. Regards. Charles-Antoine Couret

Re: [PATCH v3] Marvell phy: add fiber status check and configuration for some phys

2016-07-13 Thread Charles-Antoine Couret
> +err = genphy_resume(phydev); >> +if (err < 0) >> +goto error; >> + >> +/* Then, the copper link */ >> +err = phy_write(phydev, MII_MARVELL_PHY_PAGE, MII_M_COPPER); >> +if (err < 0) >> +goto error; >> + >> +return genphy_resume(phydev); > > Should it be resumed twice? Or just once at the end? Same question > for suspend. I don't understand your question. Each interface are resumed / suspended once by these functions. > >> @@ -1130,6 +1416,11 @@ static u64 marvell_get_stat(struct phy_device >> *phydev, int i) >> int err, oldpage, val; >> u64 ret; >> >> +if (!(phydev->supported & SUPPORTED_FIBRE)) { >> +if (strstr(marvell_hw_stats[i].string, "fiber")) >> +return 0; > > I think a better solution is for marvell_get_sset_count() to return 2 > or 3 depending on phydev->supported & SUPPORTED_FIBRE. Ok. Thanks for all of your comments, I will fix that. However, I need some additional answers to do that entirely. :) Regards. Charles-Antoine Couret

Re: [PATCH v3] Marvell phy: add fiber status check and configuration for some phys

2016-07-12 Thread Charles-Antoine Couret
, 21, 16}, >> { "phy_idle_errors", 0, 10, 8 }, >> }; > > I think we should also rename phy_receive_errors to > phy_receive_errors_copper. I agree with you. I will fix that too. Thanks. Charles-Antoine Couret

[PATCH v3] Marvell phy: add fiber status check and configuration for some phys

2016-07-12 Thread Charles-Antoine Couret
t this patch. Thank you in advance. Regards. Charles-Antoine Couret >From 4ca5935f8aa97c3ba02cb27e970e1bcf248aed18 Mon Sep 17 00:00:00 2001 From: Charles-Antoine Couret Date: Fri, 1 Apr 2016 16:16:35 +0200 Subject: [PATCH] Marvell phy: add fiber status check for some components Some Marvell&#

Re: FWD: [PATCH v2] Marvell phy: add fiber status check for some components

2016-05-27 Thread Charles-Antoine Couret
Hello, I'm sorry to repost that, but after one month, I need a answer to continue to imrpove my patch in the right direction. :) Thank you in advance. Regards. Charles-Antoine Couret Le 29/04/2016 à 10:28, Charles-Antoine Couret a écrit : > Le 11/04/2016 à 21:47, Florian Fainelli

Re: FWD: [PATCH v2] Marvell phy: add fiber status check for some components

2016-04-29 Thread Charles-Antoine Couret
renable the port change in phy_ethtool_sset function. But, the datasheet seems to disagree with this method. Finally, what do I have to do? I continue my previous way or your suggestion? I prefer to respect the datasheet, but if it's better for you to follow the other way, I will implement that. Thank you in advance and have a nice day. Regards, Charles-Antoine Couret

Re: FWD: [PATCH v2] Marvell phy: add fiber status check for some components

2016-04-13 Thread Charles-Antoine Couret
Le 11/04/2016 21:47, Florian Fainelli a écrit : > On 04/04/16 06:25, Andrew Lunn wrote: >>> >From 564b767163d19355a3b5efaad195e93796570c71 Mon Sep 17 00:00:00 2001 >>> From: Charles-Antoine Couret >>> Date: Fri, 1 Apr 2016 16:16:35 +0200 >>> Subject: [

Re: FWD: [PATCH v2] Marvell phy: add fiber status check for some components

2016-04-08 Thread Charles-Antoine Couret
Le 04/04/2016 15:25, Andrew Lunn a écrit : > Should we be using the old mechanism to swap between TP, BNC and AUI > to swap between copper and fibre? > >Andrew What is this method ? A specific ioctl ? Regards, Charles-Antoine

[PATCH v2] Marvell phy: add fiber status check for some components

2016-04-04 Thread Charles-Antoine Couret
Hi, I took into account previous remark from Andrew to return in MII_M_COPPER page in all cases. I completed the description of patch. Thanks for all. Regards, Charles-Antoine Couret >From 564b767163d19355a3b5efaad195e93796570c71 Mon Sep 17 00:00:00 2001 From: Charles-Antoine Couret D

Re: [PATCH] Marvell phy: add fiber status check for some components

2016-04-04 Thread Charles-Antoine Couret
Hi, > Shouldn't you return to page 0, i.e. MII_M_COPPER, under all > conditions? I return marvell_read_status() which returns 0 if it hasn't error during the process. In case of right conditions, my function returns 0 for COPPER part (and FIBER part too). It doesn't change the value return

[PATCH] Marvell phy: add fiber status check for some components

2016-04-01 Thread Charles-Antoine Couret
>From a5a7a9828511ff6a522cf742109768207ff89929 Mon Sep 17 00:00:00 2001 From: Charles-Antoine Couret Date: Fri, 1 Apr 2016 16:16:35 +0200 Subject: [PATCH] Marvell phy: add fiber status check for some components This patch is not tested with all Marvell's phy. The new function was acti

[PATCH] Marvell phy: add fiber status check for some components

2016-04-01 Thread Charles-Antoine Couret
>From a5a7a9828511ff6a522cf742109768207ff89929 Mon Sep 17 00:00:00 2001 From: Charles-Antoine Couret Date: Fri, 1 Apr 2016 16:16:35 +0200 Subject: [PATCH] Marvell phy: add fiber status check for some components This patch is not tested with all Marvell's phy. The new function was acti