[Concept,v2,17/30] ext4l: Use the real crc16 implementation

Message ID 20260102005112.552256-18-sjg@u-boot.org
State New
Headers
Series ext4l: Add write support (part L) |

Commit Message

Simon Glass Jan. 2, 2026, 12:50 a.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

The crc16() stub always returns 0, which causes group-descriptor
checksum-verification to fail for filesystems using the old CRC16
checksum algorithm (gdt_csum feature without metadata_csum).

Replace the stub with U-Boot's real CRC16 implementation to allow
mounting these filesystems.

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---

(no changes since v1)

 fs/ext4l/ext4_uboot.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h
index 4cfe9e6de89..1c87e2a1181 100644
--- a/fs/ext4l/ext4_uboot.h
+++ b/fs/ext4l/ext4_uboot.h
@@ -2153,8 +2153,8 @@  struct fs_parse_result {
 /* ctype */
 #include <linux/ctype.h>
 
-/* crc16 */
-#define crc16(crc, buf, len)		(0)
+/* crc16 - use U-Boot's implementation */
+#include <linux/crc16.h>
 
 /* Timer and timing stubs */
 #define HZ				1000