aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorShaohua Li <shli@fb.com>2015-01-15 20:32:27 -0500
committerJens Axboe <axboe@fb.com>2015-01-23 16:19:04 -0500
commit12cb5ce101abfaf74421f8cc9f196e708209eb79 (patch)
treec30f73bca31bacf234398535ef500dcdb4ac4f09 /include/linux/libata.h
parenta4a1cc16a72fd957b4cc2bda12479117f5bec8f8 (diff)
libata: use blk taging
libata uses its own tag management which is duplication and the implementation is poor. And if we switch to blk-mq, tag is build-in. It's time to switch to generic taging. The SAS driver has its own tag management, and looks we can't directly map the host controler tag to SATA tag. So I just bypassed the SAS case. I changed the code/variable name for the tag management of libata to make it self contained. Only sas will use it. Later if libsas implements its tag management, the tag management code in libata can be deleted easily. Cc: Jens Axboe <axboe@fb.com> Cc: Christoph Hellwig <hch@infradead.org> Signed-off-by: Shaohua Li <shli@fb.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 2d182413b1db..f23454762717 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -821,10 +821,10 @@ struct ata_port {
821 unsigned int cbl; /* cable type; ATA_CBL_xxx */ 821 unsigned int cbl; /* cable type; ATA_CBL_xxx */
822 822
823 struct ata_queued_cmd qcmd[ATA_MAX_QUEUE]; 823 struct ata_queued_cmd qcmd[ATA_MAX_QUEUE];
824 unsigned long qc_allocated; 824 unsigned long sas_tag_allocated; /* for sas tag allocation only */
825 unsigned int qc_active; 825 unsigned int qc_active;
826 int nr_active_links; /* #links with active qcs */ 826 int nr_active_links; /* #links with active qcs */
827 unsigned int last_tag; /* track next tag hw expects */ 827 unsigned int sas_last_tag; /* track next tag hw expects */
828 828
829 struct ata_link link; /* host default link */ 829 struct ata_link link; /* host default link */
830 struct ata_link *slave_link; /* see ata_slave_link_init() */ 830 struct ata_link *slave_link; /* see ata_slave_link_init() */
@@ -1344,6 +1344,7 @@ extern struct device_attribute *ata_common_sdev_attrs[];
1344 .ioctl = ata_scsi_ioctl, \ 1344 .ioctl = ata_scsi_ioctl, \
1345 .queuecommand = ata_scsi_queuecmd, \ 1345 .queuecommand = ata_scsi_queuecmd, \
1346 .can_queue = ATA_DEF_QUEUE, \ 1346 .can_queue = ATA_DEF_QUEUE, \
1347 .tag_alloc_policy = BLK_TAG_ALLOC_RR, \
1347 .this_id = ATA_SHT_THIS_ID, \ 1348 .this_id = ATA_SHT_THIS_ID, \
1348 .cmd_per_lun = ATA_SHT_CMD_PER_LUN, \ 1349 .cmd_per_lun = ATA_SHT_CMD_PER_LUN, \
1349 .emulated = ATA_SHT_EMULATED, \ 1350 .emulated = ATA_SHT_EMULATED, \