Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3416216imu; Sun, 11 Nov 2018 14:33:56 -0800 (PST) X-Google-Smtp-Source: AJdET5fgfgM6KeeLsV/gOaMLOxeXIii0SnbDS55txSHoMUbYdrZG2GtsqJN31hHFPtR5B+AMSKuh X-Received: by 2002:a63:7541:: with SMTP id f1-v6mr14178562pgn.231.1541975636915; Sun, 11 Nov 2018 14:33:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541975636; cv=none; d=google.com; s=arc-20160816; b=ptVyBGKMCj/7+DUVPb++DGrnlrNE7mEliV9mcFklrlVrQw71T9a8xz2vzK0r+iTZfH jsBzbX99JQHTqYNus2xR5qLfXNEz8RhQKOI4UUdk4iLHdR+oJjdrv6tiTNRhHmN38f77 CDpYjHUAeUftPy1QBMaTu11dVPDLGpJf2BQ2xTvKBmYYfelEv/Yr9n7cwZsQjz1eX23t ejIX+sQUo70s0+eiiFSXZPIv9jvDrFPv7clvzF4F55A2C5pAVpa/giH1jRNCZPNpMoTA Iz4pyOBogttS5r+ZqD670vD+ArtO+Z26/UjdvMQL3DEpeIDbXXrfkuYqicqjVADTJ6er /q2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Z2zSyYdjQf1knjYAO5WwnsQ8L5zkTf4PP7VNzylYp94=; b=Sm3bDy0J/AKhCxu/ObX7thM9jXZtn4dodpRtBN6TfYm2pJQuHUT/cVwvhY8xF7WZyf oWdlA0oKmFSWt5Kfgaknz3HsPFnxE0IYuQWYqOtJyzfFNCNMONkLUn6ELW3San3RAxaC sudebtoFCALgcWlWoq0PDqNTASRPjWIc0wzsmfbjsF9+KJFL1+44gGEZZTzDfipvCU2/ a/E/9allqs0Y/gASoAfK6YOVmL3M6Xzth+uRUvjGmgVHmilVeEfL/P++1OtEs1clK2qS tjTIIPrM7n4sWjlzNGUC4OpRgdRwdIk3m0eejn00oNEBFp0+qai3czJn2vaSGP2WMyQs Dd0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ntSHw5Yg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k5si14160424pgr.69.2018.11.11.14.33.41; Sun, 11 Nov 2018 14:33:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ntSHw5Yg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390217AbeKLIWB (ORCPT + 99 others); Mon, 12 Nov 2018 03:22:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:50552 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390163AbeKLIWB (ORCPT ); Mon, 12 Nov 2018 03:22:01 -0500 Received: from localhost (unknown [206.108.79.134]) (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 13D69224B3; Sun, 11 Nov 2018 22:32:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975524; bh=TCP94yQQWovgmiDxT8EHbrVs4urTMV4n0MswR9l+IhA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ntSHw5YgAEPAgfTn1EfA0LWQr+ev1hLh2koCVZSS4gcN9T6B85wlaTVfz4DRYBq2G XwSJqZPF13bsUUFAmHdTVr9UhQH8jlmjzU724txil1oBvECFCa5BIZNuzj/aQm6Xyh SbwzzAaVs4gThcUygC667W0/3DUcBU2DFLrfHA/0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Mark Brown Subject: [PATCH 4.14 002/222] spi: bcm-qspi: switch back to reading flash using smaller chunks Date: Sun, 11 Nov 2018 14:21:39 -0800 Message-Id: <20181111221647.987120977@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221647.665769131@linuxfoundation.org> References: <20181111221647.665769131@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Rafał Miłecki commit 940ec770c295682993d1cccce3081fd7c74fece8 upstream. Fixing/optimizing bcm_qspi_bspi_read() performance introduced two changes: 1) It added a loop to read all requested data using multiple BSPI ops. 2) It bumped max size of a single BSPI block request from 256 to 512 B. The later change resulted in occasional BSPI timeouts causing a regression. For some unknown reason hardware doesn't always handle reads as expected when using 512 B chunks. In such cases it may happen that BSPI returns amount of requested bytes without the last 1-3 ones. It provides the remaining bytes later but doesn't raise an interrupt until another LR start. Switching back to 256 B reads fixes that problem and regression. Fixes: 345309fa7c0c ("spi: bcm-qspi: Fix bcm_qspi_bspi_read() performance") Signed-off-by: Rafał Miłecki Signed-off-by: Mark Brown Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/spi/spi-bcm-qspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/spi/spi-bcm-qspi.c +++ b/drivers/spi/spi-bcm-qspi.c @@ -88,7 +88,7 @@ #define BSPI_BPP_MODE_SELECT_MASK BIT(8) #define BSPI_BPP_ADDR_SELECT_MASK BIT(16) -#define BSPI_READ_LENGTH 512 +#define BSPI_READ_LENGTH 256 /* MSPI register offsets */ #define MSPI_SPCR0_LSB 0x000