From: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
To: Alexander Kochetkov <al.kochet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>,
Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
Subject: Re: [PATCH 2/2] i2c: omap: fix "Too much work in one IRQ" irq handling
Date: Fri, 14 Nov 2014 19:48:59 -0600 [thread overview]
Message-ID: <20141115014859.GC808@saruman> (raw)
In-Reply-To: <1416014452-6712-2-git-send-email-al.kochet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1911 bytes --]
Hi,
On Sat, Nov 15, 2014 at 05:20:52AM +0400, Alexander Kochetkov wrote:
> commit 66b9298878742f08cb6e79b7c7d5632d782fd1e1 (i2c: omap: switch over
> to do {} while loop) changed the interrupt handler to abort transfers
> in case interrupt serviced 100 times but commit's comment states that
> "No functional changes otherwise.".
look at the patch again, the commit you describe is *not* the one giving
up on servicing interrupts after 100 times. That commit, really, *only*
switched over from while() {} to do {} while(), the only functional
change there is that the while loop will always execute at least once.
> Also, original commit could report status 0 (no error) on aborted transfers.
how ? This is an interesting bug which deserves further explanation.
> The patch restore original logic. In case interrupt serviced 100 times just
> quit interrupt handler and don't abort active transfer.
>
> Signed-off-by: Alexander Kochetkov <al.kochet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> drivers/i2c/busses/i2c-omap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index 9af7095..34b9011 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -920,7 +920,7 @@ omap_i2c_isr_thread(int this_irq, void *dev_id)
> dev_dbg(dev->dev, "IRQ (ISR = 0x%04x)\n", stat);
> if (count++ == 100) {
> dev_warn(dev->dev, "Too much work in one IRQ\n");
> - break;
> + goto out;
quite frankly, this looks *very* wrong. It creates the possibility for
us never completing a command which would cause several timeouts.
How have you tested this and how have you figured this was the actual
bug ? Based on commit log not matching the patch body (which 'original
logic' are you talking about ?), I have to NAK this patch.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-11-15 1:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-15 1:20 [PATCH 1/2] i2c: omap: fix NACK and Arbitration Lost irq handling Alexander Kochetkov
[not found] ` <1416014452-6712-1-git-send-email-al.kochet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-11-15 1:20 ` [PATCH 2/2] i2c: omap: fix "Too much work in one IRQ" " Alexander Kochetkov
[not found] ` <1416014452-6712-2-git-send-email-al.kochet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-11-15 1:48 ` Felipe Balbi [this message]
2014-11-15 2:37 ` Alexander Kochetkov
2014-11-15 3:47 ` Felipe Balbi
2014-11-15 3:53 ` Felipe Balbi
2014-11-15 5:42 ` Alexander Kochetkov
2014-11-16 15:45 ` Felipe Balbi
2014-11-17 14:41 ` Wolfram Sang
2014-11-18 16:00 ` Felipe Balbi
2014-11-18 16:12 ` Wolfram Sang
2014-11-20 16:38 ` Alexander Kochetkov
[not found] ` <2DED62C3-7C54-49E0-A39B-F68D5DAC66B1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-11-20 16:43 ` Wolfram Sang
2014-11-18 16:31 ` Alexander Kochetkov
[not found] ` <5D39428D-F359-4F04-8ACC-D607011B88B9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-11-18 16:38 ` Felipe Balbi
2014-11-15 1:43 ` [PATCH 1/2] i2c: omap: fix NACK and Arbitration Lost " Felipe Balbi
[not found] ` <2159E044-9130-410D-905B-B941408DCDCD@gmail.com>
[not found] ` <2159E044-9130-410D-905B-B941408DCDCD-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-11-15 2:48 ` Alexander Kochetkov
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=20141115014859.GC808@saruman \
--to=balbi-l0cymroini0@public.gmane.org \
--cc=al.kochet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org \
--cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org \
/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.