Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp271335pxt; Fri, 6 Aug 2021 01:23:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzIbnvcL9wMSOkVYiAHlBgFWL+nPk4cgRY41ysP+wU5P7QH3tsWmknfKNawUl8qLJ/FZAk X-Received: by 2002:a17:906:f112:: with SMTP id gv18mr8757473ejb.439.1628238221258; Fri, 06 Aug 2021 01:23:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628238221; cv=none; d=google.com; s=arc-20160816; b=j+bpmM+y07qYwx4dQKxTo3++B4nTgMbRJCpsaUXB2ZFQ9Tv/uGIluimE7fzD06BQ8X a7dET1Wr7HqQsinmnQ+dcQJQJQrqRAXAdD+s660+9BRCgZltDX1SfcKo3uDnWHCcpwn9 2cT1+6XfEF1JG01xXMxVlV0g44CzvxE9yh4D6hBoiRQAKd05o72HWi+WZ9sq8dDaf334 5OonfbpoI5Y4ivWLYjP91jXSkbUPYCstJ/Grvffd1+/23+t7GMn+Jmvj3YdLHFD23z6M P9WXGWIhrgdarQtqlrL2O9v3pwa3UmrNBLYv/Mno/8p1BfAIPYstno42TK+XmMCojm2Z bLZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=O48SRJERLP48+aoqUd2W6g5YBjO1bTrI5VkM8OQ1EjI=; b=umqzdprj0dd9o8Fiy6d1fOd3cE24p6jvmz6WmmuuOr6HocH6ZOETpYtx5sagq+ty+f u2XLoPNI7IU3PtVRYdmbHFb64fxhZYfafLHqqSCGhEkL8JUF8+KOLCMHeCrSMjNec7sx F9HXGJCW2v2muymSyP97oa3vCvDNigIxtmjVzXZFdO63/bPrO3CqZFlXnnpFXwukHTfH Kw483jVM2wpL9iWMlYTDnKt9KrmLwq89utUEWdpvw/sAOjXtcbw5WdckALvQswLJGqGX HR+rkDoEGinJBeKLJLP5k/vibO0bMnzUNEAppqMPuEBVrLZogQTYm62a13PlSNHENS7/ bZCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0HDQAyga; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t12si2388677edc.333.2021.08.06.01.23.15; Fri, 06 Aug 2021 01:23:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0HDQAyga; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244013AbhHFISQ (ORCPT + 99 others); Fri, 6 Aug 2021 04:18:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:45830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243942AbhHFIQQ (ORCPT ); Fri, 6 Aug 2021 04:16:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id ABD7A6103B; Fri, 6 Aug 2021 08:16:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628237761; bh=tWFm5KO6SzEo9Xw90zcZWaWl25jHCye4tIAZBR2peUg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0HDQAygaxHs+hDOxGbT13mUarsI5/mWSHerofZjYXlKOrKzvpchgwT6Dgr5SigMUv qHInqejrDIc09Q0os4lLYVbd5fDXoOGKM78Ai64Q4Qd4NRfkc0F3W2aDWe+pZrZj8Q Gl+5n4rjQhNOurmc2RUrMTqpltS706PnwBhNRn2k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Guenter Roeck , Peter Hess , Frank Wunderlich , Mark Brown , Sasha Levin Subject: [PATCH 4.19 10/16] Revert "spi: mediatek: fix fifo rx mode" Date: Fri, 6 Aug 2021 10:15:01 +0200 Message-Id: <20210806081111.473948710@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210806081111.144943357@linuxfoundation.org> References: <20210806081111.144943357@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman This reverts commit bd0447f72de0963129612bf18202204d5b25e133 which is commit 3a70dd2d050331ee4cf5ad9d5c0a32d83ead9a43 upstream. It has been found to have problems. Reported-by: Guenter Roeck Cc: Peter Hess Cc: Frank Wunderlich Cc: Mark Brown Cc: Sasha Levin Link: https://lore.kernel.org/r/efee3a58-a4d2-af22-0931-e81b877ab539@roeck-us.net Signed-off-by: Greg Kroah-Hartman --- drivers/spi/spi-mt65xx.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) --- a/drivers/spi/spi-mt65xx.c +++ b/drivers/spi/spi-mt65xx.c @@ -392,23 +392,13 @@ static int mtk_spi_fifo_transfer(struct mtk_spi_setup_packet(master); cnt = xfer->len / 4; - if (xfer->tx_buf) - iowrite32_rep(mdata->base + SPI_TX_DATA_REG, xfer->tx_buf, cnt); - - if (xfer->rx_buf) - ioread32_rep(mdata->base + SPI_RX_DATA_REG, xfer->rx_buf, cnt); + iowrite32_rep(mdata->base + SPI_TX_DATA_REG, xfer->tx_buf, cnt); remainder = xfer->len % 4; if (remainder > 0) { reg_val = 0; - if (xfer->tx_buf) { - memcpy(®_val, xfer->tx_buf + (cnt * 4), remainder); - writel(reg_val, mdata->base + SPI_TX_DATA_REG); - } - if (xfer->rx_buf) { - reg_val = readl(mdata->base + SPI_RX_DATA_REG); - memcpy(xfer->rx_buf + (cnt * 4), ®_val, remainder); - } + memcpy(®_val, xfer->tx_buf + (cnt * 4), remainder); + writel(reg_val, mdata->base + SPI_TX_DATA_REG); } mtk_spi_enable_transfer(master);