All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/4] net: phy: marvell: fix and extend downshift support
@ 2019-10-28 19:51 Heiner Kallweit
  2019-10-28 19:52 ` [PATCH net-next 1/4] net: phy: marvell: fix typo in constant MII_M1011_PHY_SRC_DOWNSHIFT_MASK Heiner Kallweit
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Heiner Kallweit @ 2019-10-28 19:51 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, David Miller; +Cc: netdev, Chris Healy

This series includes two fixes and two extensions for downshift support.

Heiner Kallweit (4):
  net: phy: marvell: fix typo in constant
    MII_M1011_PHY_SRC_DOWNSHIFT_MASK
  net: phy: marvell: fix downshift function naming
  net: phy: marvell: add downshift support for M88E1111
  net: phy: marvell: add PHY tunable support for more PHY versions

 drivers/net/phy/marvell.c | 112 ++++++++++++++++++++++++++++++++------
 1 file changed, 94 insertions(+), 18 deletions(-)

-- 
2.23.0


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH net-next 1/4] net: phy: marvell: fix typo in constant MII_M1011_PHY_SRC_DOWNSHIFT_MASK
  2019-10-28 19:51 [PATCH net-next 0/4] net: phy: marvell: fix and extend downshift support Heiner Kallweit
@ 2019-10-28 19:52 ` Heiner Kallweit
  2019-10-28 19:56   ` Andrew Lunn
  2019-10-29 17:04   ` Florian Fainelli
  2019-10-28 19:52 ` [PATCH net-next 2/4] net: phy: marvell: fix downshift function naming Heiner Kallweit
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 16+ messages in thread
From: Heiner Kallweit @ 2019-10-28 19:52 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, David Miller; +Cc: netdev, Chris Healy

Fix typo and use PHY_SCR for PHY-specific Control Register.

Fixes: a3bdfce7bf9c ("net: phy: marvell: support downshift as PHY tunable")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/net/phy/marvell.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 0a814fde1..e77fc25ba 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -53,7 +53,7 @@
 
 #define MII_M1011_PHY_SCR			0x10
 #define MII_M1011_PHY_SCR_DOWNSHIFT_EN		BIT(11)
-#define MII_M1011_PHY_SRC_DOWNSHIFT_MASK	GENMASK(14, 12)
+#define MII_M1011_PHY_SCR_DOWNSHIFT_MASK	GENMASK(14, 12)
 #define MII_M1011_PHY_SCR_DOWNSHIFT_MAX		8
 #define MII_M1011_PHY_SCR_MDI			(0x0 << 5)
 #define MII_M1011_PHY_SCR_MDI_X			(0x1 << 5)
@@ -793,7 +793,7 @@ static int m88e1111_get_downshift(struct phy_device *phydev, u8 *data)
 		return val;
 
 	enable = FIELD_GET(MII_M1011_PHY_SCR_DOWNSHIFT_EN, val);
-	cnt = FIELD_GET(MII_M1011_PHY_SRC_DOWNSHIFT_MASK, val) + 1;
+	cnt = FIELD_GET(MII_M1011_PHY_SCR_DOWNSHIFT_MASK, val) + 1;
 
 	*data = enable ? cnt : DOWNSHIFT_DEV_DISABLE;
 
@@ -812,11 +812,11 @@ static int m88e1111_set_downshift(struct phy_device *phydev, u8 cnt)
 				      MII_M1011_PHY_SCR_DOWNSHIFT_EN);
 
 	val = MII_M1011_PHY_SCR_DOWNSHIFT_EN;
-	val |= FIELD_PREP(MII_M1011_PHY_SRC_DOWNSHIFT_MASK, cnt - 1);
+	val |= FIELD_PREP(MII_M1011_PHY_SCR_DOWNSHIFT_MASK, cnt - 1);
 
 	return phy_modify(phydev, MII_M1011_PHY_SCR,
 			  MII_M1011_PHY_SCR_DOWNSHIFT_EN |
-			  MII_M1011_PHY_SRC_DOWNSHIFT_MASK,
+			  MII_M1011_PHY_SCR_DOWNSHIFT_MASK,
 			  val);
 }
 
-- 
2.23.0



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH net-next 2/4] net: phy: marvell: fix downshift function naming
  2019-10-28 19:51 [PATCH net-next 0/4] net: phy: marvell: fix and extend downshift support Heiner Kallweit
  2019-10-28 19:52 ` [PATCH net-next 1/4] net: phy: marvell: fix typo in constant MII_M1011_PHY_SRC_DOWNSHIFT_MASK Heiner Kallweit
