public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel•org>
To: Ioana Ciornei <ioana.ciornei@nxp•com>
Cc: davem@davemloft•net, edumazet@google•com, kuba@kernel•org,
	pabeni@redhat•com, netdev@vger•kernel.org
Subject: Re: [PATCH net-next v2 5/8] dpaa2-switch: do not clear any interrupts automatically
Date: Fri, 15 Dec 2023 11:31:24 +0000	[thread overview]
Message-ID: <20231215113124.GA6288@kernel.org> (raw)
In-Reply-To: <20231213121411.3091597-6-ioana.ciornei@nxp.com>

On Wed, Dec 13, 2023 at 02:14:08PM +0200, Ioana Ciornei wrote:
> The DPSW object has multiple event sources multiplexed over the same
> IRQ. The driver has the capability to configure only some of these
> events to trigger the IRQ.
> 
> The dpsw_get_irq_status() can clear events automatically based on the
> value stored in the 'status' variable passed to it. We don't want that
> to happen because we could get into a situation when we are clearing
> more events than we actually handled.
> Just resort to manually clearing the events that we handled.

Hi Ioana,

Continuing the theme of Jakub's review of v1,
I think it would be useful to state that
there is no user-visible effect of this change.
And, ideally, explain why that is so.

> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp•com>
> ---
> Changes in v2:
> - add a bit more info in the commit message
> 
>  drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
> index e91ade7c7c93..d9906573f71f 100644
> --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
> +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
> @@ -1509,7 +1509,7 @@ static irqreturn_t dpaa2_switch_irq0_handler_thread(int irq_num, void *arg)
>  	struct device *dev = (struct device *)arg;
>  	struct ethsw_core *ethsw = dev_get_drvdata(dev);
>  	struct ethsw_port_priv *port_priv;
> -	u32 status = ~0;
> +	u32 status = 0;
>  	int err, if_id;
>  	bool had_mac;

As status is no longer used in the 'out' unwind path,
I don't think the initialisation above is needed any more.

	...
	int err, if_id;
	bool had_mac;
	u32 status;

>  
> @@ -1539,12 +1539,12 @@ static irqreturn_t dpaa2_switch_irq0_handler_thread(int irq_num, void *arg)
>  			dpaa2_switch_port_connect_mac(port_priv);
>  	}
>  
> -out:
>  	err = dpsw_clear_irq_status(ethsw->mc_io, 0, ethsw->dpsw_handle,
>  				    DPSW_IRQ_INDEX_IF, status);
>  	if (err)
>  		dev_err(dev, "Can't clear irq status (err %d)\n", err);
>  
> +out:
>  	return IRQ_HANDLED;
>  }
>  
> -- 
> 2.34.1
> 

  reply	other threads:[~2023-12-15 11:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-13 12:14 [PATCH net-next v2 0/8] dpaa2-switch: small improvements Ioana Ciornei
2023-12-13 12:14 ` [PATCH net-next v2 1/8] dpaa2-switch: set interface MAC address only on endpoint change Ioana Ciornei
2023-12-15 11:57   ` Simon Horman
2023-12-13 12:14 ` [PATCH net-next v2 2/8] dpaa2-switch: declare the netdev as IFF_LIVE_ADDR_CHANGE capable Ioana Ciornei
2023-12-15 11:57   ` Simon Horman
2023-12-13 12:14 ` [PATCH net-next v2 3/8] dpaa2-switch: print an error when the vlan is already configured Ioana Ciornei
2023-12-15 11:58   ` Simon Horman
2023-12-13 12:14 ` [PATCH net-next v2 4/8] dpaa2-switch: add ENDPOINT_CHANGED to the irq_mask Ioana Ciornei
2023-12-15 11:51   ` Simon Horman
2023-12-13 12:14 ` [PATCH net-next v2 5/8] dpaa2-switch: do not clear any interrupts automatically Ioana Ciornei
2023-12-15 11:31   ` Simon Horman [this message]
2023-12-13 12:14 ` [PATCH net-next v2 6/8] dpaa2-switch: reorganize the [pre]changeupper events Ioana Ciornei
2023-12-15 11:49   ` Simon Horman
2023-12-15 12:08     ` Ioana Ciornei
2023-12-18  8:33       ` Simon Horman
2023-12-13 12:14 ` [PATCH net-next v2 7/8] dpaa2-switch: move a check to the prechangeupper stage Ioana Ciornei
2023-12-15 11:58   ` Simon Horman
2023-12-13 12:14 ` [PATCH net-next v2 8/8] dpaa2-switch: cleanup the egress flood of an unused FDB Ioana Ciornei
2023-12-15 11:58   ` Simon Horman

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=20231215113124.GA6288@kernel.org \
    --to=horms@kernel$(echo .)org \
    --cc=davem@davemloft$(echo .)net \
    --cc=edumazet@google$(echo .)com \
    --cc=ioana.ciornei@nxp$(echo .)com \
    --cc=kuba@kernel$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pabeni@redhat$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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