From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 906A74409; Mon, 23 Jun 2025 21:37:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750714642; cv=none; b=KzikdpQZ3+TwjKuM9XBMciJMp0D58hxjnTM6LkmybRHL00BdUkg6BqTnNTfyVbZoUjKVnC9JR7erPCQ2Sao2/IAK3475NCw1xtAjmHv00eaoHZp2xW6m5rjfVh0L1GguyrAZbr+RnX9F/I2KXsM39tVy7P8w66DKmQVSJjEHM4I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750714642; c=relaxed/simple; bh=HSAm9CTSf98U14MejWTeEmePrpTBIspyq7ae0ZUVyAg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ryEnKrdZ2PVYlLsLZJT/ZxCD65IoWWP8zrGY8Ph4TEqH8RFw5VHzVGPJeK1NYD9dP7sv5YtY4af4M8zM+JOP/yirOsEKl88Rm7zAr8PzAeMqXUR642yLX1p8nF23nKOEARKwFAxdpTGtHo2OGNlZpOVjX947PItXquD7WtbX1+U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=oQGtj/dM; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="oQGtj/dM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29617C4CEEA; Mon, 23 Jun 2025 21:37:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750714642; bh=HSAm9CTSf98U14MejWTeEmePrpTBIspyq7ae0ZUVyAg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oQGtj/dM4fhVuqjd1zXELjRJeAzdt3bnobU6qgiWXMnkSCtluihZeYrkjotKYttxP muU85FUSOmKwsklia5PCVcwjGWrNd/lw0z9Y6TeCJsIRiJ6yTqLZeA3zuUflKUd0ID b3s3tyRdv5GnCdojfghauQhkLjuIAK5DsakSwgKE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Wentao Liang , Miquel Raynal Subject: [PATCH 6.12 121/414] mtd: rawnand: sunxi: Add randomizer configuration in sunxi_nfc_hw_ecc_write_chunk Date: Mon, 23 Jun 2025 15:04:18 +0200 Message-ID: <20250623130645.095617339@linuxfoundation.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250623130642.015559452@linuxfoundation.org> References: <20250623130642.015559452@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Wentao Liang commit 44ed1f5ff73e9e115b6f5411744d5a22ea1c855b upstream. The function sunxi_nfc_hw_ecc_write_chunk() calls the sunxi_nfc_hw_ecc_write_chunk(), but does not call the configuration function sunxi_nfc_randomizer_config(). Consequently, the randomization might not conduct correctly, which will affect the lifespan of NAND flash. A proper implementation can be found in sunxi_nfc_hw_ecc_write_page_dma(). Add the sunxi_nfc_randomizer_config() to config randomizer. Fixes: 4be4e03efc7f ("mtd: nand: sunxi: add randomizer support") Cc: stable@vger.kernel.org # v4.6 Signed-off-by: Wentao Liang Signed-off-by: Miquel Raynal Signed-off-by: Greg Kroah-Hartman --- drivers/mtd/nand/raw/sunxi_nand.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/mtd/nand/raw/sunxi_nand.c +++ b/drivers/mtd/nand/raw/sunxi_nand.c @@ -1049,6 +1049,7 @@ static int sunxi_nfc_hw_ecc_write_chunk( if (ret) return ret; + sunxi_nfc_randomizer_config(nand, page, false); sunxi_nfc_randomizer_enable(nand); sunxi_nfc_hw_ecc_set_prot_oob_bytes(nand, oob, 0, bbm, page);