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: 7002931 Return-Path: X-Original-To: patchwork-linux-spi@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 447A4C05AC for ; Wed, 12 Aug 2015 16:04:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3E42A20678 for ; Wed, 12 Aug 2015 16:04:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 33E8620652 for ; Wed, 12 Aug 2015 16:04:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755489AbbHLQEL (ORCPT ); Wed, 12 Aug 2015 12:04:11 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:32861 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755483AbbHLQEK (ORCPT ); Wed, 12 Aug 2015 12:04:10 -0400 Received: by wijp15 with SMTP id p15so224029173wij.0; 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 Cc: Ricardo Ribalda Delgado 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 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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; }