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
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
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
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
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
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
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
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
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
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
>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
>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
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
>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
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
>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:
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
> +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
, 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
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
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
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
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: [
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
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
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
>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
>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
28 matches
Mail list logo