From patchwork Sat Nov 26 18:05:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 84303 Delivered-To: patch@linaro.org Received: by 10.182.1.168 with SMTP id 8csp788095obn; Sat, 26 Nov 2016 10:14:30 -0800 (PST) X-Received: by 10.84.210.40 with SMTP id z37mr31223015plh.32.1480184070147; Sat, 26 Nov 2016 10:14:30 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id g2si49459107pfj.214.2016.11.26.10.14.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 26 Nov 2016 10:14:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-mtd-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cAhSv-0001HI-IS; Sat, 26 Nov 2016 18:12:45 +0000 Received: from conuserg-11.nifty.com ([210.131.2.78]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cAhNm-000510-QU for linux-mtd@lists.infradead.org; Sat, 26 Nov 2016 18:07:30 +0000 Received: from grover.sesame (FL1-111-169-71-157.osk.mesh.ad.jp [111.169.71.157]) (authenticated) by conuserg-11.nifty.com with ESMTP id uAQI6Uec018512; Sun, 27 Nov 2016 03:06:38 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com uAQI6Uec018512 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1480183598; bh=zyBhRAtwquG7ahCUvqbH4erj4I7s8EZHWR9PreuPxP0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CsNQD/USwQ+jN68UmcEH+3Yr1ia0lnC6bUau9cTax7pxi0oMS+vPjRtz+VxgwlVfX 0NFKmuiMjI/wBadaJvc3ialmfETBOW4pLG+3vTW/hLuE11kCmGZTUgaCvH8moK+oVK UG/9gZ/to1xaHx6tYD6poSyjH8+/4EDS5jpNenAG+aZoDRC7FjmTtFmHzeryEGUB7i Rji5RGUGiVWnwH9AF/YW58aVJMLeJgRhlEyI1s2/FByHMZphy5Etk1Q8+ULixb2pLZ DVBE0p28WwCb/VGZOaZUY22AC2aCsADX38dEM3GJ/ucFZSv0WL5ixHC6/+bl6O/RZ9 j/GmL2zwZbjlw== X-Nifty-SrcIP: [111.169.71.157] From: Masahiro Yamada To: linux-mtd@lists.infradead.org Subject: [PATCH 06/39] mtd: nand: denali: fix write_oob_data() function Date: Sun, 27 Nov 2016 03:05:52 +0900 Message-Id: <1480183585-592-7-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1480183585-592-1-git-send-email-yamada.masahiro@socionext.com> References: <1480183585-592-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161126_100727_460568_DFC31A18 X-CRM114-Status: UNSURE ( 8.30 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.2 (-) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_L4 RBL: Bad reputation (-4) [210.131.2.78 listed in bl.mailspike.net] 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -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 RCVD_IN_MSPIKE_BL Mailspike blacklisted X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Boris Brezillon , Marek Vasut , Richard Weinberger , linux-kernel@vger.kernel.org, Masahiro Yamada , Cyrille Pitchen , Brian Norris , David Woodhouse MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org The function write_oob_data() performs write access to the spare area, so passing "false" to the 3rd argument (transfer_spare) of denali_send_pipeline_cmd() is weird. Actually, the transfer_spare is ignored for MAP10 operation with SPARE_ACCESS (0x41), so this change has no impact on the hardware behavior. Yet, we should keep our code to make sense. Signed-off-by: Masahiro Yamada --- drivers/mtd/nand/denali.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c index 61e1e33..b2b050b 100644 --- a/drivers/mtd/nand/denali.c +++ b/drivers/mtd/nand/denali.c @@ -834,7 +834,7 @@ static int write_oob_data(struct mtd_info *mtd, uint8_t *buf, int page) denali->page = page; - if (denali_send_pipeline_cmd(denali, false, false, SPARE_ACCESS, + if (denali_send_pipeline_cmd(denali, false, true, SPARE_ACCESS, DENALI_WRITE) == PASS) { write_data_to_flash_mem(denali, buf, mtd->oobsize);