Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp722743imm; Fri, 12 Oct 2018 05:48:16 -0700 (PDT) X-Google-Smtp-Source: ACcGV63K/+kkCxRN8AZZ1Xe2kgJoa8l+AI1EpSIb3LqvIyd9x1VUPdwcjG1li0cXK9S629hLBYSG X-Received: by 2002:a62:c40f:: with SMTP id y15-v6mr5953198pff.161.1539348496393; Fri, 12 Oct 2018 05:48:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539348496; cv=none; d=google.com; s=arc-20160816; b=cRtLUxJ3SFO1lMi0cenUpbqhG5vdEWTXoZxDYN0nQP9CMa7skxRxvyKofhdmdLU1qT 4vJAbTX486qlTfqbae3AnDhsejS7AwqfKRHAcvY4NHz/hIFLLueRxAGRQvaSqXcxesTE CYvku4ccFEw9/sFKeaMg+VeoHSY+0eTbyAZeDQaHbIxBzRbjUtE6DK7wP+gCwkRvSgmZ AAOfgp8NKOvbqXUSUUtpLjxvQn8zofo94JUAcRC8ZnoFjlghvI/vPJhDs9VP8bH56tCk LjqYOeUFAEWQQw6BHja/wt3P1CjmZ0r9WqGlGTSmS+6nks83ochn0DZMbFGXBYe68l/j 7dVA== 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 :references:in-reply-to:message-id:subject:cc:to:from:date; bh=Oxu5jvo3LgX5eERwiMdAgTg/P6TbbhFbgkvQ9tDBGrk=; b=XkHEUa/H5GzkUeW2JS/WA9cEMAnJygtAubxn11uYs4/Oau4G1lS5ojt8HcOy1Hckxv U167bF0JCZyomeMrS9qi+We8gpeyX6tOfcsa1TciMmTn9Dao2nD3DF0cCM6TJVrx2sZ1 ktBfHTIH9utqMv7emdeK5QgHeGjkv9Cw9x6mb82skpoeQ8tI07nq3XhUgHYmKexDyMtP L6psYJ+jy3GrCGhMyaptbXvz53p2a5hCMGSNT2BRt9knKBytpK4srYa0tnXvu5YweO1m VGq0OMT/t2b31tF4p9hiYT09s19IhsBM7scNeRZ80x8zgYvgYil/bw0eb21fbvEnHeQU 7d2g== ARC-Authentication-Results: i=1; mx.google.com; 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 20-v6si1144504pfk.287.2018.10.12.05.48.02; Fri, 12 Oct 2018 05:48:16 -0700 (PDT) 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; 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 S1728720AbeJLUTv (ORCPT + 99 others); Fri, 12 Oct 2018 16:19:51 -0400 Received: from mail.bootlin.com ([62.4.15.54]:48930 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727838AbeJLUTu (ORCPT ); Fri, 12 Oct 2018 16:19:50 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id D9B64208B7; Fri, 12 Oct 2018 14:47:29 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (AAubervilliers-681-1-7-245.w90-88.abo.wanadoo.fr [90.88.129.245]) by mail.bootlin.com (Postfix) with ESMTPSA id 8D49820719; Fri, 12 Oct 2018 14:47:19 +0200 (CEST) Date: Fri, 12 Oct 2018 14:47:20 +0200 From: Boris Brezillon To: Liu Xiang Cc: linux-mtd@lists.infradead.org, richard@nod.at, linux-kernel@vger.kernel.org, stable@vger.kernel.org, marek.vasut@gmail.com, liuxiang_1999@126.com, han.xu@nxp.com, computersforpeace@gmail.com, dwmw2@infradead.org Subject: Re: [PATCH v3] mtd: spi-nor: fsl-quadspi: fix read error for flash size larger than 16MB Message-ID: <20181012144720.799a855f@bbrezillon> In-Reply-To: <1535466777-3833-1-git-send-email-liu.xiang6@zte.com.cn> References: <1535466777-3833-1-git-send-email-liu.xiang6@zte.com.cn> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 28 Aug 2018 22:32:57 +0800 Liu Xiang wrote: > 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 Queued to spi-nor/next. Thanks, Boris > --- > > Changes in v3: > move changelog position. > > drivers/mtd/spi-nor/fsl-quadspi.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c > index 7d9620c..64304a3 100644 > --- 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_qspi *q, u8 cmd) > { > 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;