From patchwork Wed Aug 12 16:04:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda Delgado X-Patchwork-Id: 7002951 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A1C40C05AC for ; Wed, 12 Aug 2015 16:06:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C329320636 for ; Wed, 12 Aug 2015 16:06:30 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F31F9205E7 for ; Wed, 12 Aug 2015 16:06:29 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZPYW2-0005BK-Co; Wed, 12 Aug 2015 16:04:34 +0000 Received: from mail-wi0-x22e.google.com ([2a00:1450:400c:c05::22e]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZPYVz-00057N-9K for linux-arm-kernel@lists.infradead.org; Wed, 12 Aug 2015 16:04:31 +0000 Received: by wicne3 with SMTP id ne3so224623775wic.1 for ; Wed, 12 Aug 2015 09:04:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=qnkB/ioEt4/xz9EPUtzxTd19fQvZA6aJMunUChLoXu8=; b=lde0avttJeB5LjiZD5onq39EW710b61h2pRpW1Ms0w/2YBe8UmmC4vHJqS7jMwh5LY WF66KEkJiLiSwzCle80PguxxUDy3dCtY8cqV2bzz4Q/MZ4FmQQ4fRAs/ezf9zwDXTN84 oLa4Kb8MfkI3bV8s+0RcPxuMW/RVB8LlUQwWjvOnWPVToYn5soSIx/aWT/mXtOJjYWIY DnpKuQVxIT5aqYNWZZSveyvMVYy8zm3ukL/1f+/PXIm1shnWbyIc+XTV7up+5oZZgrml 8t0mrzxToaX9gEeFIIpag0cmMfWJ24m/z3BoaOwvdJxAJKV/edjDHS6egKQE/l2M353x fbdA== X-Received: by 10.180.105.98 with SMTP id gl2mr50006120wib.56.1439395448672; Wed, 12 Aug 2015 09:04:08 -0700 (PDT) Received: from neopili.uam.es (vpn52.remoto.uam.es. [150.244.109.52]) by smtp.gmail.com with ESMTPSA id i1sm8576602wjq.42.2015.08.12.09.04.06 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 12 Aug 2015 09:04:07 -0700 (PDT) From: Ricardo Ribalda Delgado To: Mark Brown , Michal Simek , =?UTF-8?q?S=C3=B6ren=20Brinkmann?= , linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] spi/spi-xilinx: Fix mixed poll/irq mode Date: Wed, 12 Aug 2015 18:04:04 +0200 Message-Id: <1439395444-25599-1-git-send-email-ricardo.ribalda@gmail.com> X-Mailer: git-send-email 2.5.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150812_090431_473029_FD1E40F5 X-CRM114-Status: GOOD ( 11.14 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ricardo Ribalda Delgado MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Once the module process a transfer in irq mode, the next poll transfer will not work because the transmitter is left in inhibited state. Fixes: 22417352f6b7f623 (Use polling mode on small transfers) Reported-by: Edward Kigwana Signed-off-by: Ricardo Ribalda Delgado --- drivers/spi/spi-xilinx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c index 133f53a9c1d4..7abf6792cc11 100644 --- a/drivers/spi/spi-xilinx.c +++ b/drivers/spi/spi-xilinx.c @@ -302,8 +302,10 @@ static int xilinx_spi_txrx_bufs(struct spi_device *spi, struct spi_transfer *t) remaining_words -= n_words; } - if (use_irq) + if (use_irq) { xspi->write_fn(0, xspi->regs + XIPIF_V123B_DGIER_OFFSET); + xspi->write_fn(cr, xspi->regs + XSPI_CR_OFFSET); + } return t->len; }