netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jiawen Wu" <jiawenwu@trustnetic.com>
To: "'Jakub Kicinski'" <kuba@kernel.org>
Cc: <davem@davemloft.net>, <edumazet@google.com>, <pabeni@redhat.com>,
	<horms@kernel.org>, <andrew@lunn.ch>, <netdev@vger.kernel.org>,
	<przemyslaw.kitszel@intel.com>, <mengyuanlou@net-swift.com>,
	<duanqiangwen@net-swift.com>
Subject: RE: [PATCH net v2 1/2] net: txgbe: remove separate irq request for MSI and INTx
Date: Fri, 28 Jun 2024 09:47:04 +0800	[thread overview]
Message-ID: <052e01dac8fd$13cb1b90$3b6152b0$@trustnetic.com> (raw)
In-Reply-To: <20240627164138.725aa957@kernel.org>

On Fri, Jun 28, 2024 7:42 AM, Jakub Kicinski wrote:
> On Wed, 26 Jun 2024 14:07:02 +0800 Jiawen Wu wrote:
> > When using MSI or INTx interrupts, request_irq() for pdev->irq will
> > conflict with request_threaded_irq() for txgbe->misc.irq, to cause
> > system crash. So remove txgbe_request_irq() for MSI/INTx case, and
> > rename txgbe_request_msix_irqs() since it only request for queue irqs.
> 
> Do you have any users who need INTx support? Maybe you could drop
> the support and simplify the code?

Yes, some domestic platforms use it.

> 
> > Fixes: aefd013624a1 ("net: txgbe: use irq_domain for interrupt controller")
> > Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
> > ---
> >  drivers/net/ethernet/wangxun/libwx/wx_lib.c   |  3 +-
> >  .../net/ethernet/wangxun/txgbe/txgbe_irq.c    | 78 ++-----------------
> >  .../net/ethernet/wangxun/txgbe/txgbe_irq.h    |  2 +-
> >  .../net/ethernet/wangxun/txgbe/txgbe_main.c   |  2 +-
> >  4 files changed, 10 insertions(+), 75 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/wangxun/libwx/wx_lib.c b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
> > index 68bde91b67a0..99f55a3573c8 100644
> > --- a/drivers/net/ethernet/wangxun/libwx/wx_lib.c
> > +++ b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
> > @@ -1996,7 +1996,8 @@ void wx_free_irq(struct wx *wx)
> >  	int vector;
> >
> >  	if (!(pdev->msix_enabled)) {
> > -		free_irq(pdev->irq, wx);
> > +		if (wx->mac.type == wx_mac_em)
> > +			free_irq(pdev->irq, wx);
> 
> It seems strange to match on type to decide whether to free an IRQ.
> Isn't there or shouldn't there be some IRQ related flag informing
> the library how to manage the IRQs?

My intention is not to change the IRQ structure of ngbe driver. So it
simply match the mac type. I would consider use a flag.



  reply	other threads:[~2024-06-28  1:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-26  6:07 [PATCH net v2 0/2] net: txgbe: fix MSI and INTx interrupts Jiawen Wu
2024-06-26  6:07 ` [PATCH net v2 1/2] net: txgbe: remove separate irq request for MSI and INTx Jiawen Wu
2024-06-27 23:41   ` Jakub Kicinski
2024-06-28  1:47     ` Jiawen Wu [this message]
2024-06-26  6:07 ` [PATCH net v2 2/2] net/txgbe: add extra handle for MSI/INTx into thread irq handle Jiawen Wu
2024-06-27 23:43   ` Jakub Kicinski
2024-06-28  2:16     ` Jiawen Wu

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='052e01dac8fd$13cb1b90$3b6152b0$@trustnetic.com' \
    --to=jiawenwu@trustnetic.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=duanqiangwen@net-swift.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=mengyuanlou@net-swift.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.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;
as well as URLs for NNTP newsgroup(s).