ipq807x: 6.1: fix I/O WRITE_ZEROES errors on some eMMC devices
authorRobert Marko <robimarko@gmail.com>
Tue, 30 May 2023 21:38:56 +0000 (23:38 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Thu, 1 Jun 2023 17:23:25 +0000 (19:23 +0200)
commit10be819a16067cbc9520018eb6cb5acfe757eb4b
tree795c3776f404effc18b8ff5f31f5395da56417e5
parent4c5a9da8699a7982b8f03b28561f955d9d1313f1
ipq807x: 6.1: fix I/O WRITE_ZEROES errors on some eMMC devices

Linux 5.19 added a feature where if there is TRIM support being advertised
on eMMC kernel will use TRIM to offload erasing to zero.

However, like always there are eMMC IC-s that advertise TRIM and kind of
work but trying to use TRIM for offloading will cause I/O errors like:
[   18.085950] I/O error, dev loop0, sector 596 op 0x9:(WRITE_ZEROES) flags 0x800 phys_seg 0 prio class 2

So, lets utilize the kernel MMC quirks DB to disable TRIM for eMMC models
that are known to cause this.

This will fix the WRITE_ZEROES error on:
Qnap 301W which uses Micron MTFC4GACAJCN-1M
Zyxel NBG7815 which uses Kingston EMMC04G-M627

Tested-By: Enrico Mioso <mrkiko.rs@gmail.com> # NBG7815
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/ipq807x/patches-6.1/0132-mmc-core-disable-TRIM-on-Micron-MTFC4GACAJCN-1M.patch [new file with mode: 0644]
target/linux/ipq807x/patches-6.1/0133-mmc-core-disable-TRIM-on-Kingston-EMMC04G-M627.patch [new file with mode: 0644]