mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Parvathi Pudi <parvathi@couthit.com>
To: Simon Horman <horms@kernel.org>
Cc: parvathi <parvathi@couthit.com>,
	andrew+netdev <andrew+netdev@lunn.ch>,
	 davem <davem@davemloft.net>, edumazet <edumazet@google.com>,
	 kuba <kuba@kernel.org>, pabeni <pabeni@redhat.com>,
	 danishanwar <danishanwar@ti.com>, rogerq <rogerq@kernel.org>,
	 pmohan <pmohan@couthit.com>, afd <afd@ti.com>,
	 Vadim Fedorenko <vadim.fedorenko@linux.dev>,
	haokexin@gmail.com,  basharath <basharath@couthit.com>,
	arnd <arnd@arndb.de>,
	 linux-kernel <linux-kernel@vger.kernel.org>,
	 netdev <netdev@vger.kernel.org>,
	 linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	 pratheesh <pratheesh@ti.com>, j-rameshbabu <j-rameshbabu@ti.com>,
	 Vignesh Raghavendra <vigneshr@ti.com>,
	praneeth <praneeth@ti.com>,  srk <srk@ti.com>,
	rogerq <rogerq@ti.com>,  m-malladi <m-malladi@ti.com>,
	krishna <krishna@couthit.com>,  mohan <mohan@couthit.com>
Subject: Re: [PATCH net-next v4 1/3] net: ti: icssm-prueth: Add HSR and PRP HW offload mode support for AM57xx, AM437x and AM335x
Date: Thu, 1 Oct 2026 18:34:37 +0530 (IST)	[thread overview]
Message-ID: <1915284322.492671.1790859877701.JavaMail.zimbra@couthit.local> (raw)
In-Reply-To: <20260925163914.721071-1-horms@kernel.org>

Hi,

> This is an AI-generated review of your patch. The human sending this
> email has considered the AI review valid, or at least plausible.
> Full review at:
> https://sashiko.dev/#/patchset/20260921134343.200426-4-parvathi@couthit.com?part=1
> ---
> net: ti: icssm-prueth: Add HSR and PRP HW offload mode support for AM57xx,
> AM437x and AM335x
> 
> This commit extends the ICSSM PRUETH driver to support HSR and PRP redundancy
> protocols on compatible TI SoCs. It enables dynamically switching PRU ethernet
> ports from dual-EMAC mode into HSR/PRP slave modes via firmware reconfiguration.
> 
>> diff --git a/drivers/net/ethernet/ti/icssm/icssm_prueth.c
>> b/drivers/net/ethernet/ti/icssm/icssm_prueth.c
>> --- a/drivers/net/ethernet/ti/icssm/icssm_prueth.c
>> +++ b/drivers/net/ethernet/ti/icssm/icssm_prueth.c
> [ ... ]
>> +static int icssm_prueth_hsr_port_link(struct net_device *ndev,
>> +				      struct net_device *hsr_ndev)
>> +{
> [ ... ]
>> +free_hsr:
>> +	prueth->eth_type = prev_mode;
>> +
>> +	spin_lock_irqsave(&prueth->addr_lock, flags);
>> +
>> +	prueth->hsr_dev = NULL;
>> +	prueth->hsr_members &= ~all_slaves;
> 
> [Severity: High]
> Can this rollback improperly destroy the state for the already-linked first
> port alongside the failing second port?
> 
> If the second port fails to transition to HSR/PRP mode, the free_hsr error
> path clears the hsr_members mask for all ports by applying ~all_slaves.
> 
> Because the first port was successfully enrolled into the HSR bridge in a
> previous invocation, it remains an active slave in the networking stack's
> view. By wiping its membership state here, the driver drastically
> desynchronizes its internal state from the kernel.
> 
> Would it be safer to only clear the bit for the specific port that is
> failing to link?
> 

We will address this in the next version.

Thanks and Regards,
Parvathi.

  reply	other threads:[~2026-10-01 13:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-21 13:41 [PATCH net-next v4 0/3] Introduce HSR/PRP HW offload support for PRU-ICSSM Ethernet driver Parvathi Pudi
2026-09-21 13:41 ` [PATCH net-next v4 1/3] net: ti: icssm-prueth: Add HSR and PRP HW offload mode support for AM57xx, AM437x and AM335x Parvathi Pudi
2026-09-25 16:39   ` Simon Horman
2026-10-01 13:04     ` Parvathi Pudi [this message]
2026-09-21 13:41 ` [PATCH net-next v4 2/3] net: ti: icssm-prueth: Add priority based RX IRQ handlers Parvathi Pudi
2026-09-25 16:39   ` Simon Horman
2026-10-01 13:08     ` Parvathi Pudi
2026-09-21 13:41 ` [PATCH net-next v4 3/3] net: ti: icssm-prueth: Support duplicate HW offload feature for HSR and PRP Parvathi Pudi
2026-09-25 16:39   ` Simon Horman
2026-10-01 13:10     ` Parvathi Pudi

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=1915284322.492671.1790859877701.JavaMail.zimbra@couthit.local \
    --to=parvathi@couthit.com \
    --cc=afd@ti.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=arnd@arndb.de \
    --cc=basharath@couthit.com \
    --cc=danishanwar@ti.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=haokexin@gmail.com \
    --cc=horms@kernel.org \
    --cc=j-rameshbabu@ti.com \
    --cc=krishna@couthit.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m-malladi@ti.com \
    --cc=mohan@couthit.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pmohan@couthit.com \
    --cc=praneeth@ti.com \
    --cc=pratheesh@ti.com \
    --cc=rogerq@kernel.org \
    --cc=rogerq@ti.com \
    --cc=srk@ti.com \
    --cc=vadim.fedorenko@linux.dev \
    --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®