From: Milind Parab <mparab@cadence.com>
To: Russell King - ARM Linux admin <linux@armlinux.org.uk>
Cc: "nicolas.nerre@microchip.com" <nicolas.nerre@microchip.com>,
"andrew@lunn.ch" <andrew@lunn.ch>,
"antoine.tenart@bootlin.com" <antoine.tenart@bootlin.com>,
"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"hkallweit1@gmail.com" <hkallweit1@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Dhananjay Vilasrao Kangude <dkangude@cadence.com>,
"a.fatoum@pengutronix.de" <a.fatoum@pengutronix.de>,
"brad.mouring@ni.com" <brad.mouring@ni.com>,
Parshuram Raju Thombare <pthombar@cadence.com>
Subject: RE: [PATCH 3/3] net: macb: add support for high speed interface
Date: Tue, 10 Dec 2019 11:20:38 +0000 [thread overview]
Message-ID: <BY5PR07MB651448607BAF87DC9C60F2AFD35B0@BY5PR07MB6514.namprd07.prod.outlook.com> (raw)
In-Reply-To: <20191209113606.GF25745@shell.armlinux.org.uk>
>> This patch add support for high speed USXGMII PCS and 10G
>> speed in Cadence ethernet controller driver.
>
>How has this been tested?
>
This patch is tested in 10G fixed mode on SFP+ module.
In our own lab, we have various hardware test platforms supporting SGMII (through a TI PHY and another build that connects to a Marvell 1G PHY), GMII (through a Marvell PHY), 10GBASE-R (direct connection to SFP+), USXGMII (currently we can emulate this using an SFP+ connection from/to our own hardware)
>> @@ -81,6 +81,18 @@ struct sifive_fu540_macb_mgmt {
>> #define MACB_WOL_HAS_MAGIC_PACKET (0x1 << 0)
>> #define MACB_WOL_ENABLED (0x1 << 1)
>>
>> +enum {
>> + HS_MAC_SPEED_100M,
>> + HS_MAC_SPEED_1000M,
>> + HS_MAC_SPEED_2500M,
>> + HS_MAC_SPEED_5000M,
>> + HS_MAC_SPEED_10000M,
>
>Are these chip register definitions? Shouldn't you be relying on fixed
>values for these, rather than their position in an enumerated list?
>
Okay, yes it is safe to use fixed values instead of enum. I will change this.
>
>> + gem_writel(bp, USX_CONTROL, config | GEM_BIT(TX_EN));
>> + config = gem_readl(bp, USX_CONTROL);
>> + gem_writel(bp, USX_CONTROL, config | GEM_BIT(SIGNAL_OK));
>> + ret = readx_poll_timeout(GEM_READ_USX_STATUS, bp, val,
>> + val & GEM_BIT(USX_BLOCK_LOCK),
>> + 1, MACB_USX_BLOCK_LOCK_TIMEOUT);
>
>What if there's no signal to lock on to? That's treated as link down
>and is not a failure.
>
Yes, if there is no signal to lock on, that is treated as link down.
Is this okay or should there be some additional error handling needed?
>> +
>> + switch (state->speed) {
>> + case SPEED_10000:
>> + speed = HS_MAC_SPEED_10000M;
>> + break;
>> + case SPEED_5000:
>> + speed = HS_MAC_SPEED_5000M;
>> + break;
>> + case SPEED_2500:
>> + speed = HS_MAC_SPEED_2500M;
>> + break;
>> + case SPEED_1000:
>> + speed = HS_MAC_SPEED_1000M;
>> + break;
>> + default:
>> + case SPEED_100:
>> + speed = HS_MAC_SPEED_100M;
>> + break;
>> + }
>So you only support fixed-mode (phy and fixed links) and not in-band
>links here.
>
Yes, this is right.
next prev parent reply other threads:[~2019-12-10 11:21 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-09 11:13 [PATCH 0/3] net: macb: fix for fixed link, support for c45 mdio and 10G Milind Parab
2019-12-09 11:14 ` [PATCH 1/3] net: macb: fix for fixed-link mode Milind Parab
2019-12-09 11:26 ` Russell King - ARM Linux admin
2019-12-10 9:14 ` Milind Parab
2019-12-10 11:38 ` Russell King - ARM Linux admin
2019-12-11 8:21 ` Milind Parab
2019-12-09 11:15 ` [PATCH 2/3] net: macb: add support for C45 MDIO read/write Milind Parab
2019-12-09 11:16 ` [PATCH 3/3] net: macb: add support for high speed interface Milind Parab
2019-12-09 11:36 ` Russell King - ARM Linux admin
2019-12-10 11:20 ` Milind Parab [this message]
2019-12-10 13:33 ` Andrew Lunn
2019-12-11 9:20 ` Milind Parab
[not found] ` <20191210114053.GU25745@shell.armlinux.org.uk>
[not found] ` <BY5PR07MB65147AEF32345E351E920188D35A0@BY5PR07MB6514.namprd07.prod.outlook.com>
2019-12-11 9:37 ` Russell King - ARM Linux admin
2019-12-11 11:55 ` Milind Parab
-- strict thread matches above, loose matches on Subject: below --
2019-11-26 9:09 [PATCH 0/3] net: macb: cover letter Milind Parab
2019-11-26 9:09 ` [PATCH 3/3] net: macb: add support for high speed interface Milind Parab
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=BY5PR07MB651448607BAF87DC9C60F2AFD35B0@BY5PR07MB6514.namprd07.prod.outlook.com \
--to=mparab@cadence.com \
--cc=a.fatoum@pengutronix.de \
--cc=andrew@lunn.ch \
--cc=antoine.tenart@bootlin.com \
--cc=brad.mouring@ni.com \
--cc=davem@davemloft.net \
--cc=dkangude@cadence.com \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=nicolas.nerre@microchip.com \
--cc=pthombar@cadence.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®