linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Wolfram Sang <wsa@the-dreams.de>,
	Fabrizio Castro <fabrizio.castro@bp.renesas.com>,
	Biju Das <biju.das@bp.renesas.com>
Subject: [PATCH 4.4 22/37] i2c: rcar: check master irqs before slave irqs
Date: Tue,  5 Jun 2018 19:01:27 +0200	[thread overview]
Message-ID: <20180605170110.185722636@linuxfoundation.org> (raw)
In-Reply-To: <20180605170108.884872354@linuxfoundation.org>

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Wolfram Sang <wsa+renesas@sang-engineering.com>

commit c3be0af15959e11fa535d5332ab3d7cf34abd09b upstream.

Due to the HW design, master IRQs are timing critical, so give them
precedence over slave IRQ.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Biju Das <biju.das@bp.renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/i2c/busses/i2c-rcar.c |   13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

--- a/drivers/i2c/busses/i2c-rcar.c
+++ b/drivers/i2c/busses/i2c-rcar.c
@@ -432,19 +432,17 @@ static bool rcar_i2c_slave_irq(struct rc
 static irqreturn_t rcar_i2c_irq(int irq, void *ptr)
 {
 	struct rcar_i2c_priv *priv = ptr;
-	irqreturn_t result = IRQ_HANDLED;
 	u32 msr;
 
-	if (rcar_i2c_slave_irq(priv))
-		goto exit;
-
 	msr = rcar_i2c_read(priv, ICMSR);
 
 	/* Only handle interrupts that are currently enabled */
 	msr &= rcar_i2c_read(priv, ICMIER);
 	if (!msr) {
-		result = IRQ_NONE;
-		goto exit;
+		if (rcar_i2c_slave_irq(priv))
+			return IRQ_HANDLED;
+
+		return IRQ_NONE;
 	}
 
 	/* Arbitration lost */
@@ -481,8 +479,7 @@ out:
 		wake_up(&priv->wait);
 	}
 
-exit:
-	return result;
+	return IRQ_HANDLED;
 }
 
 static int rcar_i2c_master_xfer(struct i2c_adapter *adap,

  parent reply	other threads:[~2018-06-05 17:03 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-05 17:01 [PATCH 4.4 00/37] 4.4.136-stable review Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 01/37] arm64: lse: Add early clobbers to some input/output asm operands Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 02/37] powerpc/64s: Clear PCR on boot Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 03/37] USB: serial: cp210x: use tcflag_t to fix incompatible pointer type Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 04/37] sh: New gcc support Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 05/37] xfs: detect agfl count corruption and reset agfl Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 06/37] Revert "ima: limit file hash setting by user to fix and log modes" Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 07/37] Input: elan_i2c_smbus - fix corrupted stack Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 08/37] tracing: Fix crash when freeing instances with event triggers Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 09/37] selinux: KASAN: slab-out-of-bounds in xattr_getsecurity Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 10/37] cfg80211: further limit wiphy names to 64 bytes Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 11/37] rtlwifi: rtl8192cu: Remove variable self-assignment in rf.c Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 12/37] ASoC: Intel: sst: remove redundant variable dma_dev_name Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 13/37] irda: fix overly long udelay() Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 14/37] tcp: avoid integer overflows in tcp_rcv_space_adjust() Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 15/37] i2c: rcar: make sure clocks are on when doing clock calculation Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 16/37] i2c: rcar: rework hw init Greg Kroah-Hartman
2018-06-18 18:46   ` Ben Hutchings
2018-06-25 10:05     ` Fabrizio Castro
2018-06-05 17:01 ` [PATCH 4.4 17/37] i2c: rcar: remove unused IOERROR state Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 18/37] i2c: rcar: remove spinlock Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 19/37] i2c: rcar: refactor setup of a msg Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 20/37] i2c: rcar: init new messages in irq Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 21/37] i2c: rcar: dont issue stop when HW does it automatically Greg Kroah-Hartman
2018-06-05 17:01 ` Greg Kroah-Hartman [this message]
2018-06-05 17:01 ` [PATCH 4.4 23/37] i2c: rcar: revoke START request early Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 24/37] dmaengine: usb-dmac: fix endless loop in usb_dmac_chan_terminate_all() Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 25/37] iio:kfifo_buf: check for uint overflow Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 26/37] MIPS: ptrace: Fix PTRACE_PEEKUSR requests for 64-bit FGRs Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 27/37] MIPS: prctl: Disallow FRE without FR with PR_SET_FP_MODE requests Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 28/37] scsi: scsi_transport_srp: Fix shost to rport translation Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 29/37] stm class: Use vmalloc for the master map Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 30/37] hwtracing: stm: fix build error on some arches Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 32/37] Kbuild: change CC_OPTIMIZE_FOR_SIZE definition Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 33/37] fix io_destroy()/aio_complete() race Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 34/37] mm: fix the NULL mapping case in __isolate_lru_page() Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 35/37] sparc64: Add __multi3 for gcc 7.x and later Greg Kroah-Hartman
2018-06-05 17:01 ` [PATCH 4.4 36/37] sparc64: Dont clibber fixed registers in __multi4 Greg Kroah-Hartman
2018-06-05 21:59 ` [PATCH 4.4 00/37] 4.4.136-stable review Shuah Khan
2018-06-06  0:30 ` Nathan Chancellor
2018-06-06  8:19   ` Greg Kroah-Hartman
2018-06-06 11:18 ` Naresh Kamboju
2018-06-06 12:15   ` Greg Kroah-Hartman
2018-06-06 13:28 ` Guenter Roeck
2018-06-06 13:31   ` Greg Kroah-Hartman
2018-06-06 15:01     ` Guenter Roeck
2018-06-06 15:35       ` Greg Kroah-Hartman

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=20180605170110.185722636@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=biju.das@bp.renesas.com \
    --cc=fabrizio.castro@bp.renesas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=wsa@the-dreams.de \
    /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).