Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3336103imu; Sun, 11 Nov 2018 12:39:10 -0800 (PST) X-Google-Smtp-Source: AJdET5cjdlGRIsTN4WC6sF0irH79UrPvbe3o8lwPyXwzEUgcpzajzm7eaEFJjjJN7R+PwxfGK7rb X-Received: by 2002:a62:34c5:: with SMTP id b188-v6mr18215617pfa.65.1541968750344; Sun, 11 Nov 2018 12:39:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541968750; cv=none; d=google.com; s=arc-20160816; b=Gpoz9V/Ijh4jr7nf9f+fmvewMv2F6Zwic3lIovQ21+yThNBOwyCm4/lboHoW9Aap7/ GR2a2wODpKtteYH69BeeGao+5WimhVjUzCi3B29bHqGmrDJcEKDrhSzlSjzXkSE1vzMY jrV/EW2Lm7Zk20ZGPoku/R8K3rzEwDl1olakSLaFg1JXjjYAFLctZbtrN1xpvHdh2iOr DoC8LEwcLkFHQ9HTey12veRa0T60Qe0cE93GZHhvygHlJ0Za86EX4XNDIOhMi66HbLi7 C66PobWSh9wUGH3DqW5jXWphxDZ3+319gBqp5Jbe+MpxbQ1T/KiMUXIi8o8X7p9WzKbx 7RXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=i86/SPHceFqKU1TlZ9xLtO02Z1RRmj5tO632Oq49p5A=; b=lF0do+5CGL26HlwdKQuBZP1UkndpUhzK6LMqXki/xY0foids1zq7hUSUIvKlZRqE2L kGXuavR+wK5HmgHqvmaNKDRkEUNEuN3U3bwmS4iioRmXknd1qxgBXgmuixXJulo36gi6 v33QaknZnAITjf1bH1h4IjeeX4BAmGoJ/yRFqLpDH5uhFJUd9e7YjSdmlw2idhUgv2IX T4JUDg51Vbkj8ulDoDfWHtCinoxHZbo+n8/jJbYbSNzE8z9V/UDOoDvCLm18AdWSFJyZ LxE3bpHVFy3CQFO+37MIRMsDuFYzuA2+bDaY1n36nRbeMeK9kEcHJUfjAZnGQWhUsG++ LCFA== ARC-Authentication-Results: i=1; mx.google.com; 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 v9si13923440pgo.23.2018.11.11.12.38.55; Sun, 11 Nov 2018 12:39:10 -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; 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 S1731771AbeKLG16 (ORCPT + 99 others); Mon, 12 Nov 2018 01:27:58 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:49616 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730014AbeKLFsJ (ORCPT ); Mon, 12 Nov 2018 00:48:09 -0500 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLvsT-0000l9-BG; Sun, 11 Nov 2018 19:58:37 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gLvsQ-0001UU-IY; Sun, 11 Nov 2018 19:58:34 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Boris Brezillon" , linux-mtd@lists.infradead.org, "Tokunori Ikegami" , "Chris Packham" , "Brian Norris" , "Marek Vasut" , "Boris Brezillon" , "Cyrille Pitchen" , "David Woodhouse" , "Joakim Tjernlund" , "Richard Weinberger" Date: Sun, 11 Nov 2018 19:49:05 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 096/366] mtd: cfi_cmdset_0002: Change write buffer to check correct value In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.61-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Tokunori Ikegami commit dfeae1073583dc35c33b32150e18b7048bbb37e6 upstream. 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 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 Signed-off-by: Boris Brezillon Signed-off-by: Ben Hutchings --- drivers/mtd/chips/cfi_cmdset_0002.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c @@ -1541,7 +1541,7 @@ static int __xipram do_write_buffer(stru if (time_after(jiffies, timeo) && !chip_ready(map, adr)) break; - if (chip_ready(map, adr)) { + if (chip_good(map, adr, datum)) { xip_enable(map, chip, adr); goto op_done; }