From patchwork Tue Jul 10 14:50:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 942014 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="B+jrMRfn"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41Q4rm25lyz9s0W for ; Wed, 11 Jul 2018 00:51:04 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:From:To: Subject:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=89RmD0ZJsn9GY3sFcsmEqJZDIOeHrikS8jvUNdORMzs=; b=B+jrMRfnZNQakh I8q8Zc7+KXwul2IGvkdKUBBNPpuEIy7ysFVF/bbni0rrcnRbHQ4p1iWzHuVdpQU0NVsC67zmSeYIf 3btDtV0pltp4ooMTZxo3Ko3frFAyxQEEL4Wu6A9jemPEJyrHBL6Wqdgk/1u1ERttI9Cz9Vr2qHch/ g4bKRc4tELt4Q9fgqvzc/qfx2qoY6C8LVJ5EQPEPZkGpAkpRo9UPmjcOjyx43/pnBI619EEsBNkzN busiPFnS0ei/uJdmu6P7vdjX8hPwH0q1vUADf2HHxlfdMHSD3Rs68xM2kNLDWPNGvPUcm1JSfp9WT qbt/eOcDRdzmTQbaEF4A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fctye-0008Bc-DG; Tue, 10 Jul 2018 14:50:52 +0000 Received: from mail.linuxfoundation.org ([140.211.169.12]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fctya-00089x-3R for linux-mtd@lists.infradead.org; Tue, 10 Jul 2018 14:50:49 +0000 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 3075CE2C; Tue, 10 Jul 2018 14:50:37 +0000 (UTC) Subject: Patch "mtd: cfi_cmdset_0002: Change definition naming to retry write operation" has been added to the 3.18-stable tree To: Joakim.Tjernlund@infinera.com, boris.brezillon@bootlin.com, boris.brezillon@free-electrons.com, chris.packham@alliedtelesis.co.nz, computersforpeace@gmail.com, cyrille.pitchen@wedev4u.fr, dwmw2@infradead.org, gregkh@linuxfoundation.org, ikegami@allied-telesis.co.jp, linux-mtd@lists.infradead.org, marek.vasut@gmail.com, richard@nod.at From: Date: Tue, 10 Jul 2018 16:50:34 +0200 Message-ID: <153123423445159@kroah.com> MIME-Version: 1.0 X-stable: commit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180710_075048_171728_EB5D9946 X-CRM114-Status: GOOD ( 11.68 ) X-Spam-Score: 0.2 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [140.211.169.12 listed in list.dnswl.org] 2.5 SORTED_RECIPS Recipient list is sorted by address -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: stable-commits@vger.kernel.org Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org This is a note to let you know that I've just added the patch titled mtd: cfi_cmdset_0002: Change definition naming to retry write operation to the 3.18-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: mtd-cfi_cmdset_0002-change-definition-naming-to-retry-write-operation.patch and it can be found in the queue-3.18 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. From 85a82e28b023de9b259a86824afbd6ba07bd6475 Mon Sep 17 00:00:00 2001 From: Tokunori Ikegami Date: Wed, 30 May 2018 18:32:27 +0900 Subject: mtd: cfi_cmdset_0002: Change definition naming to retry write operation From: Tokunori Ikegami commit 85a82e28b023de9b259a86824afbd6ba07bd6475 upstream. The definition can be used for other program and erase operations also. So change the naming to MAX_RETRIES from MAX_WORD_RETRIES. Signed-off-by: Tokunori Ikegami Reviewed-by: Joakim Tjernlund Cc: Chris Packham Cc: Brian Norris Cc: David Woodhouse Cc: Boris Brezillon Cc: Marek Vasut Cc: Richard Weinberger Cc: Cyrille Pitchen Cc: linux-mtd@lists.infradead.org Cc: stable@vger.kernel.org Signed-off-by: Boris Brezillon Signed-off-by: Greg Kroah-Hartman --- drivers/mtd/chips/cfi_cmdset_0002.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Patches currently in stable-queue which might be from ikegami@allied-telesis.co.jp are queue-3.18/mtd-cfi_cmdset_0002-change-erase-functions-to-retry-for-error.patch queue-3.18/mtd-cfi_cmdset_0002-change-erase-functions-to-check-chip-good-only.patch queue-3.18/mtd-cfi_cmdset_0002-change-definition-naming-to-retry-write-operation.patch --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c @@ -42,7 +42,7 @@ #define AMD_BOOTLOC_BUG #define FORCE_WORD_WRITE 0 -#define MAX_WORD_RETRIES 3 +#define MAX_RETRIES 3 #define SST49LF004B 0x0060 #define SST49LF040B 0x0050 @@ -1645,7 +1645,7 @@ static int __xipram do_write_oneword(str map_write( map, CMD(0xF0), chip->start ); /* FIXME - should have reset delay before continuing */ - if (++retry_cnt <= MAX_WORD_RETRIES) + if (++retry_cnt <= MAX_RETRIES) goto retry; ret = -EIO; @@ -2104,7 +2104,7 @@ retry: map_write(map, CMD(0xF0), chip->start); /* FIXME - should have reset delay before continuing */ - if (++retry_cnt <= MAX_WORD_RETRIES) + if (++retry_cnt <= MAX_RETRIES) goto retry; ret = -EIO;