mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Parshuram Raju Thombare <pthombar@cadence.com>
To: Russell King - ARM Linux admin <linux@armlinux.org.uk>
Cc: "andrew@lunn.ch" <andrew@lunn.ch>,
	"nicolas.ferre@microchip.com" <nicolas.ferre@microchip.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"hkallweit1@gmail.com" <hkallweit1@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Rafal Ciepiela <rafalc@cadence.com>,
	Anil Joy Varughese <aniljoy@cadence.com>,
	Piotr Sroka <piotrs@cadence.com>
Subject: RE: [PATCH v5 2/5] net: macb: add support for sgmii MAC-PHY interface
Date: Tue, 25 Jun 2019 09:26:29 +0000	[thread overview]
Message-ID: <SN2PR07MB2480B53AFE512F46986A1CAFC1E30@SN2PR07MB2480.namprd07.prod.outlook.com> (raw)
In-Reply-To: <20190624134233.suowuortj5dcbxdg@shell.armlinux.org.uk>

>> +	if (change_interface) {
>> +		bp->phy_interface = state->interface;
>> +		gem_writel(bp, NCR, ~GEM_BIT(TWO_PT_FIVE_GIG) &
>> +			   gem_readl(bp, NCR));
>This could do with a comment, such as the one I gave in my example.
Sure. I will add a comment here.

>> @@ -493,6 +516,7 @@ static void gem_mac_config(struct phylink_config
>*pl_config, unsigned int mode,
>>  		reg &= ~(MACB_BIT(SPD) | MACB_BIT(FD));
>>  		if (macb_is_gem(bp))
>>  			reg &= ~GEM_BIT(GBE);
>> +
>Useless change.
Ok, I will remove this empty line.


>> +		if (phy_mode == PHY_INTERFACE_MODE_SGMII) {
>> +			if (!(bp->caps & MACB_CAPS_PCS))
>> +				interface_supported = 0;
>
>So if bp->caps does not have MACB_CAPS_PCS set, then SGMII mode is not
>supported?
Yes

>In which case, gem_phylink_validate() must clear the support mask when
>SGMII mode is requested to indicate that the interface mode is not
>supported.
>The same goes for _all_ other PHY link modes that the hardware does not
>actually support, such as PHY_INTERFACE_MODE_10GKR...
If interface is not supported by hardware probe returns with error, so we don't 
net interface is not registered at all.
I think what is missing is setting appropriate err value (-ENOTSUPP ?), right now it is returning
default err.



Regards,
Parshuram Thombare

  reply	other threads:[~2019-06-25  9:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-24 12:10 [PATCH v5 0/5] net: macb: cover letter Parshuram Thombare
2019-06-24 12:10 ` [PATCH v5 1/5] net: macb: add phylink support Parshuram Thombare
2019-06-24 12:11 ` [PATCH v5 2/5] net: macb: add support for sgmii MAC-PHY interface Parshuram Thombare
2019-06-24 13:42   ` Russell King - ARM Linux admin
2019-06-25  9:26     ` Parshuram Raju Thombare [this message]
2019-06-25  9:29       ` Russell King - ARM Linux admin
2019-06-25  9:38         ` Parshuram Raju Thombare
2019-06-25 10:34           ` Russell King - ARM Linux admin
2019-06-25 11:22             ` Parshuram Raju Thombare
2019-06-24 12:11 ` [PATCH v5 3/5] net: macb: add support for c45 PHY Parshuram Thombare
2019-06-24 12:12 ` [PATCH v5 4/5] net: macb: add support for high speed interface Parshuram Thombare
2019-06-24 13:47   ` Russell King - ARM Linux admin
2019-06-25  8:49     ` Parshuram Raju Thombare
2019-06-25  9:03       ` Russell King - ARM Linux admin
2019-06-25  9:29         ` Parshuram Raju Thombare
2019-06-25  8:55     ` Parshuram Raju Thombare
2019-06-24 12:12 ` [PATCH v5 5/5] net: macb: parameter added to cadence ethernet controller DT binding Parshuram Thombare

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=SN2PR07MB2480B53AFE512F46986A1CAFC1E30@SN2PR07MB2480.namprd07.prod.outlook.com \
    --to=pthombar@cadence.com \
    --cc=andrew@lunn.ch \
    --cc=aniljoy@cadence.com \
    --cc=davem@davemloft.net \
    --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.ferre@microchip.com \
    --cc=piotrs@cadence.com \
    --cc=rafalc@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®