@ 2019-10-28 19:52 ` Heiner Kallweit
  2019-10-28 19:57   ` Andrew Lunn
  2019-10-29 17:12   ` Florian Fainelli
  2019-10-28 19:53 ` [PATCH net-next 3/4] net: phy: marvell: add downshift support for M88E1111 Heiner Kallweit
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 16+ messages in thread
From: Heiner Kallweit @ 2019-10-28 19:52 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, David Miller; +Cc: netdev, Chris Healy

I got access to the M88E1111 datasheet, and this PHY version uses
another register for downshift configuration. Therefore change prefix
to m88e1011, aligned with constants like MII_M1011_PHY_SCR.

Fixes: a3bdfce7bf9c ("net: phy: marvell: support downshift as PHY tunable")
Reported-by: Chris Healy <Chris.Healy@zii.aero>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/net/phy/marvell.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index e77fc25ba..68ef84c23 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -784,7 +784,7 @@ static int m88e1111_config_init(struct phy_device *phydev)
 	return genphy_soft_reset(phydev);
 }
 
-static int m88e1111_get_downshift(struct phy_device *phydev, u8 *data)
+static int m88e1011_get_downshift(struct phy_device *phydev, u8 *data)
 {
 	int val, cnt, enable;
 
@@ -800,7 +800,7 @@ static int m88e1111_get_downshift(struct phy_device *phydev, u8 *data)
 	return 0;
 }
 
-static int m88e1111_set_downshift(struct phy_device *phydev, u8 cnt)
+static int m88e1011_set_downshift(struct phy_device *phydev, u8 cnt)
 {
 	int val;
 
@@ -820,29 +820,29 @@ static int m88e1111_set_downshift(struct phy_device *phydev, u8 cnt)
 			  val);
 }
 
