Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp501986pxt; Fri, 6 Aug 2021 07:11:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKw5ME+SfYQmzqFhLLbGugPLi4iJdW4rneQpbSHDDnoH1V5X4H1WQGgLo3Hwv2w9f2rNjh X-Received: by 2002:a92:1942:: with SMTP id e2mr62041ilm.4.1628259072766; Fri, 06 Aug 2021 07:11:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628259072; cv=none; d=google.com; s=arc-20160816; b=sm2tEUQT9/rL7CXTNxxyOF6Rp+0dYoMAML6PqFVP9GDqcW/6DpldV7F7woE1ACUl8+ pImkvziphsIcooDj7aWapOZFzUYOd2lvyk4Zpc/PU2L9fyyfhuLZjAkzAXwgdfA4U/BV QgS8/1Td+mq5mPgOyUEpDNJ7zYDwaDikD2RnVqtIoE2SfQUz/7f1EpQwdPNvEnOaEKVJ f9uAtAN1eUtY4PBHHezZ6I8q3Wxg8W1x3UeYtMBFgdaO46NvoZ4X38TIycY5xd5RDEhk D5Nxti8jXzoiqd0mEoDDtjdSmjaJhrR9KJ+m6BqEXi7/Bl3emPd7ZoytMcUONeJ5VfQq pjGA== 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=DBeMngXY/VMTx22Bz0ox8TML5yjlrPdwp5Wz/ekuZyg=; b=MbkcPxCkYEpGc2POgMPVtxw0b4S1VUvyUZSf74gBqtUGps8iRU/JxW+4Npy5RdfhG0 S5VRShWNnDaCmbkcqA9DosNZK6hKOOm0Eh40OZdErg9nIBVBUpiXNLvOD3obORjS2qiw Ki+N8nvUxfbC30NUgpivVSXEFHoLwsAufmkW3VpER9H1LPB5UxWo1F7TM97CbPvkGwkC AyPKAVtPWoKACg0X8dkn8SxPpNxRK/B2DzAFWmRYYCwUV+2rb0Oa9izzaGLICNIQNuMx Y6lSNFFYKUCcSOrVzZJgEawZk/qUtAxKwf1JMZe/pdxmq1Gf9uO14IVVKcGPTP/jQ2ZF Oc+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=esPxs7lF; 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 j25si8803447jaj.93.2021.08.06.07.10.57; Fri, 06 Aug 2021 07:11:12 -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=esPxs7lF; 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 S245093AbhHFIYi (ORCPT + 99 others); Fri, 6 Aug 2021 04:24:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:47974 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244331AbhHFIVP (ORCPT ); Fri, 6 Aug 2021 04:21:15 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AE1606124C; Fri, 6 Aug 2021 08:20:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628238052; bh=OCWiPtmUksTelPyy2JVAZgovGF2hvruUipROaXSv83I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=esPxs7lFx8DQkzkaNqackawsEErWfzDYPz0wC9dSyqPBqkklD6LvU9xeRO3gdkVT6 L/gDB2vuEYGwqTK2Lf97Xv/y79VDkCngF/TlkNfMXdq7pAWbnJM6UKO4t99PFkZ7PU ZnDqS85a369llObYpnp60eHtpvRSTWvCYhvtr/G4= 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 5.13 32/35] Revert "spi: mediatek: fix fifo rx mode" Date: Fri, 6 Aug 2021 10:17:15 +0200 Message-Id: <20210806081114.781183194@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210806081113.718626745@linuxfoundation.org> References: <20210806081113.718626745@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 09b8cc7810587257e5f82080884001301e1a1ba9 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 @@ -427,23 +427,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);