From patchwork Fri May 11 07:58:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: IKEGAMI Tokunori X-Patchwork-Id: 911802 X-Patchwork-Delegate: boris.brezillon@free-electrons.com 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=allied-telesis.co.jp Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="XMPKJ9Qd"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=atjp.onmicrosoft.com header.i=@atjp.onmicrosoft.com header.b="RQRYEjRu"; 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 40j2XW5Mpsz9s0y for ; Fri, 11 May 2018 17:58:35 +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:Subject:To :From: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=QJpVkerVNlpHdqDjg0t5MKSsOqWK7sk/JWxDs/cx7XQ=; b=XMPKJ9Qdxmrtqo mI5heGT1n3YPFhqAmOACcWCbDQUDPxCx3KPTyN4D5AXAgEjGEYKR38opajOdwyenBjBdaLqU1+HHJ pYP5EDxy5qr2PHw+xeiTqeuprCc5TnD4bwxcbIF2pm0oc1/MgB8ndsFD/sAbvtVJK3QlFG9lJoBRs ANWTE/ySNFxYe5xx6JXZX7D7ALL2W+rQBleRdilrHNvSPpKM44XQl8t8k71F9K2j2lEdW6NBeUxeX kPLSh0ahpe+NB3iCOx6OZfAyQ9RpjaB17+IISR//VEXv7QJq5U8FfsbvPSlZqrlm3Z6X8OOUQDa+8 7DOrfuk82jG5lxTwlb3Q==; 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 1fH2wb-0005pn-Rv; Fri, 11 May 2018 07:58:25 +0000 Received: from mail1.bemta12.messagelabs.com ([216.82.251.2]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fH2wX-0005lt-S3 for linux-mtd@lists.infradead.org; Fri, 11 May 2018 07:58:24 +0000 Received: from [216.82.251.38] (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits)) by server-2.bemta-12.messagelabs.com id F1/C4-15744-11D45FA5; Fri, 11 May 2018 07:58:09 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA1WSWUwTURSGe3un7WAYHDY5VDBaNSgCisFkYly jD5MYlxhNTF0HHduGluJM1RofrMQoULWaRlFURAWjRowpLmWRFMQYUQM2bpiIEHCrC6SID4Jg h6nb23/P95/z35McEse0qLUkb7fxQi5n1qlHEVk+F59OL+3Xz3haOZmpb3YRjO/DOYLp6HBqm KbWSszcdfRg5uhlN2Zq8y9qmHt17ZhxV39GCyLYrp8fCLb06m622/MEsdUlrzVs1aVUtqp8D9 tWuo0NPC3VrCD1KlNuttW+SWU8UdyF8+qi7QOuN9iBXkUVoVFkDF2A4IC3XF2EIkigd0N9c5d KAkAPI8h3dSPZ5cbgKx9SSg+CdmF4EzxDyOS4Eiq+3FHKjw4E/lNeQhqmpmdB7duBER1Hb4YL r1tHTJgeVMKPg5UjibH0amj31SDZpAe306+SdQY43bdCdTKUNxlevZwkSYpeB31VGsmB6GRw1 +xVShrTCeB3nw/vQEN5XQuWdTx87BpSyf4N8MhTgOT6BLjhLAz7k8F/1onknb0E3H5xJNycDr 3HjmEZ5CPw9rYTMkiF/NqicPccONDwViN9DugceNxmkMtrYf+3JqWsx8GVQ52EPOcyhs7Gd+G AJCircOEjaHrJP0vIOg3KaoNhPQ0unvuEJU3R0fDgZDdRhograIrICzt4IT0zKyNbMBmMNgtn MqdnZs7MsPCiyBl4M5ctZmy2WjwodGh7FArkRd+rFzeiRFKpi6eeL+jXx0RlW7fsMnKicaOw3 cyLjSiJJHVADS8JsWiBN/D2rSZz6Fp/YyAjdXGUSsKUmMdZRJNBRs1ogjaBCkqAloBxe+6ftt 937kfJ2lgKKRSKmMg8XrCYbP/zAEogkS6WckpTIk25tj/TA6FgZSi44VmfFGzj/iKtA51OeV/ 4VZ3WsNrzMNGzf+318Z3FHv1AS+U+Bz/RAisPL6+P46PvVzT8WG/NSwwEPQWt3MaEcWuKxRIq 59mna3bb4Ox56+yis2nK7JYcYTQzdeV8nZ3a0KO9NqYzsLAja/hnfFuKI+rhorabQSvrm2jcW d+7qmZsU9a+lGWT5pJDOkI0cpmpWBC5X7ou+TziAwAA X-Env-Sender: ikegami@allied-telesis.co.jp X-Msg-Ref: server-16.tower-163.messagelabs.com!1526025488!155565482!1 X-Originating-IP: [52.192.143.101] X-SYMC-ESS-Client-Auth: outbound-route-from=pass X-StarScan-Received: X-StarScan-Version: 9.9.15; banners=-,-,- X-VirusChecked: Checked Received: (qmail 64950 invoked from network); 11 May 2018 07:58:08 -0000 Received: from mo.allied-telesis-co-jp.hdemail.jp (HELO mo.allied-telesis-co-jp.hdemail.jp) (52.192.143.101) by server-16.tower-163.messagelabs.com with SMTP; 11 May 2018 07:58:08 -0000 Received: by mo.allied-telesis-co-jp.hdemail.jp (hde-mf-postfix, from userid 504) id C0ACE294002; Fri, 11 May 2018 16:58:07 +0900 (JST) X-Received: from unknown (HELO mo.allied-telesis-co-jp.hdemail.jp) (127.0.0.1) by 0 with SMTP; 11 May 2018 16:58:07 +0900 X-Received: from mo.allied-telesis-co-jp.hdemail.jp (localhost.localdomain [127.0.0.1]) by mo.allied-telesis-co-jp.hdemail.jp (hde-ma-postfix) with ESMTP id 5785C1AC001; Fri, 11 May 2018 16:58:07 +0900 (JST) (envelope-from ikegami@allied-telesis.co.jp) Received: from JPN01-OS2-obe.outbound.protection.outlook.com (mail-os2jpn01lp0152.outbound.protection.outlook.com [23.103.139.152]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mo.allied-telesis-co-jp.hdemail.jp (hde-mf-postfix) with ESMTPS id 4669F294001; Fri, 11 May 2018 16:58:07 +0900 (JST) (envelope-from ikegami@allied-telesis.co.jp) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atjp.onmicrosoft.com; s=selector1-alliedtelesis-co-jp01e; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=P5i+7IJRQCIroq6GHHT5kWExDL1Bkho7SZdAnm+AuJ4=; b=RQRYEjRuZaFuY8zsj/WasogYHVaV6tfEquHWW6DFajb8GryWBinFxE6rDHlJQwcHUb5IRSSgaRA9Re4oWKCBEUF52f1P70b7j7XZuRXOQqhIXO/ioTl9kdMITtnb27pjEa9GkxRWvnOqnVQa74pvzAEXY1/tQX2XUfkhYJw+m4o= Received: from TY1PR01MB0954.jpnprd01.prod.outlook.com (10.167.157.141) by TY1PR01MB0237.jpnprd01.prod.outlook.com (10.161.135.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.755.16; Fri, 11 May 2018 07:58:05 +0000 Received: from TY1PR01MB0954.jpnprd01.prod.outlook.com ([fe80::495f:2227:40ea:9f08]) by TY1PR01MB0954.jpnprd01.prod.outlook.com ([fe80::495f:2227:40ea:9f08%13]) with mapi id 15.20.0755.012; Fri, 11 May 2018 07:58:05 +0000 From: IKEGAMI Tokunori To: IKEGAMI Tokunori , Boris Brezillon Subject: [PATCH v3] mtd: cfi_cmdset_0002: Change write buffer to check correct value Thread-Topic: [PATCH v3] mtd: cfi_cmdset_0002: Change write buffer to check correct value Thread-Index: AdPo/Wst0OHU5vaqT9+RpC6GXg6Akw== Date: Fri, 11 May 2018 07:58:05 +0000 Message-ID: Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [61.215.194.29] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; TY1PR01MB0237; 7:UqsQRZYmnWHDjsJfvNkBMKBs+w/P1FdzdGzxA8o4EW13Y08Nc6eWZDk98NG/maIYZQzSh4csaRZkaNHBAna0wGZ/0/G3SRpbKKWjSGefuJNiG7CtcUgY8t+Vhc81Xf8aGbQmN9OBMCk1SEJclrHaEOu4T0bXafJJqfba5NDERK295vmvxUM9UGP0Iwbx2vupfQbSLNMr3Nj9bZV81NG12RRs3mA34VzsvVc9v7K6WuOZaPWZYSsnVCs9ISHg+ThA; 20:GpvpHPj9lOFUymKQHdxPnQq/OjTRuYMwjFe1UnC+ImwXvtMg+zppNp0W4/nYi8+lpJbU2lCkM0C/ANwAldewzGE4ZwhTOuvLz6rld4E9UNX2O6UgXnH0yUyYrSViYG4WkfL45WW5R9zA2SuNzVS0Y5tuAaseB1WFekf4nTlDqOiYmVxOrDvIwkVXnubEDZ6YTTNlb17ev4R7k3w5OkzrJodbWwZkjX6AGpI7FO+SKb36kVeSMIJEG8cwOmiUzIK7 x-ms-exchange-antispam-srfa-diagnostics: SOS; x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(2017052603328)(7153060)(7193020); SRVR:TY1PR01MB0237; x-ms-traffictypediagnostic: TY1PR01MB0237: x-ld-processed: 1a8a37cf-9ecc-4cef-abb0-1ab01a15a6ad,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(85827821059158)(258649278758335)(58145275503218); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:TY1PR01MB0237; BCL:0; PCL:0; RULEID:; SRVR:TY1PR01MB0237; x-forefront-prvs: 06691A4183 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(346002)(39850400004)(376002)(396003)(39380400002)(199004)(189003)(14454004)(478600001)(105586002)(99286004)(7696005)(3660700001)(74316002)(4326008)(68736007)(2906002)(66066001)(33656002)(3280700002)(7736002)(8936002)(81166006)(8676002)(81156014)(5660300001)(5250100002)(106356001)(6116002)(74482002)(6436002)(305945005)(26005)(9686003)(316002)(25786009)(54906003)(6506007)(102836004)(110136005)(53936002)(486006)(97736004)(575784001)(86362001)(476003)(2900100001)(55016002)(59450400001)(3846002)(39060400002); DIR:OUT; SFP:1102; SCL:1; SRVR:TY1PR01MB0237; H:TY1PR01MB0954.jpnprd01.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:0; MX:1; received-spf: None (protection.outlook.com: allied-telesis.co.jp does not designate permitted sender hosts) x-microsoft-antispam-message-info: 2Lx/R3vwJzKws6ParlEhoG6O3W4Ir33d17Bbn61hdySAWeAKRNW1PmPwbfWIMAo9Ew7KwY628197LHWU3+Yr9Farw3E1NP46L4R0jDD5w2Y2F/D1n+F0ZI302AfKPwdpXiGrtBZBFtQqKTzKc/Dx/wC5yi+tbkCALUSizS3OhFp4QNIex9nKmlvKGPB6cYU3 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 454b005a-ae06-4a1a-afcb-08d5b714ed63 X-OriginatorOrg: allied-telesis.co.jp X-MS-Exchange-CrossTenant-Network-Message-Id: 454b005a-ae06-4a1a-afcb-08d5b714ed63 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 May 2018 07:58:05.1661 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 1a8a37cf-9ecc-4cef-abb0-1ab01a15a6ad X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY1PR01MB0237 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180511_005821_995543_0E17BEE2 X-CRM114-Status: GOOD ( 22.64 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [216.82.251.2 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.0 T_DKIMWL_WL_MED DKIMwl.org - Whitelisted Medium sender 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: Boris Brezillon , Richard Weinberger , Marek Vasut , PACKHAM Chris , "linux-mtd@lists.infradead.org" , Cyrille Pitchen , Brian Norris , David Woodhouse Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Tokunori Ikegami For the word write it is checked if the chip has the correct value. But it is not checked for the write buffer as only checked if ready. To make sure for the write buffer change to check the value. It is enough as this patch is only checking the last written word. Since it is described by data sheets to check the operation status. Signed-off-by: Tokunori Ikegami 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 --- No difference for the change itself from the original patch v1. But just updated the patch subject to add version as v3. Form the original patch v1 it is also changed to add Brian as Cc and the patch is sent to Boris-san as To. Note: This was changed from the second patch v2 and this v3 patch is not changed about this. This fix is required to resolve the flash write error caused on our products. This patch itself is not depended to other related patches to fix for the flash erase error. The flash erase error is not able to still reproduce at this moment. So I will do fix the flash erase error separately. But the flash write error can be reproduced and this fix can resolve it. So please review the patch again and if any problem please let me know. drivers/mtd/chips/cfi_cmdset_0002.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index 56aa6b75213d..5e9f2ca0a6c1 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c @@ -1879,7 +1879,7 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip, if (time_after(jiffies, timeo) && !chip_ready(map, adr)) break; - if (chip_ready(map, adr)) { + if (chip_ready(map, adr) && chip_good(map, adr, datum)) { xip_enable(map, chip, adr); goto op_done; }