-static int m88e1111_get_tunable(struct phy_device *phydev,
+static int m88e1011_get_tunable(struct phy_device *phydev,
 				struct ethtool_tunable *tuna, void *data)
 {
 	switch (tuna->id) {
 	case ETHTOOL_PHY_DOWNSHIFT:
-		return m88e1111_get_downshift(phydev, data);
+		return m88e1011_get_downshift(phydev, data);
 	default:
 		return -EOPNOTSUPP;
 	}
 }
 
-static int m88e1111_set_tunable(struct phy_device *phydev,
+static int m88e1011_set_tunable(struct phy_device *phydev,
 				struct ethtool_tunable *tuna, const void *data)
 {
 	switch (tuna->id) {
 	case ETHTOOL_PHY_DOWNSHIFT:
-		return m88e1111_set_downshift(phydev, *(const u8 *)data);
+		return m88e1011_set_downshift(phydev, *(const u8 *)data);
 	default:
 		return -EOPNOTSUPP;
 	}
 }
 
-static void m88e1111_link_change_notify(struct phy_device *phydev)
+static void m88e1011_link_change_notify(struct phy_device *phydev)
 {
 	int status;
 
@@ -875,7 +875,7 @@ static int m88e1116r_config_init(struct phy_device *phydev)
 	if (err < 0)
 		return err;
 
-	err = m88e1111_set_downshift(phydev, 8);
+	err = m88e1011_set_downshift(phydev, 8);
 	if (err < 0)
 		return err;
 
@@ -1177,7 +1177,7 @@ static int m88e1540_get_tunable(struct phy_device *phydev,
 	case ETHTOOL_PHY_FAST_LINK_DOWN:
 		return m88e1540_get_fld(phydev, data);
 	case ETHTOOL_PHY_DOWNSHIFT:
-		return m88e1111_get_downshift(phydev, data);
+		return m88e1011_get_downshift(phydev, data);
 	default:
 		return -EOPNOTSUPP;
 	}
@@ -1190,7 +1190,7 @@ static int m88e1540_set_tunable(struct phy_device *phydev,
 	case ETHTOOL_PHY_FAST_LINK_DOWN:
 		return m88e1540_set_fld(phydev, data);
 	case ETHTOOL_PHY_DOWNSHIFT:
-		return m88e1111_set_downshift(phydev, *(const u8 *)data);
+		return m88e1011_set_downshift(phydev, *(const u8 *)data);
 	default:
 		return -EOPNOTSUPP;
 	}
@@ -2283,9 +2283,9 @@ static struct phy_driver marvell_drivers[] = {
 		.get_sset_count = marvell_get_sset_count,
 		.get_strings = marvell_get_strings,
 		.get_stats = marvell_get_stats,
-		.get_tunable = m88e1111_get_tunable,
-		.set_tunable = m88e1111_set_tunable,
-		.link_change_notify = m88e1111_link_change_notify,
+		.get_tunable = m88e1011_get_tunable,
+		.set_tunable = m88e1011_set_tunable,
+		.link_change_notify = m88e1011_link_change_notify,
 	},
 	{
 		.phy_id = MARVELL_PHY_ID_88E1318S,
@@ -2425,7 +2425,7 @@ static struct phy_driver marvell_drivers[] = {
 		.get_stats = marvell_get_stats,
 		.get_tunable = m88e1540_get_tunable,
 		.set_tunable = m88e1540_set_tunable,
-		.link_change_notify = m88e1111_link_change_notify,
+		.link_change_notify = m88e1011_link_change_notify,
 	},
 	{
 		.phy_id = MARVELL_PHY_ID_88E1545,
@@ -2488,7 +2488,7 @@ static struct phy_driver marvell_drivers[] = {
 		.get_stats = marvell_get_stats,
 		.get_tunable = m88e1540_get_tunable,
 		.set_tunable = m88e1540_set_tunable,
-		.link_change_notify = m88e1111_link_change_notify,
+		.link_change_notify = m88e1011_link_change_notify,
 	},
 };
 
-- 
2.23.0



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH net-next 3/4] net: phy: marvell: add downshift support for M88E1111
  2019-10-28 19:51 [PATCH net-next 0/4] net: phy: marvell: fix and extend downshift support Heiner Kallweit
  2019-10-28 19:52 ` [PATCH net-next 1/4] net: phy: marvell: fix typo in constant MII_M1011_PHY_SRC_DOWNSHIFT_MASK Heiner Kallweit
  2019-10-28 19:52 ` [PATCH net-next 2/4] net: phy: marvell: fix downshift function naming Heiner Kallweit
@ 2019-10-28 19:53 ` Heiner Kallweit
  2019-10-28 20:09   ` Andrew Lunn
  2019-10-29 18:00   ` Florian Fainelli
  2019-10-28 19:54 ` [PATCH net-next 4/4] net: phy: marvell: add PHY tunable support for more PHY versions Heiner Kallweit
  2019-10-30  0:50 ` [PATCH net-next 0/4] net: phy: marvell: fix and extend downshift support David Miller
  4 siblings, 2 replies; 16+ messages in thread
From: Heiner Kallweit @ 2019-10-28 19:53 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, David Miller; +Cc: netdev, Chris Healy

This patch adds downshift support for M88E1111. This PHY version uses
another register for downshift configuration, reading downshift status
is possible via the same register as for other PHY versions.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/net/phy/marvell.c | 64 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 68ef84c23..aa4864c67 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -66,6 +66,9 @@
 #define MII_M1111_PHY_LED_DIRECT	0x4100
 #define MII_M1111_PHY_LED_COMBINE	0x411c
 #define MII_M1111_PHY_EXT_CR		0x14
+#define MII_M1111_PHY_EXT_CR_DOWNSHIFT_MASK	GENMASK(11, 9)
+#define MII_M1111_PHY_EXT_CR_DOWNSHIFT_MAX	8
+#define MII_M1111_PHY_EXT_CR_DOWNSHIFT_EN	BIT(8)
 #define MII_M1111_RGMII_RX_DELAY	BIT(7)
 #define MII_M1111_RGMII_TX_DELAY	BIT(1)
 #define MII_M1111_PHY_EXT_SR		0x1b
@@ -784,6 +787,64 @@ static int m88e1111_config_init(struct phy_device *phydev)
 	return genphy_soft_reset(phydev);
 }
 
+static int m88e1111_get_downshift(struct phy_device *phydev, u8 *data)
+{
+	int val, cnt, enable;
+
+	val = phy_read(phydev, MII_M1111_PHY_EXT_CR);
+	if (val < 0)
+		return val;
+
+	enable = FIELD_GET(MII_M1111_PHY_EXT_CR_DOWNSHIFT_EN, val);
+	cnt = FIELD_GET(MII_M1111_PHY_EXT_CR_DOWNSHIFT_MASK, val) + 1;
+
+	*data = enable ? cnt : DOWNSHIFT_DEV_DISABLE;
+
+	return 0;
+}
+
+static int m88e1111_set_downshift(struct phy_device *phydev, u8 cnt)
+{
+	int val;
+
+	if (cnt > MII_M1111_PHY_EXT_CR_DOWNSHIFT_MAX)
+		return -E2BIG;
+
+	if (!cnt)
+		return phy_clear_bits(phydev, MII_M1111_PHY_EXT_CR,
+				      MII_M1111_PHY_EXT_CR_DOWNSHIFT_EN);
+
+	val = MII_M1111_PHY_EXT_CR_DOWNSHIFT_EN;
+	val |= FIELD_PREP(MII_M1111_PHY_EXT_CR_DOWNSHIFT_MASK, cnt - 1);
+
+	return phy_modify(phydev, MII_M1111_PHY_EXT_CR,
+			  MII_M1111_PHY_EXT_CR_DOWNSHIFT_EN |
+			  MII_M1111_PHY_EXT_CR_DOWNSHIFT_MASK,
+			  val);
+}
+
+static int m88e1111_get_tunable(struct phy_device *phydev,
+				struct ethtool_tunable *tuna, void *data)
+{
+	switch (tuna->id) {
+	case ETHTOOL_PHY_DOWNSHIFT:
+		return m88e1111_get_downshift(phydev, data);
+	default:
+		return -EOPNOTSUPP;
+	}
+}
+
+static int m88e1111_set_tunable(struct phy_device *phydev,
+				struct ethtool_tunable *tuna, const void *data)
+{
+	switch (tuna->id) {
+	case ETHTOOL_PHY_DOWNSHIFT:
+		return m88e1111_set_downshift(phydev, *(const u8 *)data);
+	default:
+		return -EOPNOTSUPP;
+	}
+}
+
 static int m88e1011_get_downshift(struct phy_device *phydev, u8 *data)
 {
 	int val, cnt, enable;
@@ -2245,6 +2306,9 @@ static struct phy_driver marvell_drivers[] = {
 		.get_sset_count = marvell_get_sset_count,
 		.get_strings = marvell_get_strings,
 		.get_stats = marvell_get_stats,
+		.get_tunable = m88e1111_get_tunable,
+		.set_tunable = m88e1111_set_tunable,
+		.link_change_notify = m88e1011_link_change_notify,
 	},
 	{
 		.phy_id = MARVELL_PHY_ID_88E1118,
-- 
2.23.0



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH net-next 4/4] net: phy: marvell: add PHY tunable support for more PHY versions
  2019-10-28 19:51 [PATCH net-next 0/4] net: phy: marvell: fix and extend downshift support Heiner Kallweit
                   ` (2 preceding siblings ...)
  2019-10-28 19:53 ` [PATCH net-next 3/4] net: phy: marvell: add downshift support for M88E1111 Heiner Kallweit
@ 2019-10-28 19:54 ` Heiner Kallweit
  2019-10-28 20:15   ` Andrew Lunn
  2019-10-29 18:01   ` Florian Fainelli
  2019-10-30  0:50 ` [PATCH net-next 0/4] net: phy: marvell: fix and extend downshift support David Miller
  4 siblings, 2 replies; 16+ messages in thread
From: Heiner Kallweit @ 2019-10-28 19:54 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, David Miller; +Cc: netdev, Chris Healy

More PHY versions are compatible with the existing downshift
implementation, so let's add downshift support for them.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/net/phy/marvell.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index aa4864c67..cb6570ac6 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -2287,6 +2287,9 @@ static struct phy_driver marvell_drivers[] = {
 		.get_sset_count = marvell_get_sset_count,
 		.get_strings = marvell_get_strings,
 		.get_stats = marvell_get_stats,
+		.get_tunable = m88e1011_get_tunable,
+		.set_tunable = m88e1011_set_tunable,
+		.link_change_notify = m88e1011_link_change_notify,
 	},
 	{
 		.phy_id = MARVELL_PHY_ID_88E1111,
@@ -2444,6 +2447,9 @@ static struct phy_driver marvell_drivers[] = {
 		.get_sset_count = marvell_get_sset_count,
 		.get_strings = marvell_get_strings,
 		.get_stats = marvell_get_stats,
+		.get_tunable = m88e1011_get_tunable,
+		.set_tunable = m88e1011_set_tunable,
+		.link_change_notify = m88e1011_link_change_notify,
 	},
 	{
 		.phy_id = MARVELL_PHY_ID_88E1510,
@@ -2467,6 +2473,9 @@ static struct phy_driver marvell_drivers[] = {
 		.get_strings = marvell_get_strings,
 		.get_stats = marvell_get_stats,
 		.set_loopback = genphy_loopback,
+		.get_tunable = m88e1011_get_tunable,
+		.set_tunable = m88e1011_set_tunable,
+		.link_change_notify = m88e1011_link_change_notify,
 	},
 	{
 		.phy_id = MARVELL_PHY_ID_88E1540,
@@ -2510,6 +2519,9 @@ static struct phy_driver marvell_drivers[] = {
 		.get_sset_count = marvell_get_sset_count,
 		.get_strings = marvell_get_strings,
 		.get_stats = marvell_get_stats,
+		.get_tunable = m88e1540_get_tunable,
+		.set_tunable = m88e1540_set_tunable,
+		.link_change_notify = m88e1011_link_change_notify,
 	},
 	{
 		.phy_id = MARVELL_PHY_ID_88E3016,
-- 
2.23.0



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH net-next 1/4] net: phy: marvell: fix typo in constant MII_M1011_PHY_SRC_DOWNSHIFT_MASK
  2019-10-28 19:52 ` [PATCH net-next 1/4] net: phy: marvell: fix typo in constant MII_M1011_PHY_SRC_DOWNSHIFT_MASK Heiner Kallweit
@ 2019-10-28 19:56   ` Andrew Lunn
  2019-10-29 17:04   ` Florian Fainelli
  1 sibling, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2019-10-28 19:56 UTC (permalink / raw)
  To: Heiner Kallweit; +Cc: Florian Fainelli, David Miller, netdev, Chris Healy

On Mon, Oct 28, 2019 at 08:52:22PM +0100, Heiner Kallweit wrote:
> Fix typo and use PHY_SCR for PHY-specific Control Register.
> 
> Fixes: a3bdfce7bf9c ("net: phy: marvell: support downshift as PHY tunable")
> 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/4] net: phy: marvell: fix downshift function naming
  2019-10-28 19:52 ` [PATCH net-next 2/4] net: phy: marvell: fix downshift function naming Heiner Kallweit
@ 2019-10-28 19:57   ` Andrew Lunn
  2019-10-29 17:12   ` Florian Fainelli
  1 sibling, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2019-10-28 19:57 UTC (permalink / raw)
  To: Heiner Kallweit; +Cc: Florian Fainelli, David Miller, netdev, Chris Healy

On Mon, Oct 28, 2019 at 08:52:55PM +0100, Heiner Kallweit wrote:
> I got access to the M88E1111 datasheet, and this PHY version uses
> another register for downshift configuration. Therefore change prefix
> to m88e1011, aligned with constants like MII_M1011_PHY_SCR.
> 
> Fixes: a3bdfce7bf9c ("net: phy: marvell: support downshift as PHY tunable")
> Reported-by: Chris Healy <Chris.Healy@zii.aero>
> 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/4] net: phy: marvell: add downshift support for M88E1111
  2019-10-28 19:53 ` [PATCH net-next 3/4] net: phy: marvell: add downshift support for M88E1111 Heiner Kallweit
@ 2019-10-28 20:09   ` Andrew Lunn
  2019-10-28 20:12     ` Heiner Kallweit
  2019-10-29  6:54     ` Heiner Kallweit
  2019-10-29 18:00   ` Florian Fainelli
  1 sibling, 2 replies; 16+ messages in thread
From: Andrew Lunn @ 2019-10-28 20:09 UTC (permalink / raw)
  To: Heiner Kallweit; +Cc: Florian Fainelli, David Miller, netdev, Chris Healy

On Mon, Oct 28, 2019 at 08:53:25PM +0100, Heiner Kallweit wrote:
> This patch adds downshift support for M88E1111. This PHY version uses
> another register for downshift configuration, reading downshift status
> is possible via the same register as for other PHY versions.

Hi Heiner

I think this method is also valid for the 88E1145.

  Andrew

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH net-next 3/4] net: phy: marvell: add downshift support for M88E1111
  2019-10-28 20:09   ` Andrew Lunn
@ 2019-10-28 20:12     ` Heiner Kallweit
  2019-10-29  6:54     ` Heiner Kallweit
  1 sibling, 0 replies; 16+ messages in thread
From: Heiner Kallweit @ 2019-10-28 20:12 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: Florian Fainelli, David Miller, netdev, Chris Healy

On 28.10.2019 21:09, Andrew Lunn wrote:
> On Mon, Oct 28, 2019 at 08:53:25PM +0100, Heiner Kallweit wrote:
>> This patch adds downshift support for M88E1111. This PHY version uses
>> another register for downshift configuration, reading downshift status
>> is possible via the same register as for other PHY versions.
> 
> Hi Heiner
> 
Hi Andrew,

> I think this method is also valid for the 88E1145.
> 
for this one I don't have the datasheet, therefore I didn't
consider it. Then we can add downshift support for 88E1145
in a follow-up patch, similar to patch 4.

>   Andrew
> 
Heiner

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH net-next 4/4] net: phy: marvell: add PHY tunable support for more PHY versions
  2019-10-28 19:54 ` [PATCH net-next 4/4] net: phy: marvell: add PHY tunable support for more PHY versions Heiner Kallweit
@ 2019-10-28 20:15   ` Andrew Lunn
  2019-10-29 18:01   ` Florian Fainelli
  1 sibling, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2019-10-28 20:15 UTC (permalink / raw)
  To: Heiner Kallweit; +Cc: Florian Fainelli, David Miller, netdev, Chris Healy

On Mon, Oct 28, 2019 at 08:54:17PM +0100, Heiner Kallweit wrote:
> More PHY versions are compatible with the existing downshift
> implementation, so let's add downshift support for them.
> 
> 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/4] net: phy: marvell: add downshift support for M88E1111
  2019-10-28 20:09   ` Andrew Lunn
  2019-10-28 20:12     ` Heiner Kallweit
