lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c9f1c79f056c4982b6f425a3c3fdcfcd@sphcmbx02.sunplus.com.tw>
Date:   Fri, 29 Apr 2022 03:46:06 +0000
From:   Wells Lu 呂芳騰 <wells.lu@...plus.com>
To:     Francois Romieu <romieu@...zoreil.com>
CC:     Wells Lu <wellslutw@...il.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "p.zabel@...gutronix.de" <p.zabel@...gutronix.de>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "krzk+dt@...nel.org" <krzk+dt@...nel.org>,
        "roopa@...dia.com" <roopa@...dia.com>,
        "andrew@...n.ch" <andrew@...n.ch>,
        "edumazet@...gle.com" <edumazet@...gle.com>
Subject: RE: [PATCH net-next v9 2/2] net: ethernet: Add driver for Sunplus
 SP7021

Hi Francois,


> [...]
> > 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

Thank you for teaching me how to fix the issue.
I'll add them next patch.


Best regards,
Wells

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