Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3492368imu; Sun, 11 Nov 2018 16:19:35 -0800 (PST) X-Google-Smtp-Source: AJdET5cr7LmV2qjts/XV6EfXOwBM1MFe0AC4QyN6las7br5QV5sjI4l5L4Ka0wuCKCL7VgpY4Pd9 X-Received: by 2002:a17:902:b104:: with SMTP id q4-v6mr18049864plr.5.1541981975447; Sun, 11 Nov 2018 16:19:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541981975; cv=none; d=google.com; s=arc-20160816; b=sMFmx0ehnUOJ/9ENclqnXSQkHx3s/vXpovo19+VvY+nUgdgSUD2pHtMFSmqgpLtnKs Vl1qv4ymIB28ZaC4AbQ+HbIK/EOYQxBLK3ERuU3T26XyqF6PgieV0J5f+b1htL4R+lR+ 3an6pyxgwOwyhYO+tN68bBu/n0GpDraBZ16D5Lm/uzTCTFSrirN9Rwogl9Is9DISF4Yo o2+xziave3OG62WDfjSu3CG0qJBowTcTGWC9UQ4TkRjYOEZEGsbtOF7DrChXIQVktxyx iP3mGA+9QmqlCDuAnv1l8KkiNNiwZvqUwB5n8ovgZtK0GcCj3lPgoDZ3RrJUo0P5PKN/ 9vAg== 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=D9YWtkAMsSKIlSfEMEwd9wsPeURQsFwYS42X9vEIgQI=; b=FgEK5syrn+yJr84YS297/3DAQy8MuNVfVVFaqoDxnLqrvqKcEJQ2Wp/qQTqi2cAoiB RpvpllPYs8+QAxLRLMIlLmT7EkF2Z7jXoQd8xxraey6DAjd7oEzZ+kP2Ur+Jj1HoEu88 CkrD+PMyIhWpsr7HVIkZha1uYzsSrTp16Vyoq3M3vyT2NL7HmbUAlP+PBvhouyEtmK98 HDNZLO4nS04J2Aet2KNx284jBphbOjZ/uJG00z2QxM8eh+bwTvVRnKbqhz6qfPXBfPkO QThJ6CmMlh2rcQ+VXUlN5Hw7Jh3pnokjQBVrgbM91df/vNwHKmEjVbJtGrn2aXOQTyum sQZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EiyXmSNc; 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 x33-v6si16048577plb.49.2018.11.11.16.19.20; Sun, 11 Nov 2018 16:19:35 -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=EiyXmSNc; 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 S1730209AbeKLKJ0 (ORCPT + 99 others); Mon, 12 Nov 2018 05:09:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:58446 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729942AbeKLIQ5 (ORCPT ); Mon, 12 Nov 2018 03:16:57 -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 88E8521731; Sun, 11 Nov 2018 22:27:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975222; bh=BHNq+GDFzR0QRWd6NoJiSBBizD81GsGqZvbRTABu1n0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EiyXmSNcZSeUWXyVZXa6IzIet0Lka3gXAcwFWvrZmFZTwOmwOSgaJsQY+BJ8Egx/v TySSIyU4/pW8nxCJ+Tbo3R2q6cSapmjjfWtB0T8RUScRb//jKy71IRkHimXHmR49hC DVsaYix4mxiPhb7cgnBHUCPRW5vYwrQ7BDNL1+sI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Liu Xiang , Boris Brezillon Subject: [PATCH 4.19 006/361] mtd: spi-nor: fsl-quadspi: fix read error for flash size larger than 16MB Date: Sun, 11 Nov 2018 14:15:53 -0800 Message-Id: <20181111221620.907362168@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@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.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Liu Xiang commit 41fe242979e463d6ad251077ded01b825a330b7e upstream. If the size of spi-nor flash is larger than 16MB, the read_opcode is set to SPINOR_OP_READ_1_1_4_4B, and fsl_qspi_get_seqid() will return -EINVAL when cmd is SPINOR_OP_READ_1_1_4_4B. This can cause read operation fail. Fixes: e46ecda764dc ("mtd: spi-nor: Add Freescale QuadSPI driver") Cc: Signed-off-by: Liu Xiang Signed-off-by: Boris Brezillon Signed-off-by: Greg Kroah-Hartman --- drivers/mtd/spi-nor/fsl-quadspi.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/mtd/spi-nor/fsl-quadspi.c +++ b/drivers/mtd/spi-nor/fsl-quadspi.c @@ -478,6 +478,7 @@ static int fsl_qspi_get_seqid(struct fsl { switch (cmd) { case SPINOR_OP_READ_1_1_4: + case SPINOR_OP_READ_1_1_4_4B: return SEQID_READ; case SPINOR_OP_WREN: return SEQID_WREN;