Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2990590imu; Mon, 19 Nov 2018 09:04:11 -0800 (PST) X-Google-Smtp-Source: AJdET5c5jvjtD6tvdBWDikw3aXbI/nxwTTZrhOr+CEOsamni/JjLVqF4SbiSn+tyhpEQiNkXhV+Y X-Received: by 2002:aa7:818a:: with SMTP id g10-v6mr23669704pfi.153.1542647051169; Mon, 19 Nov 2018 09:04:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542647051; cv=none; d=google.com; s=arc-20160816; b=JC/28pgaFJSFp9kzpuyiEdqXl10aJpuJw94VoJUs+Vin2T+9Uuw/wWzecvLQSBleic 2WUm+rrO3370m6yGYLN9T0YKr1G3M5R1Gc3ORca0k07LpD6UZuGYuc7WypDWoUwp10Df 6IDNK9DCWT6h1vfQixhFJOk3+MCvEhSg/TkfSqD28Tn7qOXr4MzNNWYGxyesRG6Km8VX KZQ5OQoksZjVjFj+pUqWqtYzBeE+p9KqMD12cu5Yqo8WIsFieG9wGrDLH/VuXwTvvlUC 1J34R3tqGJb7bXt08fOI0/LnVfr3r9tU86ZyBKcVxp88frmT02qYMM+1c2iYYUVZQXCh Rj/w== 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=F4d+dgkpWG9LAL76faieFUs67+WWXR30IVaksUcLv3o=; b=e9TlzDLDfNZA863PQMBTDZbbbIgot1eNkoPjZNxRVc9VJIQAujiTwYPZjVpZ6BTWJL MgyAca4LB+DUO63OeAQr4V4aPHPT2H3ZW/a3hbKhAg2rcWGE0ZMBzl8RS0ToqkHW8QTQ d1aBNPIwVal47UhVPdWeIsSjpT6vev3fssAX8DgIfhHQ0e2OykgWQCqdLZ+p5T7FYltj VI2ejH6lA/PK9Y+t4oCpD+CyOKcxDA6DrV6pUvAX4JLNOo1Hn9O4thGc/KW7wo7xwq/H hfR3ALYGr3Xa/2T6ijQvmIyPN0pcGt1iRiEIch9/cVd6SlGHdTEAPzf2IJzAl0aqTXkd 4HIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nyls+kHa; 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 n5si37461754pgl.485.2018.11.19.09.03.56; Mon, 19 Nov 2018 09:04:11 -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=nyls+kHa; 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 S2405697AbeKTDZy (ORCPT + 99 others); Mon, 19 Nov 2018 22:25:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:39208 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404876AbeKTDZw (ORCPT ); Mon, 19 Nov 2018 22:25:52 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (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 CE7AF223CB; Mon, 19 Nov 2018 17:01:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542646896; bh=WBasXXLUQu0Nx6/MVQd9Ftbiq/YKv1YBJrlSwTT0CEw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nyls+kHaZZpVoPELUO80eJzANEd19Nw/JWxgqYWxUFJYCEdU5WO+RcrG/eNbz3C/l 0FXbtPJh8AkqT6C0P8n6G/m27hgWomhF1DqFn8JNbZ7mbCDVw3C0eCcBnxuhZkcbVW AEiFh+ianvLbmb50xxJpUInDMuC5ZTMSBLBiItes= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Robert Jarzmik , Arnd Bergmann , Boris Brezillon Subject: [PATCH 4.4 132/160] mtd: docg3: dont set conflicting BCH_CONST_PARAMS option Date: Mon, 19 Nov 2018 17:29:31 +0100 Message-Id: <20181119162643.098014111@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119162630.031306128@linuxfoundation.org> References: <20181119162630.031306128@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.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann commit be2e1c9dcf76886a83fb1c433a316e26d4ca2550 upstream. I noticed during the creation of another bugfix that the BCH_CONST_PARAMS option that is set by DOCG3 breaks setting variable parameters for any other users of the BCH library code. The only other user we have today is the MTD_NAND software BCH implementation (most flash controllers use hardware BCH these days and are not affected). I considered removing BCH_CONST_PARAMS entirely because of the inherent conflict, but according to the description in lib/bch.c there is a significant performance benefit in keeping it. To avoid the immediate problem of the conflict between MTD_NAND_BCH and DOCG3, this only sets the constant parameters if MTD_NAND_BCH is disabled, which should fix the problem for all cases that are affected. This should also work for all stable kernels. Note that there is only one machine that actually seems to use the DOCG3 driver (arch/arm/mach-pxa/mioa701.c), so most users should have the driver disabled, but it almost certainly shows up if we wanted to test random kernels on machines that use software BCH in MTD. Fixes: d13d19ece39f ("mtd: docg3: add ECC correction code") Cc: stable@vger.kernel.org Cc: Robert Jarzmik Signed-off-by: Arnd Bergmann Signed-off-by: Boris Brezillon Signed-off-by: Greg Kroah-Hartman --- drivers/mtd/devices/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/mtd/devices/Kconfig +++ b/drivers/mtd/devices/Kconfig @@ -208,7 +208,7 @@ comment "Disk-On-Chip Device Drivers" config MTD_DOCG3 tristate "M-Systems Disk-On-Chip G3" select BCH - select BCH_CONST_PARAMS + select BCH_CONST_PARAMS if !MTD_NAND_BCH select BITREVERSE ---help--- This provides an MTD device driver for the M-Systems DiskOnChip