Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Paul Barker <pbarker@konsulko.com>
To: Woojung Huh <woojung.huh@microchip.com>,
	Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	"David S . Miller" <davem@davemloft.net>
Cc: Paul Barker <pbarker@konsulko.com>, netdev@vger.kernel.org
Subject: [PATCH 3/4] net: dsa: microchip: Disable RGMII in-band status on KSZ9893
Date: Sat,  5 Sep 2020 15:03:24 +0100	[thread overview]
Message-ID: <20200905140325.108846-4-pbarker@konsulko.com> (raw)
In-Reply-To: <20200905140325.108846-1-pbarker@konsulko.com>

We can't assume that the link partner supports the in-band status
reporting which is enabled by default on the KSZ9893 when using RGMII
for the upstream port.

Signed-off-by: Paul Barker <pbarker@konsulko.com>
---
 drivers/net/dsa/microchip/ksz9477.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/dsa/microchip/ksz9477.c b/drivers/net/dsa/microchip/ksz9477.c
index 3e36aa628c9f..2c953ab6ce16 100644
--- a/drivers/net/dsa/microchip/ksz9477.c
+++ b/drivers/net/dsa/microchip/ksz9477.c
@@ -1240,6 +1240,9 @@ static void ksz9477_port_setup(struct ksz_device *dev, int port, bool cpu_port)
 			if (dev->interface == PHY_INTERFACE_MODE_RGMII_ID ||
 			    dev->interface == PHY_INTERFACE_MODE_RGMII_TXID)
 				data8 |= PORT_RGMII_ID_EG_ENABLE;
+			/* On KSZ9893, disable RGMII in-band status support */
+			if (dev->features & IS_9893)
+				data8 &= ~PORT_MII_MAC_MODE;
 			p->phydev.speed = SPEED_1000;
 			break;
 		}
-- 
2.28.0


  parent reply	other threads:[~2020-09-05 14:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-05 14:03 [PATCH 0/4] ksz9477 dsa switch driver improvements Paul Barker
2020-09-05 14:03 ` [PATCH 1/4] net: dsa: microchip: Make switch detection more informative Paul Barker
2020-09-05 15:28   ` Andrew Lunn
2020-09-05 14:03 ` [PATCH 2/4] net: dsa: microchip: Add debug print for XMII port mode Paul Barker
2020-09-05 15:31   ` Andrew Lunn
2020-09-05 14:03 ` Paul Barker [this message]
2020-09-05 15:32   ` [PATCH 3/4] net: dsa: microchip: Disable RGMII in-band status on KSZ9893 Andrew Lunn
2020-09-05 15:53     ` Paul Barker
2020-09-05 16:04       ` Florian Fainelli
2020-09-05 16:06       ` Andrew Lunn
2020-09-05 14:03 ` [PATCH 4/4] net: dsa: microchip: Implement recommended reset timing Paul Barker
2020-09-05 15:34 ` [PATCH 0/4] ksz9477 dsa switch driver improvements Andrew Lunn
2020-09-05 15:54   ` Paul Barker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200905140325.108846-4-pbarker@konsulko.com \
    --to=pbarker@konsulko.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@gmail.com \
    --cc=woojung.huh@microchip.com \
    --subject='Re: [PATCH 3/4] net: dsa: microchip: Disable RGMII in-band status on KSZ9893' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).