Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3430610imm; Mon, 6 Aug 2018 04:48:35 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdKqgzG4PGOVO9ZOZ/Y6xxy3IFlXYZFmgkxzj30chH31HgGfjj/mr/DIe8FmJsiEquwYmFN X-Received: by 2002:a63:9902:: with SMTP id d2-v6mr14174350pge.343.1533556115125; Mon, 06 Aug 2018 04:48:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533556115; cv=none; d=google.com; s=arc-20160816; b=YUtAkUcJzuAPRyVNN6KleraEuvb2qz+UI0koOd0sMZ1NlPqevJJflXsUA6Mr3ldMK/ 9jMojccc0yl4a+j8rVHXTkNXbDUF0DZEZi0TsXgJ57+jJ9SIgUSUw5hry5wmfanbOltu 6u4AMFxO51SgtDHbnyU2ms4k7GY/Nrpvp1MsX4wL4tUB/8MZw92alaz7+M/3Kv6HfGUf Oq6nm6B7443SqRg3FNxBN0FdfWXsOB4KjD7DO66PPF3xajboE+qV3H5/kfQfg2ZLGFOK gDAHFE4X/VY+aMZjyeyb0oKc6Pf3z3i4sF473kX7RJDTzzwgJAdNfnKzQkNemWKjtRZr a2BA== 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 :arc-authentication-results; bh=P6wycDcGItLfJQPrvS31fiz7XYPcV/JfBjsDbAFPBt8=; b=Pk1OWEhF0b7+MJFXpGQ/gSWXCD4MblJWvRo2OWwW5Y2PL++BN909pRD2yG1fV2mHQz ZdErCnJ4AYCBuS/lUt7zr14k2a6VU84G5U2cLtywTNWt4Nay+HVavPu0weqM2QdWhdeT NB5XZISftkFq9cQNRUO7zHlQmtuv1lc07MCLq+MwuaQf4ZPSq9nWzgswh2Pq6nYEMWck nasF4dUkLYcr85LGcTUokh1z+dhWJp1YdKVxJYrzwWSXoWsFm9Jdnj0eAc7Om+LpcIL/ T4yqjnhwBdqN85H0HK0B0fS0tbi7nN6ptLQgZi7RxHpPr5A9/0pw9tr5A5Ofvxn+VIcZ s4Mw== 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 y2-v6si13480175pga.141.2018.08.06.04.48.19; Mon, 06 Aug 2018 04:48:35 -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 S1730245AbeHFNzd (ORCPT + 99 others); Mon, 6 Aug 2018 09:55:33 -0400 Received: from mail.bootlin.com ([62.4.15.54]:50570 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727451AbeHFNzd (ORCPT ); Mon, 6 Aug 2018 09:55:33 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id DE6EF20794; Mon, 6 Aug 2018 13:46:47 +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 (unknown [91.160.177.164]) by mail.bootlin.com (Postfix) with ESMTPSA id 91F5E203EC; Mon, 6 Aug 2018 13:46:47 +0200 (CEST) Date: Mon, 6 Aug 2018 13:46:48 +0200 From: Boris Brezillon To: Dan Carpenter Cc: Jheng-Jhong Wu , Palle Christensen , devel@driverdev.osuosl.org, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Masahiro Yamada , Arun Nagendran , Miquel Raynal Subject: Re: [PATCH] staging:mt29f_spinand: MT29F2G failing as only 16-bit arguments and variables used for addressing. Message-ID: <20180806134648.2976de9e@bbrezillon> In-Reply-To: <20180801120551.ju6zhxhoef6w5zim@mwanda> References: <1533093861-9761-1-git-send-email-goodwater.wu@gmail.com> <20180801120551.ju6zhxhoef6w5zim@mwanda> 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 Hi Dan, On Wed, 1 Aug 2018 15:05:51 +0300 Dan Carpenter wrote: > On Wed, Aug 01, 2018 at 11:24:19AM +0800, Jheng-Jhong Wu wrote: > > For NAND flash chips with more than 1Gbit (e.g. MT29F2G) more than 16 bits > > are necessary to address the correct page. The driver sets the address for > > more than 16 bits, but it uses 16-bit arguments and variables (these are > > page_id, block_id, row) to do address operations. Obviously, these > > arguments and variables cannot deal with more than 16-bit address. > > > > Signed-off-by: Jheng-Jhong Wu > > This seems reasonable... It would be needed to make commit 6efb21d6d0e7 > ("staging:mt29f_spinand: MT29F2G failing as only 16 bits used for > addressing.") work. It also fixes a static checker warning. > > My only concern is that the mtd/nand code seems to use -1 as a magical > page_id. For example: Yes, -1 means "don't issue the row/page address cycles", though I don't think page can be -1 for NAND_CMD_READ{1,0} commands. Anyway, if you want this patch merged to fix a static checker warning, I'm fine with that. In any case, I still plan to send a patch removing this driver for v4.20, so, anyone using this driver should start testing the new SPI NAND driver (drivers/mtd/nand/spi) and tweak/fix the new implementation if needed. Regards, Boris