* [PATCH net-next 0/5] net: phy: clean up the old gen10g functions
@ 2019-03-02 16:09 Heiner Kallweit
2019-03-02 16:10 ` [PATCH net-next 1/5] net: phy: use genphy_c45_aneg_done in genphy_aneg_done Heiner Kallweit
` (5 more replies)
0 siblings, 6 replies; 16+ messages in thread
From: Heiner Kallweit @ 2019-03-02 16:09 UTC (permalink / raw)
To: Andrew Lunn, Florian Fainelli, David Miller; +Cc: netdev@vger.kernel.org
The old gen10g_ functions are mainly stubs and have been superseded
by genphy_c45_ equivalents. So lets remove / hide the old functions
as far as possible.
Heiner Kallweit (5):
net: phy: use genphy_c45_aneg_done in genphy_aneg_done
net: phy: remove gen10g_suspend and gen10g_resume
net: phy: remove gen10g_config_init
net: phy: don't export gen10g_read_status
net: phy: remove gen10g_no_soft_reset
drivers/net/phy/cortina.c | 3 +--
drivers/net/phy/marvell10g.c | 4 ++--
drivers/net/phy/phy-c45.c | 40 ++----------------------------------
drivers/net/phy/phy.c | 12 ++++-------
drivers/net/phy/teranetics.c | 3 +--
include/linux/phy.h | 5 -----
6 files changed, 10 insertions(+), 57 deletions(-)
--
2.21.0
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH net-next 1/5] net: phy: use genphy_c45_aneg_done in genphy_aneg_done
2019-03-02 16:09 [PATCH net-next 0/5] net: phy: clean up the old gen10g functions Heiner Kallweit
@ 2019-03-02 16:10 ` Heiner Kallweit
2019-03-03 15:34 ` Andrew Lunn
2019-03-02 16:10 ` [PATCH net-next 2/5] net: phy: remove gen10g_suspend and gen10g_resume Heiner Kallweit
` (4 subsequent siblings)
5 siblings, 1 reply; 16+ messages in thread
From: Heiner Kallweit @ 2019-03-02 16:10 UTC (permalink / raw)
To: Andrew Lunn, Florian Fainelli, David Miller; +Cc: netdev@vger.kernel.org
Now that we have it let's use genphy_c45_aneg_done() in phy_aneg_done().
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/net/phy/phy.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 69dc64a4d..3745220c5 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -144,14 +144,10 @@ int phy_aneg_done(struct phy_device *phydev)
{
if (phydev->drv && phydev->drv->aneg_done)
return phydev->drv->aneg_done(phydev);
-
- /* Avoid genphy_aneg_done() if the Clause 45 PHY does not
- * implement Clause 22 registers
- */
- if (phydev->is_c45 && !(phydev->c45_ids.devices_in_package & BIT(0)))
- return -EINVAL;
-
- return genphy_aneg_done(phydev);
+ else if (phydev->is_c45)
+ return genphy_c45_aneg_done(phydev);
+ else
+ return genphy_aneg_done(phydev);
}
EXPORT_SYMBOL(phy_aneg_done);
--
2.21.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH net-next 2/5] net: phy: remove gen10g_suspend and gen10g_resume
2019-03-02 16:09 [PATCH net-next 0/5] net: phy: clean up the old gen10g functions Heiner Kallweit
2019-03-02 16:10 ` [PATCH net-next 1/5] net: phy: use genphy_c45_aneg_done in genphy_aneg_done Heiner Kallweit
@ 2019-03-02 16:10 ` Heiner Kallweit
2019-03-03 15:37 ` Andrew Lunn
2019-03-02 16:11 ` [PATCH net-next 3/5] net: phy: remove gen10g_config_init Heiner Kallweit
` (3 subsequent siblings)
5 siblings, 1 reply; 16+ messages in thread
From: Heiner Kallweit @ 2019-03-02 16:10 UTC (permalink / raw)
To: Andrew Lunn, Florian Fainelli, David Miller; +Cc: netdev@vger.kernel.org
phy_suspend() and phy_resume() are no-ops anyway if no callback is
defined. Therefore we don't need these stubs.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/net/phy/phy-c45.c | 14 --------------
include/linux/phy.h | 2 --
2 files changed, 16 deletions(-)
diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c
index 49e7cd08b..3ddbb9c32 100644
--- a/drivers/net/phy/phy-c45.c
+++ b/drivers/net/phy/phy-c45.c
@@ -529,18 +529,6 @@ int gen10g_config_init(struct phy_device *phydev)
}
EXPORT_SYMBOL_GPL(gen10g_config_init);
-int gen10g_suspend(struct phy_device *phydev)
-{
- return 0;
-}
-EXPORT_SYMBOL_GPL(gen10g_suspend);
-
-int gen10g_resume(struct phy_device *phydev)
-{
- return 0;
-}
-EXPORT_SYMBOL_GPL(gen10g_resume);
-
struct phy_driver genphy_10g_driver = {
.phy_id = 0xffffffff,
.phy_id_mask = 0xffffffff,
@@ -550,6 +538,4 @@ struct phy_driver genphy_10g_driver = {
.features = PHY_10GBIT_FEATURES,
.config_aneg = gen10g_config_aneg,
.read_status = gen10g_read_status,
- .suspend = gen10g_suspend,
- .resume = gen10g_resume,
};
diff --git a/include/linux/phy.h b/include/linux/phy.h
index bfe60e2a5..c69de3b87 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -1122,8 +1122,6 @@ int gen10g_config_aneg(struct phy_device *phydev);
int gen10g_read_status(struct phy_device *phydev);
int gen10g_no_soft_reset(struct phy_device *phydev);
int gen10g_config_init(struct phy_device *phydev);
-int gen10g_suspend(struct phy_device *phydev);
-int gen10g_resume(struct phy_device *phydev);
static inline int phy_read_status(struct phy_device *phydev)
{
--
2.21.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH net-next 3/5] net: phy: remove gen10g_config_init
2019-03-02 16:09 [PATCH net-next 0/5] net: phy: clean up the old gen10g functions Heiner Kallweit
2019-03-02 16:10 ` [PATCH net-next 1/5] net: phy: use genphy_c45_aneg_done in genphy_aneg_done Heiner Kallweit
2019-03-02 16:10 ` [PATCH net-next 2/5] net: phy: remove gen10g_suspend and gen10g_resume Heiner Kallweit
@ 2019-03-02 16:11 ` Heiner Kallweit
2019-03-03 15:39 ` Andrew Lunn
2019-03-02 16:13 ` [PATCH net-next 5/5] net: phy: remove gen10g_no_soft_reset Heiner Kallweit
` (2 subsequent siblings)
5 siblings, 1 reply; 16+ messages in thread
From: Heiner Kallweit @ 2019-03-02 16:11 UTC (permalink / raw)
To: Andrew Lunn, Florian Fainelli, David Miller; +Cc: netdev@vger.kernel.org
ETHTOOL_LINK_MODE_10000baseT_Full_BIT is set anyway in the supported
and advertising bitmap because it's part of PHY_10GBIT_FEATURES.
And all users of gen10g_config_init use PHY_10GBIT_FEATURES.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/net/phy/cortina.c | 1 -
drivers/net/phy/phy-c45.c | 14 --------------
drivers/net/phy/teranetics.c | 1 -
include/linux/phy.h | 1 -
4 files changed, 17 deletions(-)
diff --git a/drivers/net/phy/cortina.c b/drivers/net/phy/cortina.c
index c291dc014..a64eb211c 100644
--- a/drivers/net/phy/cortina.c
+++ b/drivers/net/phy/cortina.c
@@ -80,7 +80,6 @@ static struct phy_driver cortina_driver[] = {
.phy_id_mask = 0xffffffff,
.name = "Cortina CS4340",
.features = PHY_10GBIT_FEATURES,
- .config_init = gen10g_config_init,
.config_aneg = gen10g_config_aneg,
.read_status = cortina_read_status,
.soft_reset = gen10g_no_soft_reset,
diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c
index 3ddbb9c32..cdbcea860 100644
--- a/drivers/net/phy/phy-c45.c
+++ b/drivers/net/phy/phy-c45.c
@@ -516,25 +516,11 @@ int gen10g_no_soft_reset(struct phy_device *phydev)
}
EXPORT_SYMBOL_GPL(gen10g_no_soft_reset);
-int gen10g_config_init(struct phy_device *phydev)
-{
- /* Temporarily just say we support everything */
- linkmode_zero(phydev->supported);
-
- linkmode_set_bit(ETHTOOL_LINK_MODE_10000baseT_Full_BIT,
- phydev->supported);
- linkmode_copy(phydev->advertising, phydev->supported);
-
- return 0;
-}
-EXPORT_SYMBOL_GPL(gen10g_config_init);
-
struct phy_driver genphy_10g_driver = {
.phy_id = 0xffffffff,
.phy_id_mask = 0xffffffff,
.name = "Generic 10G PHY",
.soft_reset = gen10g_no_soft_reset,
- .config_init = gen10g_config_init,
.features = PHY_10GBIT_FEATURES,
.config_aneg = gen10g_config_aneg,
.read_status = gen10g_read_status,
diff --git a/drivers/net/phy/teranetics.c b/drivers/net/phy/teranetics.c
index 145c328b0..95280212d 100644
--- a/drivers/net/phy/teranetics.c
+++ b/drivers/net/phy/teranetics.c
@@ -80,7 +80,6 @@ static struct phy_driver teranetics_driver[] = {
.features = PHY_10GBIT_FEATURES,
.soft_reset = gen10g_no_soft_reset,
.aneg_done = teranetics_aneg_done,
- .config_init = gen10g_config_init,
.config_aneg = gen10g_config_aneg,
.read_status = teranetics_read_status,
.match_phy_device = teranetics_match_phy_device,
diff --git a/include/linux/phy.h b/include/linux/phy.h
index c69de3b87..817c8453a 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -1121,7 +1121,6 @@ int genphy_c45_read_status(struct phy_device *phydev);
int gen10g_config_aneg(struct phy_device *phydev);
int gen10g_read_status(struct phy_device *phydev);
int gen10g_no_soft_reset(struct phy_device *phydev);
-int gen10g_config_init(struct phy_device *phydev);
static inline int phy_read_status(struct phy_device *phydev)
{
--
2.21.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH net-next 5/5] net: phy: remove gen10g_no_soft_reset
2019-03-02 16:09 [PATCH net-next 0/5] net: phy: clean up the old gen10g functions Heiner Kallweit
` (2 preceding siblings ...)
2019-03-02 16:11 ` [PATCH net-next 3/5] net: phy: remove gen10g_config_init Heiner Kallweit
@ 2019-03-02 16:13 ` Heiner Kallweit
2019-03-03 15:45 ` Andrew Lunn
2019-03-02 16:15 ` [PATCH net-next 4/5] net: phy: don't export gen10g_read_status Heiner Kallweit
2019-03-04 5:48 ` [PATCH net-next 0/5] net: phy: clean up the old gen10g functions David Miller
5 siblings, 1 reply; 16+ messages in thread
From: Heiner Kallweit @ 2019-03-02 16:13 UTC (permalink / raw)
To: Andrew Lunn, Florian Fainelli, David Miller; +Cc: netdev@vger.kernel.org
genphy_no_soft_reset and gen10g_no_soft_reset are both the same no-ops,
one is enough.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/net/phy/cortina.c | 2 +-
drivers/net/phy/marvell10g.c | 4 ++--
drivers/net/phy/phy-c45.c | 9 +--------
drivers/net/phy/teranetics.c | 2 +-
include/linux/phy.h | 1 -
5 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/drivers/net/phy/cortina.c b/drivers/net/phy/cortina.c
index a64eb211c..856cdc36a 100644
--- a/drivers/net/phy/cortina.c
+++ b/drivers/net/phy/cortina.c
@@ -82,7 +82,7 @@ static struct phy_driver cortina_driver[] = {
.features = PHY_10GBIT_FEATURES,
.config_aneg = gen10g_config_aneg,
.read_status = cortina_read_status,
- .soft_reset = gen10g_no_soft_reset,
+ .soft_reset = genphy_no_soft_reset,
.probe = cortina_probe,
},
};
diff --git a/drivers/net/phy/marvell10g.c b/drivers/net/phy/marvell10g.c
index 580e91dea..3e1e83ba0 100644
--- a/drivers/net/phy/marvell10g.c
+++ b/drivers/net/phy/marvell10g.c
@@ -469,7 +469,7 @@ static struct phy_driver mv3310_drivers[] = {
.phy_id_mask = MARVELL_PHY_ID_MASK,
.name = "mv88x3310",
.get_features = mv3310_get_features,
- .soft_reset = gen10g_no_soft_reset,
+ .soft_reset = genphy_no_soft_reset,
.config_init = mv3310_config_init,
.probe = mv3310_probe,
.suspend = mv3310_suspend,
@@ -484,7 +484,7 @@ static struct phy_driver mv3310_drivers[] = {
.name = "mv88x2110",
.features = PHY_10GBIT_FEATURES,
.probe = mv3310_probe,
- .soft_reset = gen10g_no_soft_reset,
+ .soft_reset = genphy_no_soft_reset,
.config_init = mv3310_config_init,
.config_aneg = mv3310_config_aneg,
.aneg_done = mv3310_aneg_done,
diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c
index 6cd4bd5e9..c596eb54e 100644
--- a/drivers/net/phy/phy-c45.c
+++ b/drivers/net/phy/phy-c45.c
@@ -508,18 +508,11 @@ static int gen10g_read_status(struct phy_device *phydev)
return genphy_c45_read_link(phydev);
}
-int gen10g_no_soft_reset(struct phy_device *phydev)
-{
- /* Do nothing for now */
- return 0;
-}
-EXPORT_SYMBOL_GPL(gen10g_no_soft_reset);
-
struct phy_driver genphy_10g_driver = {
.phy_id = 0xffffffff,
.phy_id_mask = 0xffffffff,
.name = "Generic 10G PHY",
- .soft_reset = gen10g_no_soft_reset,
+ .soft_reset = genphy_no_soft_reset,
.features = PHY_10GBIT_FEATURES,
.config_aneg = gen10g_config_aneg,
.read_status = gen10g_read_status,
diff --git a/drivers/net/phy/teranetics.c b/drivers/net/phy/teranetics.c
index 95280212d..beb054b93 100644
--- a/drivers/net/phy/teranetics.c
+++ b/drivers/net/phy/teranetics.c
@@ -78,7 +78,7 @@ static struct phy_driver teranetics_driver[] = {
.phy_id_mask = 0xffffffff,
.name = "Teranetics TN2020",
.features = PHY_10GBIT_FEATURES,
- .soft_reset = gen10g_no_soft_reset,
+ .soft_reset = genphy_no_soft_reset,
.aneg_done = teranetics_aneg_done,
.config_aneg = gen10g_config_aneg,
.read_status = teranetics_read_status,
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 607942401..34084892a 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -1119,7 +1119,6 @@ int genphy_c45_read_status(struct phy_device *phydev);
/* The gen10g_* functions are the old Clause 45 stub */
int gen10g_config_aneg(struct phy_device *phydev);
-int gen10g_no_soft_reset(struct phy_device *phydev);
static inline int phy_read_status(struct phy_device *phydev)
{
--
2.21.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH net-next 4/5] net: phy: don't export gen10g_read_status
2019-03-02 16:09 [PATCH net-next 0/5] net: phy: clean up the old gen10g functions Heiner Kallweit
` (3 preceding siblings ...)
2019-03-02 16:13 ` [PATCH net-next 5/5] net: phy: remove gen10g_no_soft_reset Heiner Kallweit
@ 2019-03-02 16:15 ` Heiner Kallweit
2019-03-03 15:48 ` Andrew Lunn
2019-03-03 15:58 ` Andrew Lunn
2019-03-04 5:48 ` [PATCH net-next 0/5] net: phy: clean up the old gen10g functions David Miller
5 siblings, 2 replies; 16+ messages in thread
From: Heiner Kallweit @ 2019-03-02 16:15 UTC (permalink / raw)
To: Andrew Lunn, Florian Fainelli, David Miller; +Cc: netdev@vger.kernel.org
gen10g_read_status is deprecated, therefore stop exporting it.
We don't want to encourage anybody to use it.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/net/phy/phy-c45.c | 3 +--
include/linux/phy.h | 1 -
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c
index cdbcea860..6cd4bd5e9 100644
--- a/drivers/net/phy/phy-c45.c
+++ b/drivers/net/phy/phy-c45.c
@@ -499,7 +499,7 @@ int gen10g_config_aneg(struct phy_device *phydev)
}
EXPORT_SYMBOL_GPL(gen10g_config_aneg);
-int gen10g_read_status(struct phy_device *phydev)
+static int gen10g_read_status(struct phy_device *phydev)
{
/* For now just lie and say it's 10G all the time */
phydev->speed = SPEED_10000;
@@ -507,7 +507,6 @@ int gen10g_read_status(struct phy_device *phydev)
return genphy_c45_read_link(phydev);
}
-EXPORT_SYMBOL_GPL(gen10g_read_status);
int gen10g_no_soft_reset(struct phy_device *phydev)
{
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 817c8453a..607942401 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -1119,7 +1119,6 @@ int genphy_c45_read_status(struct phy_device *phydev);
/* The gen10g_* functions are the old Clause 45 stub */
int gen10g_config_aneg(struct phy_device *phydev);
-int gen10g_read_status(struct phy_device *phydev);
int gen10g_no_soft_reset(struct phy_device *phydev);
static inline int phy_read_status(struct phy_device *phydev)
--
2.21.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH net-next 1/5] net: phy: use genphy_c45_aneg_done in genphy_aneg_done
2019-03-02 16:10 ` [PATCH net-next 1/5] net: phy: use genphy_c45_aneg_done in genphy_aneg_done Heiner Kallweit
@ 2019-03-03 15:34 ` Andrew Lunn
0 siblings, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2019-03-03 15:34 UTC (permalink / raw)
To: Heiner Kallweit; +Cc: Florian Fainelli, David Miller, netdev@vger.kernel.org
On Sat, Mar 02, 2019 at 05:10:00PM +0100, Heiner Kallweit wrote:
> Now that we have it let's use genphy_c45_aneg_done() in phy_aneg_done().
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH net-next 2/5] net: phy: remove gen10g_suspend and gen10g_resume
2019-03-02 16:10 ` [PATCH net-next 2/5] net: phy: remove gen10g_suspend and gen10g_resume Heiner Kallweit
@ 2019-03-03 15:37 ` Andrew Lunn
0 siblings, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2019-03-03 15:37 UTC (permalink / raw)
To: Heiner Kallweit; +Cc: Florian Fainelli, David Miller, netdev@vger.kernel.org
On Sat, Mar 02, 2019 at 05:10:36PM +0100, Heiner Kallweit wrote:
> phy_suspend() and phy_resume() are no-ops anyway if no callback is
> defined. Therefore we don't need these stubs.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH net-next 3/5] net: phy: remove gen10g_config_init
2019-03-02 16:11 ` [PATCH net-next 3/5] net: phy: remove gen10g_config_init Heiner Kallweit
@ 2019-03-03 15:39 ` Andrew Lunn
0 siblings, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2019-03-03 15:39 UTC (permalink / raw)
To: Heiner Kallweit; +Cc: Florian Fainelli, David Miller, netdev@vger.kernel.org
On Sat, Mar 02, 2019 at 05:11:40PM +0100, Heiner Kallweit wrote:
> ETHTOOL_LINK_MODE_10000baseT_Full_BIT is set anyway in the supported
> and advertising bitmap because it's part of PHY_10GBIT_FEATURES.
> And all users of gen10g_config_init use PHY_10GBIT_FEATURES.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH net-next 5/5] net: phy: remove gen10g_no_soft_reset
2019-03-02 16:13 ` [PATCH net-next 5/5] net: phy: remove gen10g_no_soft_reset Heiner Kallweit
@ 2019-03-03 15:45 ` Andrew Lunn
0 siblings, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2019-03-03 15:45 UTC (permalink / raw)
To: Heiner Kallweit; +Cc: Florian Fainelli, David Miller, netdev@vger.kernel.org
On Sat, Mar 02, 2019 at 05:13:11PM +0100, Heiner Kallweit wrote:
> genphy_no_soft_reset and gen10g_no_soft_reset are both the same no-ops,
> one is enough.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH net-next 4/5] net: phy: don't export gen10g_read_status
2019-03-02 16:15 ` [PATCH net-next 4/5] net: phy: don't export gen10g_read_status Heiner Kallweit
@ 2019-03-03 15:48 ` Andrew Lunn
2019-03-03 15:58 ` Andrew Lunn
1 sibling, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2019-03-03 15:48 UTC (permalink / raw)
To: Heiner Kallweit; +Cc: Florian Fainelli, David Miller, netdev@vger.kernel.org
On Sat, Mar 02, 2019 at 05:15:56PM +0100, Heiner Kallweit wrote:
> gen10g_read_status is deprecated, therefore stop exporting it.
> We don't want to encourage anybody to use it.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH net-next 4/5] net: phy: don't export gen10g_read_status
2019-03-02 16:15 ` [PATCH net-next 4/5] net: phy: don't export gen10g_read_status Heiner Kallweit
2019-03-03 15:48 ` Andrew Lunn
@ 2019-03-03 15:58 ` Andrew Lunn
2019-03-03 16:12 ` Heiner Kallweit
1 sibling, 1 reply; 16+ messages in thread
From: Andrew Lunn @ 2019-03-03 15:58 UTC (permalink / raw)
To: Heiner Kallweit; +Cc: Florian Fainelli, David Miller, netdev@vger.kernel.org
On Sat, Mar 02, 2019 at 05:15:56PM +0100, Heiner Kallweit wrote:
> gen10g_read_status is deprecated, therefore stop exporting it.
> We don't want to encourage anybody to use it.
Hi Florian, Heiner
We should consider what we want to do with the generic 10G driver.
Can a c45 PHY be expected to work using a generic driver? We know
1000BaseT is not going to work, that needs vendor registers. But the
rest might?
I think we either need to drop the generic 10G driver, or make it use
all the new code which has been added over the last month.
Andrew
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH net-next 4/5] net: phy: don't export gen10g_read_status
2019-03-03 15:58 ` Andrew Lunn
@ 2019-03-03 16:12 ` Heiner Kallweit
2019-03-04 15:26 ` Jose Abreu
0 siblings, 1 reply; 16+ messages in thread
From: Heiner Kallweit @ 2019-03-03 16:12 UTC (permalink / raw)
To: Andrew Lunn; +Cc: Florian Fainelli, David Miller, netdev@vger.kernel.org
On 03.03.2019 16:58, Andrew Lunn wrote:
> On Sat, Mar 02, 2019 at 05:15:56PM +0100, Heiner Kallweit wrote:
>> gen10g_read_status is deprecated, therefore stop exporting it.
>> We don't want to encourage anybody to use it.
>
> Hi Florian, Heiner
>
Hi Andrew,
> We should consider what we want to do with the generic 10G driver.
>
> Can a c45 PHY be expected to work using a generic driver? We know
> 1000BaseT is not going to work, that needs vendor registers. But the
> rest might?
>
I think so. When looking at the Aquantia driver it should work with
reduced functionality with a generic c45 driver.
> I think we either need to drop the generic 10G driver, or make it use
> all the new code which has been added over the last month.
>
Not sure whether anybody is relying on the gen10g driver currently.
I'd say we could replace gen10g with a genc45 driver. It could provide
the basic functionality for a new C45 PHY model until there's a
dedicated PHY driver supporting the vendor-specific stuff and 1000BaseT.
> Andrew
>
Heiner
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH net-next 0/5] net: phy: clean up the old gen10g functions
2019-03-02 16:09 [PATCH net-next 0/5] net: phy: clean up the old gen10g functions Heiner Kallweit
` (4 preceding siblings ...)
2019-03-02 16:15 ` [PATCH net-next 4/5] net: phy: don't export gen10g_read_status Heiner Kallweit
@ 2019-03-04 5:48 ` David Miller
5 siblings, 0 replies; 16+ messages in thread
From: David Miller @ 2019-03-04 5:48 UTC (permalink / raw)
To: hkallweit1; +Cc: andrew, f.fainelli, netdev
From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Sat, 2 Mar 2019 17:09:06 +0100
> The old gen10g_ functions are mainly stubs and have been superseded
> by genphy_c45_ equivalents. So lets remove / hide the old functions
> as far as possible.
Series applied, thanks Heiner.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH net-next 4/5] net: phy: don't export gen10g_read_status
2019-03-03 16:12 ` Heiner Kallweit
@ 2019-03-04 15:26 ` Jose Abreu
2019-03-04 15:52 ` Andrew Lunn
0 siblings, 1 reply; 16+ messages in thread
From: Jose Abreu @ 2019-03-04 15:26 UTC (permalink / raw)
To: Heiner Kallweit, Andrew Lunn
Cc: Florian Fainelli, David Miller, netdev@vger.kernel.org
On 3/3/2019 4:12 PM, Heiner Kallweit wrote:
> Not sure whether anybody is relying on the gen10g driver currently.
I do for stmmac (code not upstreamed yet) and it works okay. For
debug purposes I ended up writing my own phy driver but this is a
plain copy of Generic 10G driver + reset and suspend/resume
callbacks.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH net-next 4/5] net: phy: don't export gen10g_read_status
2019-03-04 15:26 ` Jose Abreu
@ 2019-03-04 15:52 ` Andrew Lunn
0 siblings, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2019-03-04 15:52 UTC (permalink / raw)
To: Jose Abreu
Cc: Heiner Kallweit, Florian Fainelli, David Miller,
netdev@vger.kernel.org
On Mon, Mar 04, 2019 at 03:26:56PM +0000, Jose Abreu wrote:
> On 3/3/2019 4:12 PM, Heiner Kallweit wrote:
> > Not sure whether anybody is relying on the gen10g driver currently.
>
> I do for stmmac (code not upstreamed yet) and it works okay. For
> debug purposes I ended up writing my own phy driver but this is a
> plain copy of Generic 10G driver + reset and suspend/resume
> callbacks.
I strongly suggest you write a proper PHY driver. There are horrible
assumptions in the gen10g, like only 10G support. In order to make it
more general purpose, asking the PHY what it actually supports, etc
might break your use case. We then need to decided, is that a
regression, are we forced to leave it alone, or since your code is not
yet upstream, it is not a regression, and we are O.K. breaking it, in
order to make upstream code better?
Andrew
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2019-03-04 15:52 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-02 16:09 [PATCH net-next 0/5] net: phy: clean up the old gen10g functions Heiner Kallweit
2019-03-02 16:10 ` [PATCH net-next 1/5] net: phy: use genphy_c45_aneg_done in genphy_aneg_done Heiner Kallweit
2019-03-03 15:34 ` Andrew Lunn
2019-03-02 16:10 ` [PATCH net-next 2/5] net: phy: remove gen10g_suspend and gen10g_resume Heiner Kallweit
2019-03-03 15:37 ` Andrew Lunn
2019-03-02 16:11 ` [PATCH net-next 3/5] net: phy: remove gen10g_config_init Heiner Kallweit
2019-03-03 15:39 ` Andrew Lunn
2019-03-02 16:13 ` [PATCH net-next 5/5] net: phy: remove gen10g_no_soft_reset Heiner Kallweit
2019-03-03 15:45 ` Andrew Lunn
2019-03-02 16:15 ` [PATCH net-next 4/5] net: phy: don't export gen10g_read_status Heiner Kallweit
2019-03-03 15:48 ` Andrew Lunn
2019-03-03 15:58 ` Andrew Lunn
2019-03-03 16:12 ` Heiner Kallweit
2019-03-04 15:26 ` Jose Abreu
2019-03-04 15:52 ` Andrew Lunn
2019-03-04 5:48 ` [PATCH net-next 0/5] net: phy: clean up the old gen10g functions 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).