diff options
author | Shaohua Li <shli@fb.com> | 2015-01-15 20:32:27 -0500 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-01-23 16:19:04 -0500 |
commit | 12cb5ce101abfaf74421f8cc9f196e708209eb79 (patch) | |
tree | c30f73bca31bacf234398535ef500dcdb4ac4f09 /drivers/ata/libata-scsi.c | |
parent | a4a1cc16a72fd957b4cc2bda12479117f5bec8f8 (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 '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, | |||
756 | { | 756 | { |
757 | struct ata_queued_cmd *qc; | 757 | struct ata_queued_cmd *qc; |
758 | 758 | ||
759 | qc = ata_qc_new_init(dev); | 759 | qc = ata_qc_new_init(dev, cmd->request->tag); |
760 | if (qc) { | 760 | if (qc) { |
761 | qc->scsicmd = cmd; | 761 | qc->scsicmd = cmd; |
762 | qc->scsidone = cmd->scsi_done; | 762 | qc->scsidone = cmd->scsi_done; |
@@ -3666,6 +3666,8 @@ int ata_scsi_add_hosts(struct ata_host *host, struct scsi_host_template *sht) | |||
3666 | */ | 3666 | */ |
3667 | shost->max_host_blocked = 1; | 3667 | shost->max_host_blocked = 1; |
3668 | 3668 | ||
3669 | scsi_init_shared_tag_map(shost, host->n_tags); | ||
3670 | |||
3669 | rc = scsi_add_host_with_dma(ap->scsi_host, | 3671 | rc = scsi_add_host_with_dma(ap->scsi_host, |
3670 | &ap->tdev, ap->host->dev); | 3672 | &ap->tdev, ap->host->dev); |
3671 | if (rc) | 3673 | if (rc) |