Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp510443pxx; Wed, 28 Oct 2020 09:58:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyerFfZRmVGhrqYKFhVgOTcUempps76m//7PxGjsTHZFFSOaFRX0kCAGQISFXZLAqaoUcLe X-Received: by 2002:a50:99cd:: with SMTP id n13mr8868417edb.10.1603904318595; Wed, 28 Oct 2020 09:58:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603904318; cv=none; d=google.com; s=arc-20160816; b=cFS80JaSj2/KHRSNsUeNKIP5+kCsPhSCyCQmOOSOL0VxlZSYglPFtcmb3/ADG+fW/t HxY2stYZphXlkeRGYr7U8qAGXDMQhST+OwJOZCLdwa5eAKgcrssk4+PsEjNwYLjTdVoR Nf9IrHDz6TNLult7nrztcRLPAz9VkCocxZmpd2niwH4Sm+kDDF5vipI5CkPNydLGPxAL NVY/i/5QiLuU75B27KXOI2KUMRAHaVP1JOg5+6EcYRiQkm2zcHGlXGu+tGvRerL1xueZ cVlKsDW7AS7I1Yk4nT36RGgd+JNZg/A597bttPjIVvq41uxht+56DuZSg3nF7vU15WCO M/7g== 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=KqGXFHAyrtYgLfZgPrYozXOCH29yHSs5CBgibwGIzo4=; b=ACPnaL8h3ejWl3IdTwY1VpD4ReV5aKqUpenMdcKdzCs/lKLZ45GaD6gWSebY0jnkY2 ao6LLg1CReOfGJQG+0vTz9yzW8BQRZnej0okmfx9bwf+RCwWnACSiAtLJAFL5V9s/obQ c4/ppG70EUx2Q1yjUrwc7rMzBSBTwwrfH60OJvmYBagcrsyxYhkJZx8ME4lNpICm5o7t ecEoiEPFmbDfwcc8BIqCMWC93Bwp8BVaf9m45zZ5ENSC6iehFE9apKvvK3ddK3DzlPLb JajbHRVbYcMvxU/hAs4t6d8k2oi6bQtMbKjBnHmfb9gWFZtIUkPszEUm14m5FpfqzPs7 ztLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ai48gxD7; 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=fail (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 y6si18713edm.295.2020.10.28.09.58.16; Wed, 28 Oct 2020 09:58:38 -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=@kernel.org header.s=default header.b=ai48gxD7; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1819126AbgJ0R11 (ORCPT + 99 others); Tue, 27 Oct 2020 13:27:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:53716 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1775590AbgJ0OxS (ORCPT ); Tue, 27 Oct 2020 10:53:18 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 90FCC207DE; Tue, 27 Oct 2020 14:53:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810397; bh=JTw+OZECR89UPHKNKWzF0xdqQv+MFgn4N9oUhzti3y4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ai48gxD7z9miM/nflU9b7+ORA4ZX35S7CasdV3F2NnCskPumHQCTp/oc/FO1W9L/U KJeQNnVn0w7usk6nfhzDZ7qeN/Je35/QACxI2BOqODkn8gxUEqnFxth6Lvv53VgxTE ynExSn8Ywq4zUi0jEv71dwkwf3MHsQBX0kmyzLU8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Brad Bishop , Eddie James , Joel Stanley , Mark Brown , Sasha Levin Subject: [PATCH 5.8 125/633] spi: fsi: Handle 9 to 15 byte transfers lengths Date: Tue, 27 Oct 2020 14:47:48 +0100 Message-Id: <20201027135528.570866146@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@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: Brad Bishop [ Upstream commit 2b3cef0fc757bd06ed9b83bd4c436bfa55f47370 ] The trailing - 8 bytes of transfer data in this size range is no longer ignored. Fixes: bbb6b2f9865b ("spi: Add FSI-attached SPI controller driver") Signed-off-by: Brad Bishop Signed-off-by: Eddie James Reviewed-by: Joel Stanley Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20200909222857.28653-2-eajames@linux.ibm.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/spi/spi-fsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/spi/spi-fsi.c b/drivers/spi/spi-fsi.c index 37a3e0f8e7526..8f64af0140e09 100644 --- a/drivers/spi/spi-fsi.c +++ b/drivers/spi/spi-fsi.c @@ -258,15 +258,15 @@ static int fsi_spi_sequence_transfer(struct fsi_spi *ctx, if (loops > 1) { fsi_spi_sequence_add(seq, SPI_FSI_SEQUENCE_BRANCH(idx)); - if (rem) - fsi_spi_sequence_add(seq, rem); - rc = fsi_spi_write_reg(ctx, SPI_FSI_COUNTER_CFG, SPI_FSI_COUNTER_CFG_LOOPS(loops - 1)); if (rc) return rc; } + if (rem) + fsi_spi_sequence_add(seq, rem); + return 0; } -- 2.25.1