Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp672413ybl; Fri, 23 Aug 2019 06:48:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqwWyADzfJp1MRzEYLcI0AmaUihsAAx8SqFqhznIJ3je+xbSbHW5XoJGEN++ABO8Jb2iErt8 X-Received: by 2002:a17:902:bb85:: with SMTP id m5mr5143738pls.10.1566568121090; Fri, 23 Aug 2019 06:48:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566568121; cv=none; d=google.com; s=arc-20160816; b=j3kLaxfzTeo1PGXmq2ZRvMH+hjgdSAtbYW+BTB3sixulzCYT3n0l2i8DBxdh11fO+S +RLQiOkoO27kBqwbqQX47BAoDqZ7uWv3kiAXAtc4POTvPd0ktQCUmXA1JvBUtYa+LigU TPQ0eQpbbvusDExUWjlSqUotVH8QqnwFSINr00sp9MBSb5H6zrawIar+ozp8bvbeaV6B 1bUus5+l2Zu1leVAf3AE1QvaMC1k535MvcOxluLHYXj0d0TWOGwioknRCP/Y38W/hQfm sTnpYezqSYOZKNfmJSofGpsA0Xdzm05XnMTFjfpBHVl7lWFivlunukdvYNxpAhntDwwg 9TCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=EtIN/Xlr6Ip9YVPKEGipzkLuuYaoLg7P8nPJxnIh64A=; b=q7TiKO4eqS/UNz3wx3bj1lZTq0tDSm9zX4M7Dwy74ZSprwlmDLqvWb6TWKpjz2XHIQ ph6jHq/9haGhwcgjEj1rIHEQfIckO1fxN5LtdHb8wBEV+o67gwt2Nr11xXH7IEM6UA+U i1F8WRslWf29WcJm0AOotyXbe6svG+wMLTg9NS3rriQNzVis7cGVDsDBOGbBEUv/vjXi 0Ts+6q74U8MeZAx9zeiTDx8I/grvBJZ/7D4mHNyd+t5XTtNocUL2K5YxJYKgtXT06lKT J/kFWrAEITNnPUTe/Ia1GsPY7Nbl9+SYWMOqsfdxmGUaddAdeyhyrdjvxFVhtR5nWBeR DXvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Z4W8X20h; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b18si2464007pls.125.2019.08.23.06.48.25; Fri, 23 Aug 2019 06:48:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Z4W8X20h; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390690AbfHVVPz (ORCPT + 99 others); Thu, 22 Aug 2019 17:15:55 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:38468 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390238AbfHVVPx (ORCPT ); Thu, 22 Aug 2019 17:15:53 -0400 Received: by mail-wm1-f66.google.com with SMTP id m125so7097310wmm.3; Thu, 22 Aug 2019 14:15:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EtIN/Xlr6Ip9YVPKEGipzkLuuYaoLg7P8nPJxnIh64A=; b=Z4W8X20hXdRXquz+6aomxEmdr1Nw6M30y/29B8Sk9nBVqCiMWQQA0jVA8B00CjXMEh HJOB0pxT3z/GPheiZy4Ne1BHS0t5pNAZ3AU1XZ+/UQ5Tx+25X2nDLoeSe9SOfaXBiUZT xtzmzLT0ZjJ+f+U6Cgd9WoOUO1D0lBQl0mGGPblPD6D5/C/5JgTrao1vlkrspMU9871K ovuwE2RHRte1AeeXmVHtSTcfqGxGsUtyU/ngLnDFzP6kkZtVRy/igk9DSK2nRj6Bupe2 S7M783ui3HgnAOPNMj5FMxxAC8Ec3zLUFimt/kh0OC66m4gN9H0YrPjeHkvZ+TEWHgAZ WvSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=EtIN/Xlr6Ip9YVPKEGipzkLuuYaoLg7P8nPJxnIh64A=; b=hGzUz6UeeHJEXCHV+d0Q1ptAHTlLip/7vExdVK+IGF/WeCPqAZ9nuS6Mluhfq0U4iZ zyKzVLJW5wfwn1oaJT8IeZ7AS4cgmMk3WfG65Xz1/39Fnq+XzuGwe/FMvDC60Yag5fGs T/9i21ddgaFmBmemKJZGFrvgvqJy7R/dNXBv1rw4gxvqPGRwMRdVLOQzWTvJDbQWLqHj 9OJdcvq0kiwi96+/SGcyxC7xNIwybcsirA5BL3a1qlfjaN4yWD1jOQN5RneGVWj9ipSx ZkEUST+Rw2K0RUl3XmFgqpai174bGktTGO1HlfHbI9HxjQYyzbI+RmKarOXjefuZp6Ze LJNQ== X-Gm-Message-State: APjAAAXX+0IUe+sP1xcQPRuBY8+89bQ9Gdt/3fakH1WUqO7hNcUGHW1K J5M8EoLtOXDHPgMBx1IlUaA= X-Received: by 2002:a1c:1f41:: with SMTP id f62mr1096637wmf.176.1566508550977; Thu, 22 Aug 2019 14:15:50 -0700 (PDT) Received: from localhost.localdomain ([86.126.25.232]) by smtp.gmail.com with ESMTPSA id g197sm578488wme.30.2019.08.22.14.15.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2019 14:15:50 -0700 (PDT) From: Vladimir Oltean To: broonie@kernel.org Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, netdev@vger.kernel.org, Vladimir Oltean Subject: [PATCH v2 2/5] spi: spi-fsl-dspi: Exit the ISR with IRQ_NONE when it's not ours Date: Fri, 23 Aug 2019 00:15:11 +0300 Message-Id: <20190822211514.19288-3-olteanv@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190822211514.19288-1-olteanv@gmail.com> References: <20190822211514.19288-1-olteanv@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The DSPI interrupt can be shared between two controllers at least on the LX2160A. In that case, the driver for one controller might misbehave and consume the other's interrupt. Fix this by actually checking if any of the bits in the status register have been asserted. Fixes: 13aed2392741 ("spi: spi-fsl-dspi: use IRQF_SHARED mode to request IRQ") Signed-off-by: Vladimir Oltean --- drivers/spi/spi-fsl-dspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c index c90db7db4121..6ef2279a3699 100644 --- a/drivers/spi/spi-fsl-dspi.c +++ b/drivers/spi/spi-fsl-dspi.c @@ -659,7 +659,7 @@ static irqreturn_t dspi_interrupt(int irq, void *dev_id) regmap_write(dspi->regmap, SPI_SR, spi_sr); if (!(spi_sr & (SPI_SR_EOQF | SPI_SR_TCFQF))) - return IRQ_HANDLED; + return IRQ_NONE; /* Get transfer counter (in number of SPI transfers). It was * reset to 0 when transfer(s) were started. -- 2.17.1