From patchwork Sun Jun 17 11:23:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 10468795 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 520A66029B for ; Sun, 17 Jun 2018 11:35:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F8E528874 for ; Sun, 17 Jun 2018 11:35:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 30C5128A1B; Sun, 17 Jun 2018 11:35:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6348E28874 for ; Sun, 17 Jun 2018 11:35:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:From:To: Subject:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=VHaMnrbFh8QCiXB4Mfto32VxLid8yTprcU8Mjkvn9zg=; b=rA7hX1jKRY5EzN 7PcXi/8PNBM/2jVYGmP4lUQ/rXKtV0A6GFignnKpKVV2qBvj9SjrjeDa7qaOtiFvXAxaPMVI3e+k8 7GQROLy0B7LM/JvOC0YgDqRhJxU79Zx64tOr1N2CgoPcvuFQ2uHEQowwwrBJh4y5NRRVwkQZpNZw5 A0aTg8Esy6aVubuDVn/dSDK25oY0Rk9UXKtHGFcZcQyKDwvCdQ80Uh+tCFYPKviCG0tR8NFCQ6jy1 qCGHygEFcIbFF9tWgpNpEB8wo7jhpFwHwN9B/wThWDfapd1gzU+XGtZ/sO3jCuR66E5sDXXn4r7mx D9PJ+Z6jgrYEmx4SLWpg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fUVyA-0001UZ-T4; Sun, 17 Jun 2018 11:35:42 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fUVy6-0001U1-VT; Sun, 17 Jun 2018 11:35:41 +0000 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D5AC0208E0; Sun, 17 Jun 2018 11:35:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1529235327; bh=QvUmjT77RuaxokBA108+gMGGd/QbYoLDZSfYYmchp5E=; h=Subject:To:Cc:From:Date:From; b=n9NKKWFVbk30hbOssed8jkjmgpZazlV5YKeEi5E5MyWZSbqinX+FhhLFjxhszzKu5 /TUk/uoNHN9wbctq5ATrQFxjxODEXTwyjw3geVZk9Icw16hi9HuhWEGicbRlX9QSGN BlVUn7qlMx0MQI3GrdvFlIBpA8Q/XnOoItlt+UOI= Subject: Patch "spi: bcm2835aux: ensure interrupts are enabled for shared handler" has been added to the 4.14-stable tree To: agraf@suse.de, alexander.levin@microsoft.com, bcm-kernel-feedback-list@broadcom.com, broonie@kernel.org, eric@anholt.net, f.fainelli@gmail.com, gregkh@linuxfoundation.org, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, marc.zyngier@arm.com, rjui@broadcom.com, robh@kernel.org, sbranden@broadcom.com, stefan.wahren@i2se.com From: Date: Sun, 17 Jun 2018 13:23:29 +0200 Message-ID: <1529234609240107@kroah.com> MIME-Version: 1.0 X-stable: commit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180617_043539_298649_FFF02736 X-CRM114-Status: GOOD ( 13.79 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: stable-commits@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This is a note to let you know that I've just added the patch titled spi: bcm2835aux: ensure interrupts are enabled for shared handler to the 4.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: spi-bcm2835aux-ensure-interrupts-are-enabled-for-shared-handler.patch and it can be found in the queue-4.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. From foo@baz Sun Jun 17 12:13:49 CEST 2018 From: Rob Herring Date: Thu, 3 May 2018 13:09:44 -0500 Subject: spi: bcm2835aux: ensure interrupts are enabled for shared handler From: Rob Herring [ Upstream commit bc519d9574618e47a0c788000fb78da95e18d953 ] The BCM2835 AUX SPI has a shared interrupt line (with AUX UART). Downstream fixes this with an AUX irqchip to demux the IRQ sources and a DT change which breaks compatibility with older kernels. The AUX irqchip was already rejected for upstream[1] and the DT change would break working systems if the DTB is updated to a newer one. The latter issue was brought to my attention by Alex Graf. The root cause however is a bug in the shared handler. Shared handlers must check that interrupts are actually enabled before servicing the interrupt. Add a check that the TXEMPTY or IDLE interrupts are enabled. [1] https://patchwork.kernel.org/patch/9781221/ Cc: Alexander Graf Cc: Marc Zyngier Cc: Mark Brown Cc: Eric Anholt Cc: Stefan Wahren Cc: Florian Fainelli Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Cc: linux-spi@vger.kernel.org Cc: linux-rpi-kernel@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring Reviewed-by: Eric Anholt Signed-off-by: Mark Brown Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/spi/spi-bcm2835aux.c | 5 +++++ 1 file changed, 5 insertions(+) Patches currently in stable-queue which might be from robh@kernel.org are queue-4.14/spi-bcm2835aux-ensure-interrupts-are-enabled-for-shared-handler.patch queue-4.14/dt-bindings-panel-lvds-fix-path-to-display-timing-bindings.patch queue-4.14/dt-bindings-pinctrl-sunxi-fix-reference-to-driver.patch queue-4.14/dt-bindings-serial-sh-sci-add-support-for-r8a77965-h-scif.patch queue-4.14/doc-add-vendor-prefix-for-kieback-peter-gmbh.patch queue-4.14/dt-bindings-dmaengine-rcar-dmac-document-r8a77965-support.patch --- a/drivers/spi/spi-bcm2835aux.c +++ b/drivers/spi/spi-bcm2835aux.c @@ -184,6 +184,11 @@ static irqreturn_t bcm2835aux_spi_interr struct bcm2835aux_spi *bs = spi_master_get_devdata(master); irqreturn_t ret = IRQ_NONE; + /* IRQ may be shared, so return if our interrupts are disabled */ + if (!(bcm2835aux_rd(bs, BCM2835_AUX_SPI_CNTL1) & + (BCM2835_AUX_SPI_CNTL1_TXEMPTY | BCM2835_AUX_SPI_CNTL1_IDLE))) + return ret; + /* check if we have data to read */ while (bs->rx_len && (!(bcm2835aux_rd(bs, BCM2835_AUX_SPI_STAT) &