mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Siddharth Vadapalli <s-vadapalli@ti.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: <davem@davemloft.net>, <linux@armlinux.org.uk>,
	<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<kishon@ti.com>, <vigneshr@ti.com>, <grygorii.strashko@ti.com>,
	<s-vadapalli@ti.com>
Subject: Re: [PATCH] net: ethernet: ti: am65-cpsw: Fix devlink port register sequence
Date: Mon, 4 Jul 2022 10:13:33 +0530	[thread overview]
Message-ID: <86898268-df1b-3b7c-d5be-97632bd58ca2@ti.com> (raw)
In-Reply-To: <20220624164234.6268f2b7@kernel.org>

Hello Jakub,

On 25/06/22 05:12, Jakub Kicinski wrote:
> On Thu, 23 Jun 2022 10:13:37 +0530 Siddharth Vadapalli wrote:
>> Renaming interfaces using udevd depends on the interface being registered
>> before its netdev is registered. Otherwise, udevd reads an empty
>> phys_port_name value, resulting in the interface not being renamed.
>>
>> Fix this by registering the interface before registering its netdev
>> by invoking am65_cpsw_nuss_register_devlink() before invoking
>> register_netdev() for the interface.
>>
>> Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
> 
> Please add a Fixes tag and [PATCH net] in the subject.
Thank you for reviewing the patch. I will add the Fixes tag and include net in
the subject of the v2 patch.

> 
>> diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
>> index fb92d4c1547d..47a6c4e5360b 100644
>> --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
>> +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
>> @@ -2527,6 +2527,10 @@ static int am65_cpsw_nuss_register_ndevs(struct am65_cpsw_common *common)
>>  		return ret;
>>  	}
>>  
>> +	ret = am65_cpsw_nuss_register_devlink(common);
>> +	if (ret)
>> +		goto err_cleanup_ndev;
> 
> You need to take the devlink_port_type_eth_set() out of this function
> if it's now called before netdev registration and call it after netdev
> registration. Otherwise devlink will generate a netlink notification
> about the port state change with a half-initialized netdev.

I will fix this and post the v2 patch.

Regards,
Siddharth.

      reply	other threads:[~2022-07-04  4:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-23  4:43 Siddharth Vadapalli
2022-06-24 23:42 ` Jakub Kicinski
2022-07-04  4:43   ` Siddharth Vadapalli [this message]

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=86898268-df1b-3b7c-d5be-97632bd58ca2@ti.com \
    --to=s-vadapalli@ti.com \
    --cc=davem@davemloft.net \
    --cc=grygorii.strashko@ti.com \
    --cc=kishon@ti.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=vigneshr@ti.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®