Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2959169imu; Mon, 19 Nov 2018 08:38:17 -0800 (PST) X-Google-Smtp-Source: AJdET5eDh/brZ8XjqAZHjNpkWSF4L31zU3+aHanszQRIuo17O+8UrCzV52d95+Sniu/Do8JQ2WlD X-Received: by 2002:a62:e201:: with SMTP id a1mr10948028pfi.75.1542645497044; Mon, 19 Nov 2018 08:38:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542645497; cv=none; d=google.com; s=arc-20160816; b=xZtfBpvImpFjaK4IN7JXLCdSFr31pvpTY7BhQhptw0hHaTo5AadBr/ebILj2DncEQq p99xNH5ve0QLMV3t55NHPP8SCwDiZugvwLs8QtnOWePAaS6oYC1OM3tUvmXy3FpcuCwT swIZngUfiEuwZBIlE1k0Vgoe/ZYsAcpMLKPCAPXV8Ta4p1COZrP/4pkTnm7p9chW6yJb Zf44Abv2os4qj/pavuUc7YQt4pE2CfB0uX3UqvbRZyvhcMncKZqgB7Ed5KErWJyUCV96 W4wlBCjx5YndI+vLcQGM1grRlDNIVqB7cBDPcgXHyTQwXxPnuYzlPc8rzsrJ8aEOF1sh Dulg== 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=WiHYSlJPDHnUIVi+Mwoo8+AxeS0qoMfXTi/GIkBp4rs=; b=TfUtySGIiqiq/fqt8ddlhllqczG2zAuAN6Oik4RBbe7OBrA3OaxIhNflNf3p+fFJbM JUhlvx1GgAxXA4Ir6CrNEn7BaDNB2QLHHYxXsKFe7YfihkVijhyvgQ3r8kIihEaXFEQR Drvzac29U4bxmCkJtWRHniMKYa0l2ptaGjJkbdxk2kehc9ZEjlWFOj12uKl2aM88inWZ FOSCqe7JibWfo/mXNztRq8eTCxlvs1fdFyQfhcldxX+DtVsoowp0PlKK6fHeAFp6N8z7 jBjOirJBzYT/jmq4l7trZFiAyqHxgs0JHTwF1eDhZO1Kyrph5+kNgm/2W7EutvjHuaIA IbNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wvosXdaG; 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 f7si39954660pga.87.2018.11.19.08.38.01; Mon, 19 Nov 2018 08:38:17 -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=wvosXdaG; 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 S1731990AbeKTDAv (ORCPT + 99 others); Mon, 19 Nov 2018 22:00:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:60766 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730931AbeKTDAu (ORCPT ); Mon, 19 Nov 2018 22:00:50 -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 2B9D12086A; Mon, 19 Nov 2018 16:36:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542645401; bh=r5u2/Povbih89m9EuPPtbt1AX4g37RC3p2OZo2wZinE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wvosXdaGuCy0ETICAc8/hGSth+aZSpsiL30uw8f/MWI2TZcixCmJPuDewLPfKrx2F 35xYmbT4W/5EZFgCGkPnE9yrpTNUamtXcLYlcUX1n7PJlv54iogMbJYIvAyDGFvrgk 9lMu2COv4Sv9CwSZ1VYatpDsJ3Af4Ie34owZALF8= 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.19 110/205] mtd: docg3: dont set conflicting BCH_CONST_PARAMS option Date: Mon, 19 Nov 2018 17:26:57 +0100 Message-Id: <20181119162634.502205932@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119162616.586062722@linuxfoundation.org> References: <20181119162616.586062722@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: 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 @@ -207,7 +207,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