From: David Miller <davem@davemloft.net>
To: jason77.wang@gmail.com
Cc: netdev@vger.kernel.org, steve.glendinning@smsc.com,
linux-omap@vger.kernel.org
Subject: Re: [PATCH] smsc911x: add disable and re-enable Rx int to de-assert interrupt pin
Date: Thu, 23 Dec 2010 09:59:17 -0800 (PST) [thread overview]
Message-ID: <20101223.095917.59696176.davem@davemloft.net> (raw)
In-Reply-To: <1293100993-3956-1-git-send-email-jason77.wang@gmail.com>
From: Jason Wang <jason77.wang@gmail.com>
Date: Thu, 23 Dec 2010 18:43:13 +0800
> When kernel enters irqhanlder, it will check the Rx interrupt status
> bit, if Rx status is set but can't call napi_schedule(), it will do
> nothing and directly return form irqhandler. This situation is prone
> to be produced when we repeatly call irqhandler through netpoll
> interface(i.e kgdboe connecting).
>
> This is a potential risk for those level triggered platforms(i.e
> ti_omap3evm), because if we don't handle Rx int and just return from
> irqhandler, the irq pin will be keeping asserted, the level triggered
> platforms will have no chance to jump out from the Rx irq. The whole
> system will hung into the irq subsystem.
>
> To solve it, we add a disable/re-enable Rx int operation for this
> situation, this operation can de-assert interrupt pin for this time
> and will leave the received data and status in the FIFO for later
> interrupts to handle.
>
> Signed-off-by: Jason Wang <jason77.wang@gmail.com>
You absolutely cannot do this.
You now can race with the NAPI completion code turning the RX
interrupts back on, and you'll leave the chip with RX interrupts
disabled.
You must solve your level triggered interrupt some other way, every
NAPI based device must manage the interrupt disabling carefully and
only when the napi POLL is successfully scheduled in order to avoid
races.
And especially you must not make a crazy hack like this for obscure
things like kgdboe.
next prev parent reply other threads:[~2010-12-23 17:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-23 10:43 [PATCH] smsc911x: add disable and re-enable Rx int to de-assert interrupt pin Jason Wang
2010-12-23 17:59 ` David Miller [this message]
2010-12-24 2:18 ` Jason Wang
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=20101223.095917.59696176.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=jason77.wang@gmail.com \
--cc=linux-omap@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=steve.glendinning@smsc.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).