Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752277AbdH2Kd1 (ORCPT ); Tue, 29 Aug 2017 06:33:27 -0400 Received: from smtprelay01.ispgateway.de ([80.67.18.13]:51956 "EHLO smtprelay01.ispgateway.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751932AbdH2Kd0 (ORCPT ); Tue, 29 Aug 2017 06:33:26 -0400 From: =?UTF-8?q?Lothar=20Wa=C3=9Fmann?= To: Boris Brezillon , Brian Norris , Cyrille Pitchen , David Woodhouse , Marek Vasut , Richard Weinberger , linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org Subject: [PATCH 0/2] mtd: nand: fix regression introduced by splitting off manufacturer dependent code Date: Tue, 29 Aug 2017 12:17:11 +0200 Message-Id: <1504001833-18097-1-git-send-email-LW@KARO-electronics.de> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Df-Sender: bHdAa2Fyby1lbGVjdHJvbmljcy5kZQ== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 688 Lines: 13 commit c51d0ac59f24 ("mtd: nand: Move Samsung specific init/detection logic in nand_samsung.c") introduced a regression for Samsung SLC NAND chips by skipping the initialization of chip->bits_per_cell that is done in nand_decode_ext_id() from which the manufacturer dependent code was extracted. The regression should also affect Hynix and Macronix chips whose code was separated out in further commits but which I cannot test. AMD/Spansion and Toshiba NAND are not affected, since they are calling nand_decode_ext_id() (which initializes bhip->bits_per_cell) in their .detect function. Fix the regression and add a warning to nand_is_slc() to prevent further regressions of this kind.