[PATCH 0/7] net: Use IRQF_NO_AUTOEN flag in request_irq()

Jinjie Ruan posted 7 patches 2 months, 3 weeks ago
There is a newer version of this series
drivers/net/ethernet/apple/bmac.c                   | 3 +--
drivers/net/ethernet/freescale/enetc/enetc.c        | 3 +--
drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 5 ++---
drivers/net/ieee802154/mcr20a.c                     | 5 +----
drivers/net/wireless/intersil/p54/p54spi.c          | 4 +---
drivers/net/wireless/marvell/mwifiex/main.c         | 4 ++--
drivers/net/wireless/ti/wl1251/sdio.c               | 4 ++--
7 files changed, 10 insertions(+), 18 deletions(-)
[PATCH 0/7] net: Use IRQF_NO_AUTOEN flag in request_irq()
Posted by Jinjie Ruan 2 months, 3 weeks ago
As commit cbe16f35bee6 ("genirq: Add IRQF_NO_AUTOEN for request_irq/nmi()")
said, reqeust_irq() and then disable_irq() is unsafe.

And the code below is subobtimal:
	 irq_set_status_flags(irq, IRQ_NOAUTOEN);
	 request_irq(dev, irq...);

IRQF_NO_AUTOEN flag can be used by drivers to request_irq(). It prevents
the automatic enabling of the requested interrupt in the same safe way.
With that the usage can be simplified and corrected.

Only compile-tested.

Jinjie Ruan (7):
  net: apple: bmac: Use IRQF_NO_AUTOEN flag in request_irq()
  net: enetc: Use IRQF_NO_AUTOEN flag in request_irq()
  nfp: Use IRQF_NO_AUTOEN flag in request_irq()
  net: ieee802154: mcr20a: Use IRQF_NO_AUTOEN flag in request_irq()
  wifi: p54: Use IRQF_NO_AUTOEN flag in request_irq()
  wifi: mwifiex: Use IRQF_NO_AUTOEN flag in request_irq()
  wifi: wl1251: Use IRQF_NO_AUTOEN flag in request_irq()

 drivers/net/ethernet/apple/bmac.c                   | 3 +--
 drivers/net/ethernet/freescale/enetc/enetc.c        | 3 +--
 drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 5 ++---
 drivers/net/ieee802154/mcr20a.c                     | 5 +----
 drivers/net/wireless/intersil/p54/p54spi.c          | 4 +---
 drivers/net/wireless/marvell/mwifiex/main.c         | 4 ++--
 drivers/net/wireless/ti/wl1251/sdio.c               | 4 ++--
 7 files changed, 10 insertions(+), 18 deletions(-)

-- 
2.34.1
Re: [PATCH 0/7] net: Use IRQF_NO_AUTOEN flag in request_irq()
Posted by Kalle Valo 2 months, 3 weeks ago
Jinjie Ruan <ruanjinjie@huawei.com> writes:

> As commit cbe16f35bee6 ("genirq: Add IRQF_NO_AUTOEN for request_irq/nmi()")
> said, reqeust_irq() and then disable_irq() is unsafe.
>
> And the code below is subobtimal:
> 	 irq_set_status_flags(irq, IRQ_NOAUTOEN);
> 	 request_irq(dev, irq...);
>
> IRQF_NO_AUTOEN flag can be used by drivers to request_irq(). It prevents
> the automatic enabling of the requested interrupt in the same safe way.
> With that the usage can be simplified and corrected.
>
> Only compile-tested.
>
> Jinjie Ruan (7):
>   net: apple: bmac: Use IRQF_NO_AUTOEN flag in request_irq()
>   net: enetc: Use IRQF_NO_AUTOEN flag in request_irq()
>   nfp: Use IRQF_NO_AUTOEN flag in request_irq()
>   net: ieee802154: mcr20a: Use IRQF_NO_AUTOEN flag in request_irq()
>   wifi: p54: Use IRQF_NO_AUTOEN flag in request_irq()
>   wifi: mwifiex: Use IRQF_NO_AUTOEN flag in request_irq()
>   wifi: wl1251: Use IRQF_NO_AUTOEN flag in request_irq()
>
>  drivers/net/ethernet/apple/bmac.c                   | 3 +--
>  drivers/net/ethernet/freescale/enetc/enetc.c        | 3 +--
>  drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 5 ++---
>  drivers/net/ieee802154/mcr20a.c                     | 5 +----
>  drivers/net/wireless/intersil/p54/p54spi.c          | 4 +---
>  drivers/net/wireless/marvell/mwifiex/main.c         | 4 ++--
>  drivers/net/wireless/ti/wl1251/sdio.c               | 4 ++--
>  7 files changed, 10 insertions(+), 18 deletions(-)

Wireless patches go to wireless-next, please submit them in a separate
patchset.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Re: [PATCH 0/7] net: Use IRQF_NO_AUTOEN flag in request_irq()
Posted by Jinjie Ruan 2 months, 2 weeks ago

On 2024/9/9 22:39, Kalle Valo wrote:
> Jinjie Ruan <ruanjinjie@huawei.com> writes:
> 
>> As commit cbe16f35bee6 ("genirq: Add IRQF_NO_AUTOEN for request_irq/nmi()")
>> said, reqeust_irq() and then disable_irq() is unsafe.
>>
>> And the code below is subobtimal:
>> 	 irq_set_status_flags(irq, IRQ_NOAUTOEN);
>> 	 request_irq(dev, irq...);
>>
>> IRQF_NO_AUTOEN flag can be used by drivers to request_irq(). It prevents
>> the automatic enabling of the requested interrupt in the same safe way.
>> With that the usage can be simplified and corrected.
>>
>> Only compile-tested.
>>
>> Jinjie Ruan (7):
>>   net: apple: bmac: Use IRQF_NO_AUTOEN flag in request_irq()
>>   net: enetc: Use IRQF_NO_AUTOEN flag in request_irq()
>>   nfp: Use IRQF_NO_AUTOEN flag in request_irq()
>>   net: ieee802154: mcr20a: Use IRQF_NO_AUTOEN flag in request_irq()
>>   wifi: p54: Use IRQF_NO_AUTOEN flag in request_irq()
>>   wifi: mwifiex: Use IRQF_NO_AUTOEN flag in request_irq()
>>   wifi: wl1251: Use IRQF_NO_AUTOEN flag in request_irq()
>>
>>  drivers/net/ethernet/apple/bmac.c                   | 3 +--
>>  drivers/net/ethernet/freescale/enetc/enetc.c        | 3 +--
>>  drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 5 ++---
>>  drivers/net/ieee802154/mcr20a.c                     | 5 +----
>>  drivers/net/wireless/intersil/p54/p54spi.c          | 4 +---
>>  drivers/net/wireless/marvell/mwifiex/main.c         | 4 ++--
>>  drivers/net/wireless/ti/wl1251/sdio.c               | 4 ++--
>>  7 files changed, 10 insertions(+), 18 deletions(-)
> 
> Wireless patches go to wireless-next, please submit them in a separate
> patchset.

Thank you very much!

>