diff options
author | Shaohua Li <shli@fb.com> | 2015-01-16 04:32:27 +0300 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-01-24 00:19:04 +0300 |
commit | 12cb5ce101abfaf74421f8cc9f196e708209eb79 (patch) | |
tree | c30f73bca31bacf234398535ef500dcdb4ac4f09 /drivers/ata/libata-scsi.c | |
parent | a4a1cc16a72fd957b4cc2bda12479117f5bec8f8 (diff) | |
download | linux-12cb5ce101abfaf74421f8cc9f196e708209eb79.tar.xz |
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 'drivers/ata/libata-scsi.c')
-rw-r--r-- | drivers/ata/libata-scsi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index e364e86e84d7..94339c2aed1b 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -756,7 +756,7 @@ static struct ata_queued_cmd *ata_scsi_qc_new(struct ata_device *dev, { struct ata_queued_cmd *qc; - qc = ata_qc_new_init(dev); + qc = ata_qc_new_init(dev, cmd->request->tag); if (qc) { qc->scsicmd = cmd; qc->scsidone = cmd->scsi_done; @@ -3666,6 +3666,8 @@ int ata_scsi_add_hosts(struct ata_host *host, struct scsi_host_template *sht) */ shost->max_host_blocked = 1; + scsi_init_shared_tag_map(shost, host->n_tags); + rc = scsi_add_host_with_dma(ap->scsi_host, &ap->tdev, ap->host->dev); if (rc) |