From: Francois Romieu <romieu@fr.zoreil.com>
To: "Wells Lu 呂芳騰" <wells.lu@sunplus.com>
Cc: Wells Lu <wellslutw@gmail.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"kuba@kernel.org" <kuba@kernel.org>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
"roopa@nvidia.com" <roopa@nvidia.com>,
"andrew@lunn.ch" <andrew@lunn.ch>,
"edumazet@google.com" <edumazet@google.com>
Subject: Re: [PATCH net-next v9 2/2] net: ethernet: Add driver for Sunplus SP7021
Date: Thu, 28 Apr 2022 23:35:36 +0200 [thread overview]
Message-ID: <YmsIqDPjvZKbbKov@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <ff2077684c4c45fca929a8f61447242b@sphcmbx02.sunplus.com.tw>
Wells Lu e\x11\x02h
3i(0 <wells.lu@sunplus.com> :
[...]
> I will add disable_irq() and enable_irq() for spl2sw_rx_poll() and spl2sw_tx_poll() as shown below:
>
> spl2sw_rx_poll():
>
> wmb(); /* make sure settings are effective. */
> disable_irq(comm->irq);
> mask = readl(comm->l2sw_reg_base + L2SW_SW_INT_MASK_0);
> mask &= ~MAC_INT_RX;
> writel(mask, comm->l2sw_reg_base + L2SW_SW_INT_MASK_0);
> enable_irq(comm->irq);
>
> spl2sw_tx_poll():
>
> wmb(); /* make sure settings are effective. */
> disable_irq(comm->irq);
> mask = readl(comm->l2sw_reg_base + L2SW_SW_INT_MASK_0);
> mask &= ~MAC_INT_TX;
> writel(mask, comm->l2sw_reg_base + L2SW_SW_INT_MASK_0);
> enable_irq(comm->irq);
>
>
> Is the modification ok?
disable_irq prevents future irq processing but it does not help against irq
code currently running on a different cpu.
You may use plain spin_{lock / unlock} in IRQ context and
spin_{loq_irqsave / irq_restore} in NAPI context.
--
Ueimor
next prev parent reply other threads:[~2022-04-28 21:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-25 10:30 [PATCH net-next v9 0/2] This is a patch series for Ethernet driver of Sunplus SP7021 SoC Wells Lu
2022-04-25 10:30 ` [PATCH net-next v9 1/2] devicetree: bindings: net: Add bindings doc for Sunplus SP7021 Wells Lu
2022-04-25 10:30 ` [PATCH net-next v9 2/2] net: ethernet: Add driver " Wells Lu
2022-04-25 16:24 ` Stephen Hemminger
2022-04-26 1:37 ` Wells Lu 呂芳騰
2022-04-25 16:32 ` Stephen Hemminger
2022-04-26 3:03 ` Wells Lu 呂芳騰
2022-04-26 22:52 ` Francois Romieu
2022-04-28 11:32 ` Wells Lu 呂芳騰
2022-04-28 21:35 ` Francois Romieu [this message]
2022-04-29 3:46 ` Wells Lu 呂芳騰
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=YmsIqDPjvZKbbKov@electric-eye.fr.zoreil.com \
--to=romieu@fr.zoreil.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=pabeni@redhat.com \
--cc=robh+dt@kernel.org \
--cc=roopa@nvidia.com \
--cc=wells.lu@sunplus.com \
--cc=wellslutw@gmail.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®