From c9bacf667845e72d753237a41e30f9ded5d2ffd5 Mon Sep 17 00:00:00 2001 From: sinavir Date: Tue, 23 Jan 2024 13:23:07 +0100 Subject: [PATCH] phram: fix writebuffersize --- pkgs/kernel/default.nix | 1 + pkgs/kernel/phram-fix-missing-writebufsize.patch | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 pkgs/kernel/phram-fix-missing-writebufsize.patch diff --git a/pkgs/kernel/default.nix b/pkgs/kernel/default.nix index 4ddf1dd..abae57b 100644 --- a/pkgs/kernel/default.nix +++ b/pkgs/kernel/default.nix @@ -52,6 +52,7 @@ stdenv.mkDerivation rec { patches = [ ./cmdline-cookie.patch + ./phram-fix-missing-writebufsize.patch ./mips-malta-fdt-from-bootloader.patch ] ++ lib.optional (lib.versionOlder version "5.18.0") ./phram-allow-cached-mappings.patch; diff --git a/pkgs/kernel/phram-fix-missing-writebufsize.patch b/pkgs/kernel/phram-fix-missing-writebufsize.patch new file mode 100644 index 0000000..deea9ac --- /dev/null +++ b/pkgs/kernel/phram-fix-missing-writebufsize.patch @@ -0,0 +1,12 @@ +diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c +index 1bf192f229d7..74f89333a03e 100644 +--- a/drivers/mtd/devices/phram.c ++++ b/drivers/mtd/devices/phram.c +@@ -154,6 +154,7 @@ static int register_device(struct platform_device *pdev, const char *name, + new->mtd.type = MTD_RAM; + new->mtd.erasesize = erasesize; + new->mtd.writesize = 1; ++ new->mtd.writebufsize = 1; + + mtd_set_of_node(&new->mtd, np); +