@ 2019-10-29  6:54     ` Heiner Kallweit
  1 sibling, 0 replies; 16+ messages in thread
From: Heiner Kallweit @ 2019-10-29  6:54 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: Florian Fainelli, David Miller, netdev, Chris Healy

On 28.10.2019 21:09, Andrew Lunn wrote:
> On Mon, Oct 28, 2019 at 08:53:25PM +0100, Heiner Kallweit wrote:
>> This patch adds downshift support for M88E1111. This PHY version uses
>> another register for downshift configuration, reading downshift status
>> is possible via the same register as for other PHY versions.
> 
> Hi Heiner
> 
Hi Andrew,

> I think this method is also valid for the 88E1145.
> 
I had a look at the Marvell DSDT and indeed 88E114X has same downshift
support as 88E1111 (what's called MAD_PHY_DOWNSHIFT_TYPE1 in the DSDT).
So I will submit a follow-up patch to add downshift support for 88E1145.

>   Andrew
> 
Heiner

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH net-next 1/4] net: phy: marvell: fix typo in constant MII_M1011_PHY_SRC_DOWNSHIFT_MASK
  2019-10-28 19:52 ` [PATCH net-next 1/4] net: phy: marvell: fix typo in constant MII_M1011_PHY_SRC_DOWNSHIFT_MASK Heiner Kallweit
  2019-10-28 19:56   ` Andrew Lunn
@ 2019-10-29 17:04   ` Florian Fainelli
  1 sibling, 0 replies; 16+ messages in thread
