summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Milburn <dmilburn@redhat.com>2015-07-13 11:48:23 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-08-03 09:29:04 -0700
commit3b1c86a973f2e665c1697d965e459bf1b6713825 (patch)
treeb8d133bcac7f4a76b36f33d15d04620153c51f59 /include
parent54150eb4cde1b758d788045d3ddc7ee336ce3d6d (diff)
libata: add ATA_HORKAGE_MAX_SEC_1024 to revert back to previous max_sectors limit
commit af34d637637eabaf49406eb35c948cd51ba262a6 upstream. Since no longer limiting max_sectors to BLK_DEF_MAX_SECTORS (commit 34b48db66e08), data corruption may occur on ST380013AS drive configured on 82801JI (ICH10 Family) SATA controller. This patch will allow the driver to limit max_sectors as before # cat /sys/block/sdb/queue/max_sectors_kb 512 I was able to double the max_sectors_kb value up to 16384 on linux-4.2.0-rc2 before seeing corruption, but seems safer to use previous limit. Without this patch max_sectors_kb will be 32767. tj: Minor comment update. Reported-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: David Milburn <dmilburn@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org> Fixes: 34b48db66e08 ("block: remove artifical max_hw_sectors cap") Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ata.h1
-rw-r--r--include/linux/libata.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h
index b666b773e111..533dbb6428f5 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -45,6 +45,7 @@ enum {
ATA_SECT_SIZE = 512,
ATA_MAX_SECTORS_128 = 128,
ATA_MAX_SECTORS = 256,
+ ATA_MAX_SECTORS_1024 = 1024,
ATA_MAX_SECTORS_LBA48 = 65535,/* TODO: 65536? */
ATA_MAX_SECTORS_TAPE = 65535,
diff --git a/include/linux/libata.h b/include/linux/libata.h
index f24e20ea9299..e0e33787c485 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -433,7 +433,7 @@ enum {
ATA_HORKAGE_ZERO_AFTER_TRIM = (1 << 22),/* guarantees zero after trim */
ATA_HORKAGE_NO_NCQ_LOG = (1 << 23), /* don't use NCQ for log read */
ATA_HORKAGE_NOTRIM = (1 << 24), /* don't use TRIM */
-
+ ATA_HORKAGE_MAX_SEC_1024 = (1 << 25), /* Limit max sects to 1024 */
/* DMA mask for user DMA control: User visible values; DO NOT
renumber */