From: Jeff Garzik <jeff@garzik.org>
To: akpm@linux-foundation.org
Cc: netdev@vger.kernel.org, sonic.zhang@analog.com, cooloney@kernel.org
Subject: Re: [patch for 2.6.25? 2/3] smc91x driver: fix bug: print warning only in interrupt mode
Date: Sat, 12 Apr 2008 04:42:44 -0400 [thread overview]
Message-ID: <48007604.9030602@garzik.org> (raw)
In-Reply-To: <200804110430.m3B4UbHn000436@imap1.linux-foundation.org>
akpm@linux-foundation.org wrote:
> From: Sonic Zhang <sonic.zhang@analog.com>
>
> http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=3956
>
> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
> Signed-off-by: Bryan Wu <cooloney@kernel.org>
> Cc: Jeff Garzik <jeff@garzik.org>
>
> On Fri, 28 Mar 2008 21:45:02 -0400 Jeff Garzik <jeff@garzik.org> wrote:
>
>> akpm@linux-foundation.org wrote:
>>> From: Sonic Zhang <sonic.zhang@analog.com>
>>>
>>> http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=3956
>>>
>>> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
>>> Signed-off-by: Bryan Wu <cooloney@kernel.org>
>>> Cc: Jeff Garzik <jeff@garzik.org>
>>> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
>>> ---
>>>
>>> drivers/net/smc91x.c | 2 ++
>>> 1 file changed, 2 insertions(+)
>>>
>>> diff -puN drivers/net/smc91x.c~smc91x-driver-fix-bug-print-warning-only-in-interrupt-mode drivers/net/smc91x.c
>>> --- a/drivers/net/smc91x.c~smc91x-driver-fix-bug-print-warning-only-in-interrupt-mode
>>> +++ a/drivers/net/smc91x.c
>>> @@ -1326,9 +1326,11 @@ static irqreturn_t smc_interrupt(int irq
>>> SMC_SET_INT_MASK(lp, mask);
>>> spin_unlock(&lp->lock);
>>>
>>> +#ifndef CONFIG_NET_POLL_CONTROLLER
>>> if (timeout == MAX_IRQ_LOOPS)
>>> PRINTK("%s: spurious interrupt (mask = 0x%02x)\n",
>>> dev->name, mask);
>>> +#endif
>>> DBG(3, "%s: Interrupt done (%d loops)\n",
>>> dev->name, MAX_IRQ_LOOPS - timeout);
>> NAK
>>
>> Either this code is OK or it isn't. This patch simply hides a problem
>> inside a configuration the developer probably doesn't use.
>>
>> What's the _real_ problem? Looking at the tracker, I'd guess that some
>> events need to be masked, but are not?
>>
>> If the hardware is asserting events continually, the current code does
>> the right thing -- keep processing interrupt events flagged, until (a)
>> no more events asserted or (b) max loop count reached.
>>
>> So the question is to find out why you are hitting the timeout, and what
>> to do about it.
>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> drivers/net/smc91x.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff -puN drivers/net/smc91x.c~smc91x-driver-fix-bug-print-warning-only-in-interrupt-mode drivers/net/smc91x.c
> --- a/drivers/net/smc91x.c~smc91x-driver-fix-bug-print-warning-only-in-interrupt-mode
> +++ a/drivers/net/smc91x.c
> @@ -1326,9 +1326,11 @@ static irqreturn_t smc_interrupt(int irq
> SMC_SET_INT_MASK(lp, mask);
> spin_unlock(&lp->lock);
>
> +#ifndef CONFIG_NET_POLL_CONTROLLER
> if (timeout == MAX_IRQ_LOOPS)
> PRINTK("%s: spurious interrupt (mask = 0x%02x)\n",
> dev->name, mask);
> +#endif
> DBG(3, "%s: Interrupt done (%d loops)\n",
> dev->name, MAX_IRQ_LOOPS - timeout);
>
applied
next prev parent reply other threads:[~2008-04-12 8:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-11 4:30 [patch for 2.6.25? 2/3] smc91x driver: fix bug: print warning only in interrupt mode akpm
2008-04-12 8:42 ` Jeff Garzik [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-04-09 0:31 akpm
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=48007604.9030602@garzik.org \
--to=jeff@garzik.org \
--cc=akpm@linux-foundation.org \
--cc=cooloney@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sonic.zhang@analog.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.