From: Florian Fainelli @ 2019-10-29 17:04 UTC (permalink / raw)
  To: Heiner Kallweit, Andrew Lunn, David Miller; +Cc: netdev, Chris Healy

On 10/28/19 12:52 PM, Heiner Kallweit wrote:
> Fix typo and use PHY_SCR for PHY-specific Control Register.
> 
> Fixes: a3bdfce7bf9c ("net: phy: marvell: support downshift as PHY tunable")
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

Providing a Fixes tag here sounds a bit excessive, but this looking good.
-- 
Florian

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH net-next 2/4] net: phy: marvell: fix downshift function naming
  2019-10-28 19:52 ` [PATCH net-next 2/4] net: phy: marvell: fix downshift function naming Heiner Kallweit
  2019-10-28 19:57   ` Andrew Lunn
@ 2019-10-29 17:12   ` Florian Fainelli
  1 sibling, 0 replies; 16+ messages in thread
From: Florian Fainelli @ 2019-10-29 17:12 UTC (permalink / raw)
  To: Heiner Kallweit, Andrew Lunn, David Miller; +Cc: netdev, Chris Healy

On 10/28/19 12:52 PM, Heiner Kallweit wrote:
> I got access to the M88E1111 datasheet, and this PHY version uses
> another register for downshift configuration. Therefore change prefix
> to m88e1011, aligned with constants like MII_M1011_PHY_SCR.
> 
> Fixes: a3bdfce7bf9c ("net: phy: marvell: support downshift as PHY tunable")
> Reported-by: Chris Healy <Chris.Healy@zii.aero>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Providing a Fixes tag here sounds a bit excessive, but this looking good:

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH net-next 3/4] net: phy: marvell: add downshift support for M88E1111
  2019-10-28 19:53 ` [PATCH net-next 3/4] net: phy: marvell: add downshift support for M88E1111 Heiner Kallweit
  2019-10-28 20:09   ` Andrew Lunn
@ 2019-10-29 18:00   ` Florian Fainelli
  1 sibling, 0 replies; 16+ messages in thread
