aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorMark Lord <liml@rtr.ca>2007-03-16 10:22:26 -0400
committerJeff Garzik <jeff@garzik.org>2007-04-28 14:16:01 -0400
commit5a5dbd18a7496ed403f6f54bb20c955c65482fa5 (patch)
tree031eec40ab42ac4ab04e59db539b8126ac31fb6d /include/linux/libata.h
parent1234010684bb9cde51125ec3d1c71054a9f24f47 (diff)
libata: add support for READ/WRITE LONG
The READ/WRITE LONG commands are theoretically obsolete, but the majority of drives in existance still implement them. The WRITE_LONG and WRITE_LONG_ONCE commands are of particular interest for fault injection testing -- eg. creating "media errors" at specific locations on a disk. The fussy bit is that these commands require a non-standard sector size, usually 520 bytes instead of 512. This patch adds support to libata for READ/WRITE LONG commands issued via SG_IO/ATA_16. Signed-off-by: Mark Lord <mlord@pobox.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 5a40a8d95114..12237d4b9f9b 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -427,6 +427,7 @@ struct ata_queued_cmd {
427 int dma_dir; 427 int dma_dir;
428 428
429 unsigned int pad_len; 429 unsigned int pad_len;
430 unsigned int sect_size;
430 431
431 unsigned int nbytes; 432 unsigned int nbytes;
432 unsigned int curbytes; 433 unsigned int curbytes;
@@ -1182,6 +1183,7 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc)
1182 qc->n_elem = 0; 1183 qc->n_elem = 0;
1183 qc->err_mask = 0; 1184 qc->err_mask = 0;
1184 qc->pad_len = 0; 1185 qc->pad_len = 0;
1186 qc->sect_size = ATA_SECT_SIZE;
1185 1187
1186 ata_tf_init(qc->dev, &qc->tf); 1188 ata_tf_init(qc->dev, &qc->tf);
1187 1189