Skip to content

Commit

Permalink
Merge tag 'spi-nor/fixes-for-6.14-rc4' of https://git.kernel.org/pub/…
Browse files Browse the repository at this point in the history
…scm/linux/kernel/git/mtd/linux into mtd/fixes

Fix writes on SST flashes

Commit 18bcb4a ("mtd: spi-nor: sst: Factor out common write
operation to `sst_nor_write_data()`") introduced a bug where only one
byte of data is written, regardless of the number of bytes requested.
This causes the driver to use the incorrect write size for flashes using
the SST byte programming, and to spit out a warning.

# -----BEGIN PGP SIGNATURE-----
#
# iIoEABYIADIWIQQTlUWNzXGEo3bFmyIR4drqP028CQUCZ7NEiBQccHJhdHl1c2hA
# a2VybmVsLm9yZwAKCRAR4drqP028CTVnAP9krBOLfmlYO94PntaDscgjcehnxbuF
# PEQby8/KlEnX0gEA5K73/0oQIZUnHQ98E6ntAtKoYD5zGNAJaYDpw+66CAU=
# =5xea
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 17 Feb 2025 03:15:36 PM CET
# gpg:                using EDDSA key 1395458DCD7184A376C59B2211E1DAEA3F4DBC09
# gpg:                issuer "[email protected]"
# gpg: Good signature from "Pratyush Yadav <[email protected]>" [expired]
# gpg:                 aka "Pratyush Yadav <[email protected]>" [expired]
# gpg: issuer "[email protected]" does not match any User ID
# gpg: WARNING: The key's User ID is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 805C 3923 2FBE 108C 49E1  663C F650 3556 C11B 1CCD
#      Subkey fingerprint: 1395 458D CD71 84A3 76C5  9B22 11E1 DAEA 3F4D BC09
  • Loading branch information
miquelraynal committed Feb 19, 2025
2 parents 60255f3 + 539bd20 commit 1dbf602
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/spi-nor/sst.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ static int sst_nor_write_data(struct spi_nor *nor, loff_t to, size_t len,
int ret;

nor->program_opcode = op;
ret = spi_nor_write_data(nor, to, 1, buf);
ret = spi_nor_write_data(nor, to, len, buf);
if (ret < 0)
return ret;
WARN(ret != len, "While writing %zu byte written %i bytes\n", len, ret);
Expand Down

0 comments on commit 1dbf602

Please sign in to comment.