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 65AE7248895; Mon, 23 Jun 2025 13:17:30 +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=1750684650; cv=none; b=dlYCebUKz0Iq4m/oQinDiK6qWje0GVti4NjsN6eQryOTBhsOfjN8vJfDaC4KjIAlBEE8zpCMCi8PmUh7xqqYKKevEJxMRCAjCCreV+r3YBFNXXfRo8Lv9luK2jVSPeWw+8GKR5e4COYrFEKIr1pHVYNtwzClAPJXubIuO8Dif94= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750684650; c=relaxed/simple; bh=FZpIwM6BjxrfPqVYCx1fcch+lOdW3CU1ADzWRDd08eI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=n6sOOTWhJvMiFU2XZqDYOLizduS/G9cr2WA6kwz/3QV5XgisorxaVvwSb3Gyy1SsMVCGybK3YYjtriMuuWZNH82M0qV0V5TA8eXQBJie3GJEoPQzia/LHtNnJNEf+yzz/eRXK4BV7asNBDgPN+eKiOhLnM3V8ZWToAuQWOY1gwE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=bO3HiQ/5; 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="bO3HiQ/5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2781C4CEEA; Mon, 23 Jun 2025 13:17:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750684650; bh=FZpIwM6BjxrfPqVYCx1fcch+lOdW3CU1ADzWRDd08eI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bO3HiQ/57SL4s3rXpntHMjSkWyNfb/ywYWhOtH7hEv0LJMWPoYF3dcynZEB6CGjQU V3HqvbEJYHFR8+wjRnCf09ytlP3Rl+6B0OxPqUAOWidRrP+Q4zN84ONMSKhnqexpDI IEg85YvFB6jrzXWs5dQXWzgpL0oKDHjAS7CuGu8k= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Wentao Liang , Miquel Raynal Subject: [PATCH 6.15 147/592] mtd: rawnand: sunxi: Add randomizer configuration in sunxi_nfc_hw_ecc_write_chunk Date: Mon, 23 Jun 2025 15:01:45 +0200 Message-ID: <20250623130703.776740124@linuxfoundation.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250623130700.210182694@linuxfoundation.org> References: <20250623130700.210182694@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.15-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);