From: Florian Fainelli @ 2019-10-29 18:00 UTC (permalink / raw)
  To: Heiner Kallweit, Andrew Lunn, David Miller; +Cc: netdev, Chris Healy

On 10/28/19 12:53 PM, Heiner Kallweit wrote:
> This patch adds downshift support for M88E1111. This PHY version uses
> another register for downshift configuration, reading downshift status
> is possible via the same register as for other PHY versions.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH net-next 4/4] net: phy: marvell: add PHY tunable support for more PHY versions
  2019-10-28 19:54 ` [PATCH net-next 4/4] net: phy: marvell: add PHY tunable support for more PHY versions Heiner Kallweit
  2019-10-28 20:15   ` Andrew Lunn
@ 2019-10-29 18:01   ` Florian Fainelli
  1 sibling, 0 replies; 16+ messages in thread
From: Florian Fainelli @ 2019-10-29 18:01 UTC (permalink / raw)
  To: Heiner Kallweit, Andrew Lunn, David Miller; +Cc: netdev, Chris Healy

On 10/28/19 12:54 PM, Heiner Kallweit wrote:
> More PHY versions are compatible with the existing downshift
> implementation, so let's add downshift support for them.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH net-next 0/4] net: phy: marvell: fix and extend downshift support
  2019-10-28 19:51 [PATCH net-next 0/4] net: phy: marvell: fix and extend downshift support Heiner Kallweit
                   ` (3 preceding siblings ...)
  2019-10-28 19:54 ` [PATCH net-next 4/4] net: phy: marvell: add PHY tunable support for more PHY versions Heiner Kallweit
@ 2019-10-30  0:50 ` David Miller
  4 siblings, 0 replies; 16+ messages in thread
