* [PATCH] net: phy: vitesse: advertise PAUSE frame capabilities on Vitesse PHY drivers
@ 2014-02-21 16:19 cristian.bercaru
2014-02-22 13:38 ` Ben Hutchings
0 siblings, 1 reply; 3+ messages in thread
From: cristian.bercaru @ 2014-02-21 16:19 UTC (permalink / raw)
To: netdev; +Cc: Cristian Bercaru, madalin.bucur, shaohui.xie, shruti
From: Cristian Bercaru <cristian.bercaru@freescale.com>
Enable the advertisment of symmetric and asymmetric PAUSE frame
capabilities on all Vitesse PHY drivers.
Signed-off-by: Cristian Bercaru <cristian.bercaru@freescale.com>
---
drivers/net/phy/vitesse.c | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/drivers/net/phy/vitesse.c b/drivers/net/phy/vitesse.c
index 14372c6..3124b31 100644
--- a/drivers/net/phy/vitesse.c
+++ b/drivers/net/phy/vitesse.c
@@ -227,7 +227,8 @@ static struct phy_driver vsc82xx_driver[] = {
.phy_id = PHY_ID_VSC8234,
.name = "Vitesse VSC8234",
.phy_id_mask = 0x000ffff0,
- .features = PHY_GBIT_FEATURES,
+ .features = PHY_GBIT_FEATURES |
+ SUPPORTED_Pause | SUPPORTED_Asym_Pause,
.flags = PHY_HAS_INTERRUPT,
.config_init = &vsc824x_config_init,
.config_aneg = &vsc82x4_config_aneg,
@@ -239,7 +240,8 @@ static struct phy_driver vsc82xx_driver[] = {
.phy_id = PHY_ID_VSC8244,
.name = "Vitesse VSC8244",
.phy_id_mask = 0x000fffc0,
- .features = PHY_GBIT_FEATURES,
+ .features = PHY_GBIT_FEATURES |
+ SUPPORTED_Pause | SUPPORTED_Asym_Pause,
.flags = PHY_HAS_INTERRUPT,
.config_init = &vsc824x_config_init,
.config_aneg = &vsc82x4_config_aneg,
@@ -251,7 +253,8 @@ static struct phy_driver vsc82xx_driver[] = {
.phy_id = PHY_ID_VSC8514,
.name = "Vitesse VSC8514",
.phy_id_mask = 0x000ffff0,
- .features = PHY_GBIT_FEATURES,
+ .features = PHY_GBIT_FEATURES |
+ SUPPORTED_Pause | SUPPORTED_Asym_Pause,
.flags = PHY_HAS_INTERRUPT,
.config_init = &vsc824x_config_init,
.config_aneg = &vsc82x4_config_aneg,
@@ -263,7 +266,8 @@ static struct phy_driver vsc82xx_driver[] = {
.phy_id = PHY_ID_VSC8574,
.name = "Vitesse VSC8574",
.phy_id_mask = 0x000ffff0,
- .features = PHY_GBIT_FEATURES,
+ .features = PHY_GBIT_FEATURES |
+ SUPPORTED_Pause | SUPPORTED_Asym_Pause,
.flags = PHY_HAS_INTERRUPT,
.config_init = &vsc824x_config_init,
.config_aneg = &vsc82x4_config_aneg,
@@ -275,7 +279,8 @@ static struct phy_driver vsc82xx_driver[] = {
.phy_id = PHY_ID_VSC8662,
.name = "Vitesse VSC8662",
.phy_id_mask = 0x000ffff0,
- .features = PHY_GBIT_FEATURES,
+ .features = PHY_GBIT_FEATURES |
+ SUPPORTED_Pause | SUPPORTED_Asym_Pause,
.flags = PHY_HAS_INTERRUPT,
.config_init = &vsc824x_config_init,
.config_aneg = &vsc82x4_config_aneg,
@@ -288,7 +293,8 @@ static struct phy_driver vsc82xx_driver[] = {
.phy_id = PHY_ID_VSC8221,
.phy_id_mask = 0x000ffff0,
.name = "Vitesse VSC8221",
- .features = PHY_GBIT_FEATURES,
+ .features = PHY_GBIT_FEATURES |
+ SUPPORTED_Pause | SUPPORTED_Asym_Pause,
.flags = PHY_HAS_INTERRUPT,
.config_init = &vsc8221_config_init,
.config_aneg = &genphy_config_aneg,
@@ -301,7 +307,8 @@ static struct phy_driver vsc82xx_driver[] = {
.phy_id = PHY_ID_VSC8211,
.phy_id_mask = 0x000ffff0,
.name = "Vitesse VSC8211",
- .features = PHY_GBIT_FEATURES,
+ .features = PHY_GBIT_FEATURES |
+ SUPPORTED_Pause | SUPPORTED_Asym_Pause,
.flags = PHY_HAS_INTERRUPT,
.config_init = &vsc8221_config_init,
.config_aneg = &genphy_config_aneg,
--
1.7.11.7
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] net: phy: vitesse: advertise PAUSE frame capabilities on Vitesse PHY drivers
2014-02-21 16:19 [PATCH] net: phy: vitesse: advertise PAUSE frame capabilities on Vitesse PHY drivers cristian.bercaru
@ 2014-02-22 13:38 ` Ben Hutchings
2014-02-22 18:08 ` Florian Fainelli
0 siblings, 1 reply; 3+ messages in thread
From: Ben Hutchings @ 2014-02-22 13:38 UTC (permalink / raw)
To: cristian.bercaru, Florian Fainelli
Cc: netdev, madalin.bucur, shaohui.xie, shruti
[-- Attachment #1: Type: text/plain, Size: 3994 bytes --]
On Fri, 2014-02-21 at 18:19 +0200, cristian.bercaru@freescale.com wrote:
> From: Cristian Bercaru <cristian.bercaru@freescale.com>
>
> Enable the advertisment of symmetric and asymmetric PAUSE frame
> capabilities on all Vitesse PHY drivers.
I don't think this makes sense. So far as I know, pause frame support
depends only on the MAC, not the PHY.
I realise there are already other PHY drivers setting these flags, but
why should they be added to every PHY driver individually when any
autonegotiating PHY can advertise pause capability?
Ben.
> Signed-off-by: Cristian Bercaru <cristian.bercaru@freescale.com>
> ---
> drivers/net/phy/vitesse.c | 21 ++++++++++++++-------
> 1 file changed, 14 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/phy/vitesse.c b/drivers/net/phy/vitesse.c
> index 14372c6..3124b31 100644
> --- a/drivers/net/phy/vitesse.c
> +++ b/drivers/net/phy/vitesse.c
> @@ -227,7 +227,8 @@ static struct phy_driver vsc82xx_driver[] = {
> .phy_id = PHY_ID_VSC8234,
> .name = "Vitesse VSC8234",
> .phy_id_mask = 0x000ffff0,
> - .features = PHY_GBIT_FEATURES,
> + .features = PHY_GBIT_FEATURES |
> + SUPPORTED_Pause | SUPPORTED_Asym_Pause,
> .flags = PHY_HAS_INTERRUPT,
> .config_init = &vsc824x_config_init,
> .config_aneg = &vsc82x4_config_aneg,
> @@ -239,7 +240,8 @@ static struct phy_driver vsc82xx_driver[] = {
> .phy_id = PHY_ID_VSC8244,
> .name = "Vitesse VSC8244",
> .phy_id_mask = 0x000fffc0,
> - .features = PHY_GBIT_FEATURES,
> + .features = PHY_GBIT_FEATURES |
> + SUPPORTED_Pause | SUPPORTED_Asym_Pause,
> .flags = PHY_HAS_INTERRUPT,
> .config_init = &vsc824x_config_init,
> .config_aneg = &vsc82x4_config_aneg,
> @@ -251,7 +253,8 @@ static struct phy_driver vsc82xx_driver[] = {
> .phy_id = PHY_ID_VSC8514,
> .name = "Vitesse VSC8514",
> .phy_id_mask = 0x000ffff0,
> - .features = PHY_GBIT_FEATURES,
> + .features = PHY_GBIT_FEATURES |
> + SUPPORTED_Pause | SUPPORTED_Asym_Pause,
> .flags = PHY_HAS_INTERRUPT,
> .config_init = &vsc824x_config_init,
> .config_aneg = &vsc82x4_config_aneg,
> @@ -263,7 +266,8 @@ static struct phy_driver vsc82xx_driver[] = {
> .phy_id = PHY_ID_VSC8574,
> .name = "Vitesse VSC8574",
> .phy_id_mask = 0x000ffff0,
> - .features = PHY_GBIT_FEATURES,
> + .features = PHY_GBIT_FEATURES |
> + SUPPORTED_Pause | SUPPORTED_Asym_Pause,
> .flags = PHY_HAS_INTERRUPT,
> .config_init = &vsc824x_config_init,
> .config_aneg = &vsc82x4_config_aneg,
> @@ -275,7 +279,8 @@ static struct phy_driver vsc82xx_driver[] = {
> .phy_id = PHY_ID_VSC8662,
> .name = "Vitesse VSC8662",
> .phy_id_mask = 0x000ffff0,
> - .features = PHY_GBIT_FEATURES,
> + .features = PHY_GBIT_FEATURES |
> + SUPPORTED_Pause | SUPPORTED_Asym_Pause,
> .flags = PHY_HAS_INTERRUPT,
> .config_init = &vsc824x_config_init,
> .config_aneg = &vsc82x4_config_aneg,
> @@ -288,7 +293,8 @@ static struct phy_driver vsc82xx_driver[] = {
> .phy_id = PHY_ID_VSC8221,
> .phy_id_mask = 0x000ffff0,
> .name = "Vitesse VSC8221",
> - .features = PHY_GBIT_FEATURES,
> + .features = PHY_GBIT_FEATURES |
> + SUPPORTED_Pause | SUPPORTED_Asym_Pause,
> .flags = PHY_HAS_INTERRUPT,
> .config_init = &vsc8221_config_init,
> .config_aneg = &genphy_config_aneg,
> @@ -301,7 +307,8 @@ static struct phy_driver vsc82xx_driver[] = {
> .phy_id = PHY_ID_VSC8211,
> .phy_id_mask = 0x000ffff0,
> .name = "Vitesse VSC8211",
> - .features = PHY_GBIT_FEATURES,
> + .features = PHY_GBIT_FEATURES |
> + SUPPORTED_Pause | SUPPORTED_Asym_Pause,
> .flags = PHY_HAS_INTERRUPT,
> .config_init = &vsc8221_config_init,
> .config_aneg = &genphy_config_aneg,
--
Ben Hutchings
I haven't lost my mind; it's backed up on tape somewhere.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] net: phy: vitesse: advertise PAUSE frame capabilities on Vitesse PHY drivers
2014-02-22 13:38 ` Ben Hutchings
@ 2014-02-22 18:08 ` Florian Fainelli
0 siblings, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2014-02-22 18:08 UTC (permalink / raw)
To: Ben Hutchings
Cc: cristian.bercaru, netdev, madalin.bucur, shaohui.xie, shruti
Le samedi 22 février 2014, 13:38:56 Ben Hutchings a écrit :
> On Fri, 2014-02-21 at 18:19 +0200, cristian.bercaru@freescale.com wrote:
> > From: Cristian Bercaru <cristian.bercaru@freescale.com>
> >
> > Enable the advertisment of symmetric and asymmetric PAUSE frame
> > capabilities on all Vitesse PHY drivers.
>
> I don't think this makes sense. So far as I know, pause frame support
> depends only on the MAC, not the PHY.
Agreed.
>
> I realise there are already other PHY drivers setting these flags, but
> why should they be added to every PHY driver individually when any
> autonegotiating PHY can advertise pause capability?
It looks like this might be abusing a PHY driver features to ensure that the
initial value fed to phydev->supported will make us advertise the pause
capabilities. This should be set by the Ethernet MAC driver prior to
phy_start(), not by the PHY driver.
>
> Ben.
>
> > Signed-off-by: Cristian Bercaru <cristian.bercaru@freescale.com>
> > ---
> >
> > drivers/net/phy/vitesse.c | 21 ++++++++++++++-------
> > 1 file changed, 14 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/net/phy/vitesse.c b/drivers/net/phy/vitesse.c
> > index 14372c6..3124b31 100644
> > --- a/drivers/net/phy/vitesse.c
> > +++ b/drivers/net/phy/vitesse.c
> > @@ -227,7 +227,8 @@ static struct phy_driver vsc82xx_driver[] = {
> >
> > .phy_id = PHY_ID_VSC8234,
> > .name = "Vitesse VSC8234",
> > .phy_id_mask = 0x000ffff0,
> >
> > - .features = PHY_GBIT_FEATURES,
> > + .features = PHY_GBIT_FEATURES |
> > + SUPPORTED_Pause | SUPPORTED_Asym_Pause,
> >
> > .flags = PHY_HAS_INTERRUPT,
> > .config_init = &vsc824x_config_init,
> > .config_aneg = &vsc82x4_config_aneg,
> >
> > @@ -239,7 +240,8 @@ static struct phy_driver vsc82xx_driver[] = {
> >
> > .phy_id = PHY_ID_VSC8244,
> > .name = "Vitesse VSC8244",
> > .phy_id_mask = 0x000fffc0,
> >
> > - .features = PHY_GBIT_FEATURES,
> > + .features = PHY_GBIT_FEATURES |
> > + SUPPORTED_Pause | SUPPORTED_Asym_Pause,
> >
> > .flags = PHY_HAS_INTERRUPT,
> > .config_init = &vsc824x_config_init,
> > .config_aneg = &vsc82x4_config_aneg,
> >
> > @@ -251,7 +253,8 @@ static struct phy_driver vsc82xx_driver[] = {
> >
> > .phy_id = PHY_ID_VSC8514,
> > .name = "Vitesse VSC8514",
> > .phy_id_mask = 0x000ffff0,
> >
> > - .features = PHY_GBIT_FEATURES,
> > + .features = PHY_GBIT_FEATURES |
> > + SUPPORTED_Pause | SUPPORTED_Asym_Pause,
> >
> > .flags = PHY_HAS_INTERRUPT,
> > .config_init = &vsc824x_config_init,
> > .config_aneg = &vsc82x4_config_aneg,
> >
> > @@ -263,7 +266,8 @@ static struct phy_driver vsc82xx_driver[] = {
> >
> > .phy_id = PHY_ID_VSC8574,
> > .name = "Vitesse VSC8574",
> > .phy_id_mask = 0x000ffff0,
> >
> > - .features = PHY_GBIT_FEATURES,
> > + .features = PHY_GBIT_FEATURES |
> > + SUPPORTED_Pause | SUPPORTED_Asym_Pause,
> >
> > .flags = PHY_HAS_INTERRUPT,
> > .config_init = &vsc824x_config_init,
> > .config_aneg = &vsc82x4_config_aneg,
> >
> > @@ -275,7 +279,8 @@ static struct phy_driver vsc82xx_driver[] = {
> >
> > .phy_id = PHY_ID_VSC8662,
> > .name = "Vitesse VSC8662",
> > .phy_id_mask = 0x000ffff0,
> >
> > - .features = PHY_GBIT_FEATURES,
> > + .features = PHY_GBIT_FEATURES |
> > + SUPPORTED_Pause | SUPPORTED_Asym_Pause,
> >
> > .flags = PHY_HAS_INTERRUPT,
> > .config_init = &vsc824x_config_init,
> > .config_aneg = &vsc82x4_config_aneg,
> >
> > @@ -288,7 +293,8 @@ static struct phy_driver vsc82xx_driver[] = {
> >
> > .phy_id = PHY_ID_VSC8221,
> > .phy_id_mask = 0x000ffff0,
> > .name = "Vitesse VSC8221",
> >
> > - .features = PHY_GBIT_FEATURES,
> > + .features = PHY_GBIT_FEATURES |
> > + SUPPORTED_Pause | SUPPORTED_Asym_Pause,
> >
> > .flags = PHY_HAS_INTERRUPT,
> > .config_init = &vsc8221_config_init,
> > .config_aneg = &genphy_config_aneg,
> >
> > @@ -301,7 +307,8 @@ static struct phy_driver vsc82xx_driver[] = {
> >
> > .phy_id = PHY_ID_VSC8211,
> > .phy_id_mask = 0x000ffff0,
> > .name = "Vitesse VSC8211",
> >
> > - .features = PHY_GBIT_FEATURES,
> > + .features = PHY_GBIT_FEATURES |
> > + SUPPORTED_Pause | SUPPORTED_Asym_Pause,
> >
> > .flags = PHY_HAS_INTERRUPT,
> > .config_init = &vsc8221_config_init,
> > .config_aneg = &genphy_config_aneg,
--
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-02-22 18:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-21 16:19 [PATCH] net: phy: vitesse: advertise PAUSE frame capabilities on Vitesse PHY drivers cristian.bercaru
2014-02-22 13:38 ` Ben Hutchings
2014-02-22 18:08 ` Florian Fainelli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox