]> git.baikalelectronics.ru Git - kernel.git/commit
libata: implement ATA_HORKAGE_MAX_TRIM_128M and apply to Sandisks
authorTejun Heo <tj@kernel.org>
Wed, 2 Sep 2020 16:32:45 +0000 (12:32 -0400)
committerJens Axboe <axboe@kernel.dk>
Wed, 2 Sep 2020 17:31:23 +0000 (11:31 -0600)
commit43cefade17887d0478256bd5ba6ac96d05a93e89
tree8658ea2acbc2338358ea2f86d1ad1d05c5c83c6d
parent4c4f55da54d06b557eba89d39e062e3c6f293a3a
libata: implement ATA_HORKAGE_MAX_TRIM_128M and apply to Sandisks

All three generations of Sandisk SSDs lock up hard intermittently.
Experiments showed that disabling NCQ lowered the failure rate significantly
and the kernel has been disabling NCQ for some models of SD7's and 8's,
which is obviously undesirable.

Karthik worked with Sandisk to root cause the hard lockups to trim commands
larger than 128M. This patch implements ATA_HORKAGE_MAX_TRIM_128M which
limits max trim size to 128M and applies it to all three generations of
Sandisk SSDs.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Karthik Shivaram <karthikgs@fb.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/ata/libata-core.c
drivers/ata/libata-scsi.c
include/linux/libata.h