From: David Miller @ 2019-10-30  0:50 UTC (permalink / raw)
  To: hkallweit1; +Cc: andrew, f.fainelli, netdev, Chris.Healy

From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Mon, 28 Oct 2019 20:51:27 +0100

> This series includes two fixes and two extensions for downshift
> support.

Series applied, thanks Heiner.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-10-30  0:50 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-28 19:51 [PATCH net-next 0/4] net: phy: marvell: fix and extend downshift support Heiner Kallweit
2019-10-28 19:52 ` [PATCH net-next 1/4] net: phy: marvell: fix typo in constant MII_M1011_PHY_SRC_DOWNSHIFT_MASK Heiner Kallweit
2019-10-28 19:56   ` Andrew Lunn
2019-10-29 17:04   ` Florian Fainelli
2019-10-28 19:52 ` [PATCH net-next 2/4] net: phy: marvell: fix downshift function naming Heiner Kallweit
2019-10-28 19:57   ` Andrew Lunn
2019-10-29 17:12   ` Florian Fainelli
2019-10-28 19:53 ` [PATCH net-next 3/4] net: phy: marvell: add downshift support for M88E1111 Heiner Kallweit
2019-10-28 20:09   ` Andrew Lunn
2019-10-28 20:12     ` Heiner Kallweit
2019-10-29  6:54     ` Heiner Kallweit
2019-10-29 18:00   ` Florian Fainelli
2019-10-28 19:54 ` [PATCH net-next 4/4] net: phy: marvell: add PHY tunable support for more PHY versions Heiner Kallweit
2019-10-28 20:15   ` Andrew Lunn
2019-10-29 18:01   ` Florian Fainelli
2019-10-30  0:50 ` [PATCH net-next 0/4] net: phy: marvell: fix and extend downshift support David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.