Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2980482imu; Mon, 19 Nov 2018 08:56:24 -0800 (PST) X-Google-Smtp-Source: AJdET5cooFsy4JW3+2zwdQDH9TPCLB5uM+AoaZDs4ooxeTB58czI3p/FzjDag77Nk80vK5oGoFqb X-Received: by 2002:a17:902:481:: with SMTP id e1-v6mr23079810ple.132.1542646584112; Mon, 19 Nov 2018 08:56:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542646584; cv=none; d=google.com; s=arc-20160816; b=EasYsj/EGD3zx7AY6QM+u9viIaAnqCB+5vV+tMclEAXdvQ79nIp4zMv/moibe0jB8u RkWHxu4b+x9NemCx0bsRcmqN6EjwunhhaRZaOtg1Kj1cioqHWawB/ZyUlBQYu69AwRtc jKYgIfJXzg4Xkb5hq/E+2jp3Pcxb3nNmy/dT9CZfKTfhn/wsY3WIdxSUI+PlUG2ZGbcQ VqXvFqkgORqkWpwdjQ31mRQPfXEMMGhfeEpVJApt3bTQekwY4ho/24ku1/xPuTMb6E2g yDleI+o62oU8rlNgloZ7292VWB3N6VwsH1nJzMrjrmqdgXNVnCOft+9flsS1L8if4W70 fRUA== 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=FIn5d/+r+iUX+XREt+4qhn4USIEXE2MoHlzmp3Vzszk=; b=rFQOY1QrI9NUTDwOWp0K+X+03DpjcFVvivRi603fowZO4kys99zsPMFkb7ymp/dwlS RflkVS9GlP6SQ3tBwOicfMG1jwWTfdLKaBNvnPhJKLsGnqCKWpjD7uO85tEQ5Y8zxa6W AY7triSf1nbFViyuzazfK48UQ/ELB/Qu89bJST4ao8ScyzATB35Tr7Ygg0AkKoqguv+F JrL5wQq/F7UkfYwXHwlqsrj9TmqFzmCW3BxTjswd8d3vaOQcPuNYR6z+gm9ixxKdpJZX tjdMX9k41D2r6olW8f7B1CyC3S3j0G6RMQ3A1j4wzwSq5i1j85ecmsjd4Bj4iq+n1hzF TVcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Uj8e1pFE; 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 v2si39578372pgn.451.2018.11.19.08.56.09; Mon, 19 Nov 2018 08:56:24 -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=Uj8e1pFE; 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 S2403934AbeKTDSX (ORCPT + 99 others); Mon, 19 Nov 2018 22:18:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:57228 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390179AbeKTDSW (ORCPT ); Mon, 19 Nov 2018 22:18:22 -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 172372145D; Mon, 19 Nov 2018 16:54:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542646448; bh=J0NHeiqrdtdFejGMtA/mw72I9TE46gFCcJ5nYAchLPU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Uj8e1pFEgaRrTKTMnHxOJNfZW/YmeYw+a9KfqioF6MJ2qL4xwIm0KayxlPN4Zyx3p wylX93LqrZPldpXyOaPVkpbEAi7zWm77cgMKe9v868gfBVJMMd8n4h6OqKFwdIhCM+ gcv5KLqAHBkaHWsLHAbOwdBNpGyX8w29BDkOF+lI= 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.9 46/83] mtd: docg3: dont set conflicting BCH_CONST_PARAMS option Date: Mon, 19 Nov 2018 17:29:12 +0100 Message-Id: <20181119162621.652595802@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119162612.046511542@linuxfoundation.org> References: <20181119162612.046511542@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.9-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 @@ -196,7 +196,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