mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sean Anderson <sean.anderson@seco.com>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: "David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Madalin Bucur <madalin.bucur@nxp.com>,
	Camelia Alexandra Groza <camelia.groza@nxp.com>,
	netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>,
	Eric Dumazet <edumazet@google.com>,
	"linuxppc-dev @ lists . ozlabs . org"
	<linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH net-next v6 6/9] net: dpaa: Convert to phylink
Date: Tue, 4 Oct 2022 12:20:27 -0400	[thread overview]
Message-ID: <f5fec474-095b-2727-c0dc-878d4cd34d06@seco.com> (raw)
In-Reply-To: <YzxbogPClCjNgN+m@shell.armlinux.org.uk>



On 10/4/22 12:13 PM, Russell King (Oracle) wrote:
> On Fri, Sep 30, 2022 at 04:09:30PM -0400, Sean Anderson wrote:
>> @@ -1064,43 +1061,50 @@ static struct phylink_pcs *memac_pcs_create(struct device_node *mac_node,
>>  	return pcs;
>>  }
>>  
>> +static bool memac_supports(struct mac_device *mac_dev, phy_interface_t iface)
>> +{
>> +	/* If there's no serdes device, assume that it's been configured for
>> +	 * whatever the default interface mode is.
>> +	 */
>> +	if (!mac_dev->fman_mac->serdes)
>> +		return mac_dev->phy_if == iface;
>> +	/* Otherwise, ask the serdes */
>> +	return !phy_validate(mac_dev->fman_mac->serdes, PHY_MODE_ETHERNET,
>> +			     iface, NULL);
>> +}
>> +
>>  int memac_initialization(struct mac_device *mac_dev,
>>  			 struct device_node *mac_node,
>>  			 struct fman_mac_params *params)
>>  {
>>  	int			 err;
>> +	struct device_node      *fixed;
>>  	struct phylink_pcs	*pcs;
>> -	struct fixed_phy_status *fixed_link;
>>  	struct fman_mac		*memac;
>> +	unsigned long		 capabilities;
>> +	unsigned long		*supported;
>>  
>> +	mac_dev->phylink_ops		= &memac_mac_ops;
>>  	mac_dev->set_promisc		= memac_set_promiscuous;
>>  	mac_dev->change_addr		= memac_modify_mac_address;
>>  	mac_dev->add_hash_mac_addr	= memac_add_hash_mac_address;
>>  	mac_dev->remove_hash_mac_addr	= memac_del_hash_mac_address;
>> -	mac_dev->set_tx_pause		= memac_set_tx_pause_frames;
>> -	mac_dev->set_rx_pause		= memac_accept_rx_pause_frames;
>>  	mac_dev->set_exception		= memac_set_exception;
>>  	mac_dev->set_allmulti		= memac_set_allmulti;
>>  	mac_dev->set_tstamp		= memac_set_tstamp;
>>  	mac_dev->set_multi		= fman_set_multi;
>> -	mac_dev->adjust_link            = adjust_link_memac;
>>  	mac_dev->enable			= memac_enable;
>>  	mac_dev->disable		= memac_disable;
>>  
>> -	if (params->max_speed == SPEED_10000)
>> -		mac_dev->phy_if = PHY_INTERFACE_MODE_XGMII;
>> -
>>  	mac_dev->fman_mac = memac_config(mac_dev, params);
>> -	if (!mac_dev->fman_mac) {
>> -		err = -EINVAL;
>> -		goto _return;
>> -	}
>> +	if (!mac_dev->fman_mac)
>> +		return -EINVAL;
>>  
>>  	memac = mac_dev->fman_mac;
>>  	memac->memac_drv_param->max_frame_length = fman_get_max_frm();
>>  	memac->memac_drv_param->reset_on_init = true;
>>  
>> -	err = of_property_match_string(mac_node, "pcs-names", "xfi");
>> +	err = of_property_match_string(mac_node, "pcs-handle-names", "xfi");
> 
> While reading through the patch, I stumbled upon this - in the previous
> patch, you introduce this code with "pcs-names" and then in this patch
> you change the name of the property. I don't think this was mentioned in
> the commit message (searching it for "pcs" didn't reveal anything) so
> I'm wondering whether this name update should've been merged into the
> previous patch instead of this one?

Yes, you're right. It looks like I applied this update to the wrong
patch. Will fix for v7.

--Sean

  reply	other threads:[~2022-10-04 16:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-30 20:09 [PATCH net-next v6 0/9] [RFT] " Sean Anderson
2022-09-30 20:09 ` [PATCH net-next v6 1/9] dt-bindings: net: Expand pcs-handle to an array Sean Anderson
2022-10-03 17:12   ` Rob Herring
2022-09-30 20:09 ` [PATCH net-next v6 2/9] dt-bindings: net: Add Lynx PCS binding Sean Anderson
2022-09-30 20:09 ` [PATCH net-next v6 3/9] dt-bindings: net: fman: Add additional interface properties Sean Anderson
2022-09-30 20:09 ` [PATCH net-next v6 4/9] net: fman: memac: Add serdes support Sean Anderson
2022-09-30 20:09 ` [PATCH net-next v6 5/9] net: fman: memac: Use lynx pcs driver Sean Anderson
2022-10-04 15:25   ` Sean Anderson
2022-09-30 20:09 ` [PATCH net-next v6 6/9] net: dpaa: Convert to phylink Sean Anderson
2022-10-04 16:13   ` Russell King (Oracle)
2022-10-04 16:20     ` Sean Anderson [this message]
2022-10-04 18:48   ` Russell King (Oracle)
2022-09-30 20:09 ` [PATCH net-next v6 7/9] powerpc: dts: t208x: Mark MAC1 and MAC2 as 10G Sean Anderson
2022-09-30 20:09 ` [PATCH net-next v6 8/9] powerpc: dts: qoriq: Add nodes for QSGMII PCSs Sean Anderson
2022-09-30 20:09 ` [PATCH net-next v6 9/9] arm64: dts: layerscape: " Sean Anderson
2022-10-04 15:28 ` [PATCH net-next v6 0/9] [RFT] net: dpaa: Convert to phylink Sean Anderson
2022-10-04 16:52   ` Jakub Kicinski
2022-10-04 17:26     ` Sean Anderson

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=f5fec474-095b-2727-c0dc-878d4cd34d06@seco.com \
    --to=sean.anderson@seco.com \
    --cc=camelia.groza@nxp.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=madalin.bucur@nxp.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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®