* [PATCH net] net: dsa: mv88e6xxx: drop adjust_link to enabled phylink
@ 2019-07-31 15:42 Hubert Feurstein
2019-08-04 15:04 ` Andrew Lunn
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Hubert Feurstein @ 2019-07-31 15:42 UTC (permalink / raw)
To: netdev, linux-kernel
Cc: Hubert Feurstein, Andrew Lunn, Vivien Didelot, Florian Fainelli,
David S. Miller
We have to drop the adjust_link callback in order to finally migrate to
phylink.
Otherwise we get the following warning during startup:
"mv88e6xxx 2188000.ethernet-1:10: Using legacy PHYLIB callbacks. Please
migrate to PHYLINK!"
The warning is generated in the function dsa_port_link_register_of in
dsa/port.c:
int dsa_port_link_register_of(struct dsa_port *dp)
{
struct dsa_switch *ds = dp->ds;
if (!ds->ops->adjust_link)
return dsa_port_phylink_register(dp);
dev_warn(ds->dev,
"Using legacy PHYLIB callbacks. Please migrate to PHYLINK!\n");
[...]
}
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
---
drivers/net/dsa/mv88e6xxx/chip.c | 26 --------------------------
1 file changed, 26 deletions(-)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 366f70bfe055..37e8babd035f 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -27,7 +27,6 @@
#include <linux/platform_data/mv88e6xxx.h>
#include <linux/netdevice.h>
#include <linux/gpio/consumer.h>
-#include <linux/phy.h>
#include <linux/phylink.h>
#include <net/dsa.h>
@@ -482,30 +481,6 @@ static int mv88e6xxx_phy_is_internal(struct dsa_switch *ds, int port)
return port < chip->info->num_internal_phys;
}
-/* We expect the switch to perform auto negotiation if there is a real
- * phy. However, in the case of a fixed link phy, we force the port
- * settings from the fixed link settings.
- */
-static void mv88e6xxx_adjust_link(struct dsa_switch *ds, int port,
- struct phy_device *phydev)
-{
- struct mv88e6xxx_chip *chip = ds->priv;
- int err;
-
- if (!phy_is_pseudo_fixed_link(phydev) &&
- mv88e6xxx_phy_is_internal(ds, port))
- return;
-
- mv88e6xxx_reg_lock(chip);
- err = mv88e6xxx_port_setup_mac(chip, port, phydev->link, phydev->speed,
- phydev->duplex, phydev->pause,
- phydev->interface);
- mv88e6xxx_reg_unlock(chip);
-
- if (err && err != -EOPNOTSUPP)
- dev_err(ds->dev, "p%d: failed to configure MAC\n", port);
-}
-
static void mv88e6065_phylink_validate(struct mv88e6xxx_chip *chip, int port,
unsigned long *mask,
struct phylink_link_state *state)
@@ -4755,7 +4730,6 @@ static int mv88e6xxx_port_egress_floods(struct dsa_switch *ds, int port,
static const struct dsa_switch_ops mv88e6xxx_switch_ops = {
.get_tag_protocol = mv88e6xxx_get_tag_protocol,
.setup = mv88e6xxx_setup,
- .adjust_link = mv88e6xxx_adjust_link,
.phylink_validate = mv88e6xxx_validate,
.phylink_mac_link_state = mv88e6xxx_link_state,
.phylink_mac_config = mv88e6xxx_mac_config,
--
2.22.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH net] net: dsa: mv88e6xxx: drop adjust_link to enabled phylink
2019-07-31 15:42 [PATCH net] net: dsa: mv88e6xxx: drop adjust_link to enabled phylink Hubert Feurstein
@ 2019-08-04 15:04 ` Andrew Lunn
2019-08-04 15:10 ` Andrew Lunn
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Andrew Lunn @ 2019-08-04 15:04 UTC (permalink / raw)
To: Hubert Feurstein
Cc: netdev, linux-kernel, Vivien Didelot, Florian Fainelli, David S. Miller
On Wed, Jul 31, 2019 at 05:42:39PM +0200, Hubert Feurstein wrote:
> We have to drop the adjust_link callback in order to finally migrate to
> phylink.
>
> Otherwise we get the following warning during startup:
> "mv88e6xxx 2188000.ethernet-1:10: Using legacy PHYLIB callbacks. Please
> migrate to PHYLINK!"
>
> The warning is generated in the function dsa_port_link_register_of in
> dsa/port.c:
>
> int dsa_port_link_register_of(struct dsa_port *dp)
> {
> struct dsa_switch *ds = dp->ds;
>
> if (!ds->ops->adjust_link)
> return dsa_port_phylink_register(dp);
>
> dev_warn(ds->dev,
> "Using legacy PHYLIB callbacks. Please migrate to PHYLINK!\n");
> [...]
> }
>
> Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net] net: dsa: mv88e6xxx: drop adjust_link to enabled phylink
2019-07-31 15:42 [PATCH net] net: dsa: mv88e6xxx: drop adjust_link to enabled phylink Hubert Feurstein
2019-08-04 15:04 ` Andrew Lunn
@ 2019-08-04 15:10 ` Andrew Lunn
2019-08-05 8:49 ` Hubert Feurstein
2019-08-04 19:37 ` Vladimir Oltean
2019-08-05 17:56 ` David Miller
3 siblings, 1 reply; 7+ messages in thread
From: Andrew Lunn @ 2019-08-04 15:10 UTC (permalink / raw)
To: Hubert Feurstein
Cc: netdev, linux-kernel, Vivien Didelot, Florian Fainelli, David S. Miller
On Wed, Jul 31, 2019 at 05:42:39PM +0200, Hubert Feurstein wrote:
> We have to drop the adjust_link callback in order to finally migrate to
> phylink.
>
> Otherwise we get the following warning during startup:
> "mv88e6xxx 2188000.ethernet-1:10: Using legacy PHYLIB callbacks. Please
> migrate to PHYLINK!"
Hi Hubert
Do we need the same patch for the b53 driver?
Andrew
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net] net: dsa: mv88e6xxx: drop adjust_link to enabled phylink
2019-08-04 15:10 ` Andrew Lunn
@ 2019-08-05 8:49 ` Hubert Feurstein
2019-08-13 19:50 ` Florian Fainelli
0 siblings, 1 reply; 7+ messages in thread
From: Hubert Feurstein @ 2019-08-05 8:49 UTC (permalink / raw)
To: Andrew Lunn
Cc: netdev, linux-kernel, Vivien Didelot, Florian Fainelli, David S. Miller
Hi Andrew,
It looks like some work is still needed in b53_phylink_mac_config to
take over the
functionality of the current adjust_link implementation.
Hubert
Am So., 4. Aug. 2019 um 17:10 Uhr schrieb Andrew Lunn <andrew@lunn.ch>:
>
> On Wed, Jul 31, 2019 at 05:42:39PM +0200, Hubert Feurstein wrote:
> > We have to drop the adjust_link callback in order to finally migrate to
> > phylink.
> >
> > Otherwise we get the following warning during startup:
> > "mv88e6xxx 2188000.ethernet-1:10: Using legacy PHYLIB callbacks. Please
> > migrate to PHYLINK!"
>
> Hi Hubert
>
> Do we need the same patch for the b53 driver?
>
> Andrew
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net] net: dsa: mv88e6xxx: drop adjust_link to enabled phylink
2019-08-05 8:49 ` Hubert Feurstein
@ 2019-08-13 19:50 ` Florian Fainelli
0 siblings, 0 replies; 7+ messages in thread
From: Florian Fainelli @ 2019-08-13 19:50 UTC (permalink / raw)
To: Hubert Feurstein, Andrew Lunn
Cc: netdev, linux-kernel, Vivien Didelot, David S. Miller
On 8/5/19 1:49 AM, Hubert Feurstein wrote:
> Hi Andrew,
>
> It looks like some work is still needed in b53_phylink_mac_config to
> take over the
> functionality of the current adjust_link implementation.
Indeed, I will look into it in the next few weeks.
--
Florian
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net] net: dsa: mv88e6xxx: drop adjust_link to enabled phylink
2019-07-31 15:42 [PATCH net] net: dsa: mv88e6xxx: drop adjust_link to enabled phylink Hubert Feurstein
2019-08-04 15:04 ` Andrew Lunn
2019-08-04 15:10 ` Andrew Lunn
@ 2019-08-04 19:37 ` Vladimir Oltean
2019-08-05 17:56 ` David Miller
3 siblings, 0 replies; 7+ messages in thread
From: Vladimir Oltean @ 2019-08-04 19:37 UTC (permalink / raw)
To: Hubert Feurstein
Cc: netdev, lkml, Andrew Lunn, Vivien Didelot, Florian Fainelli,
David S. Miller, Ioana Ciornei
On Wed, 31 Jul 2019 at 18:43, Hubert Feurstein <h.feurstein@gmail.com> wrote:
>
> We have to drop the adjust_link callback in order to finally migrate to
> phylink.
>
> Otherwise we get the following warning during startup:
> "mv88e6xxx 2188000.ethernet-1:10: Using legacy PHYLIB callbacks. Please
> migrate to PHYLINK!"
>
> The warning is generated in the function dsa_port_link_register_of in
> dsa/port.c:
>
> int dsa_port_link_register_of(struct dsa_port *dp)
> {
> struct dsa_switch *ds = dp->ds;
>
> if (!ds->ops->adjust_link)
> return dsa_port_phylink_register(dp);
>
> dev_warn(ds->dev,
> "Using legacy PHYLIB callbacks. Please migrate to PHYLINK!\n");
> [...]
> }
>
> Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
> ---
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
> drivers/net/dsa/mv88e6xxx/chip.c | 26 --------------------------
> 1 file changed, 26 deletions(-)
>
> diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
> index 366f70bfe055..37e8babd035f 100644
> --- a/drivers/net/dsa/mv88e6xxx/chip.c
> +++ b/drivers/net/dsa/mv88e6xxx/chip.c
> @@ -27,7 +27,6 @@
> #include <linux/platform_data/mv88e6xxx.h>
> #include <linux/netdevice.h>
> #include <linux/gpio/consumer.h>
> -#include <linux/phy.h>
> #include <linux/phylink.h>
> #include <net/dsa.h>
>
> @@ -482,30 +481,6 @@ static int mv88e6xxx_phy_is_internal(struct dsa_switch *ds, int port)
> return port < chip->info->num_internal_phys;
> }
>
> -/* We expect the switch to perform auto negotiation if there is a real
> - * phy. However, in the case of a fixed link phy, we force the port
> - * settings from the fixed link settings.
> - */
> -static void mv88e6xxx_adjust_link(struct dsa_switch *ds, int port,
> - struct phy_device *phydev)
> -{
> - struct mv88e6xxx_chip *chip = ds->priv;
> - int err;
> -
> - if (!phy_is_pseudo_fixed_link(phydev) &&
> - mv88e6xxx_phy_is_internal(ds, port))
> - return;
> -
> - mv88e6xxx_reg_lock(chip);
> - err = mv88e6xxx_port_setup_mac(chip, port, phydev->link, phydev->speed,
> - phydev->duplex, phydev->pause,
> - phydev->interface);
> - mv88e6xxx_reg_unlock(chip);
> -
> - if (err && err != -EOPNOTSUPP)
> - dev_err(ds->dev, "p%d: failed to configure MAC\n", port);
> -}
> -
> static void mv88e6065_phylink_validate(struct mv88e6xxx_chip *chip, int port,
> unsigned long *mask,
> struct phylink_link_state *state)
> @@ -4755,7 +4730,6 @@ static int mv88e6xxx_port_egress_floods(struct dsa_switch *ds, int port,
> static const struct dsa_switch_ops mv88e6xxx_switch_ops = {
> .get_tag_protocol = mv88e6xxx_get_tag_protocol,
> .setup = mv88e6xxx_setup,
> - .adjust_link = mv88e6xxx_adjust_link,
> .phylink_validate = mv88e6xxx_validate,
> .phylink_mac_link_state = mv88e6xxx_link_state,
> .phylink_mac_config = mv88e6xxx_mac_config,
> --
> 2.22.0
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net] net: dsa: mv88e6xxx: drop adjust_link to enabled phylink
2019-07-31 15:42 [PATCH net] net: dsa: mv88e6xxx: drop adjust_link to enabled phylink Hubert Feurstein
` (2 preceding siblings ...)
2019-08-04 19:37 ` Vladimir Oltean
@ 2019-08-05 17:56 ` David Miller
3 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2019-08-05 17:56 UTC (permalink / raw)
To: h.feurstein; +Cc: netdev, linux-kernel, andrew, vivien.didelot, f.fainelli
From: Hubert Feurstein <h.feurstein@gmail.com>
Date: Wed, 31 Jul 2019 17:42:39 +0200
> We have to drop the adjust_link callback in order to finally migrate to
> phylink.
>
> Otherwise we get the following warning during startup:
> "mv88e6xxx 2188000.ethernet-1:10: Using legacy PHYLIB callbacks. Please
> migrate to PHYLINK!"
>
> The warning is generated in the function dsa_port_link_register_of in
> dsa/port.c:
>
> int dsa_port_link_register_of(struct dsa_port *dp)
> {
> struct dsa_switch *ds = dp->ds;
>
> if (!ds->ops->adjust_link)
> return dsa_port_phylink_register(dp);
>
> dev_warn(ds->dev,
> "Using legacy PHYLIB callbacks. Please migrate to PHYLINK!\n");
> [...]
> }
>
> Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-08-13 19:50 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-31 15:42 [PATCH net] net: dsa: mv88e6xxx: drop adjust_link to enabled phylink Hubert Feurstein
2019-08-04 15:04 ` Andrew Lunn
2019-08-04 15:10 ` Andrew Lunn
2019-08-05 8:49 ` Hubert Feurstein
2019-08-13 19:50 ` Florian Fainelli
2019-08-04 19:37 ` Vladimir Oltean
2019-08-05 17:56 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).