Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2999258imu; Mon, 19 Nov 2018 09:10:26 -0800 (PST) X-Google-Smtp-Source: AJdET5ej9u2MuatUocaU1O1eedYaMDTd/GL8rF6w0EimsYDrTjPLF0kEzSd2FNdfhzL9VuxJZ5gy X-Received: by 2002:a63:2447:: with SMTP id k68-v6mr20236085pgk.156.1542647426589; Mon, 19 Nov 2018 09:10:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542647426; cv=none; d=google.com; s=arc-20160816; b=BvWsZKMvgTji7jHrWPWyiNruLHlWi2d9LcLjwr9pu6WOyF48VfbZXUWMRNFw+iOtEB ebUlZw32c1hAWepH/hW5cOLLVkg9NN5LsJNqmHhnCd7MY8WxABxJcp4wNTVMoRcDU6op sPuvnPIZFV9BYDt3U3cLpUdybX9z6/f+nx/m4AJmvYd/yY+Zro/VFEKKUsHjsXKLh6U+ 18kxvLU/oc1zs1P68abPugPURiYDNdCXUql17RYOloAA2eTW4Q20gFm1FibH9aM49EQk 2IUSVzIJclOVBjMlfsOXE/lKvltVg+m7w2KfJnzUA5vh0Is7zlZtHO8kS66/zCIMHX7Q N9Mw== 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=tOSdNodFOGPh+0XWH8yigtAfOOAHIsf0wmDU5b9g/PE=; b=nl01rO0VXKil1KNkCaZ4BX67N15irVfLD0NCM+qdzbzVAB49TMG0IclA0VMcZBD8jT xOgJnodM3Aeb1nHL9kZA5s8q6R1QFcg118srPWo+eyhY6Eo4siuCPZDU3Z+NDWZNz5Lu BjtDFVhwH4zUy15W0Rk9mUD3oGj9yN0sR+IPIjXHwTKrUDoroFNL6McqK8Z1dcmeyjNh VUnzwJpR5P7+e5587nVaROe+iq/MYaB40Ft3SKRxKC7hpANjUbx0v1ssEv+eEEMWSzar TL3kGDQE1alVBk8/HJ0S6yxRp4jUYBjFEWHFUrevySbIXFd9KM2Awkpm7mMNnLS1pYzJ JINw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=O3HOeVWp; 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 j184si12256628pfg.160.2018.11.19.09.10.07; Mon, 19 Nov 2018 09:10:26 -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=O3HOeVWp; 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 S2407224AbeKTDbF (ORCPT + 99 others); Mon, 19 Nov 2018 22:31:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:46346 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405956AbeKTDbE (ORCPT ); Mon, 19 Nov 2018 22:31:04 -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 1226E2146D; Mon, 19 Nov 2018 17:06:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542647206; bh=gcLfoWP5bDcA1dwcMp7aF3wcYXNz7H/VcyBTUJTbZm4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O3HOeVWp4tiac43RqGus1XYnX5ial/lruwzT+9Kx05tyL5+yiKGdwWRzVW9+2V4hL BPzRwNFVh8vsC/k1He07s2HqyfIX5aFH7vpP2/JLpslwVaUpOjfeAA4MEA4KmmWvQ2 8hHOL3S2Xu30VMPKIEBw+CVmBukZWZAj2RCVhn+s= 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 3.18 69/90] mtd: docg3: dont set conflicting BCH_CONST_PARAMS option Date: Mon, 19 Nov 2018 17:29:51 +0100 Message-Id: <20181119162631.432666788@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119162620.585061184@linuxfoundation.org> References: <20181119162620.585061184@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 3.18-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 @@ -200,7 +200,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