| #include <linux/blkdev.h> |
| #include <scsi/scsi_cmnd.h> |
| #include <scsi/scsi_device.h> |
| #include <scsi/scsi_host.h> |
| #define SCSI_NO_TAG (-1) /* identify no tag in use */ |
| * scsi_host_find_tag - find the tagged command by host |
| * @shost: pointer to scsi_host |
| * Note: for devices using multiple hardware queues tag must have been |
| * generated by blk_mq_unique_tag(). |
| static inline struct scsi_cmnd *scsi_host_find_tag(struct Scsi_Host *shost, |
| struct request *req = NULL; |
| if (shost_use_blk_mq(shost)) { |
| u16 hwq = blk_mq_unique_tag_to_hwq(tag); |
| if (hwq < shost->tag_set.nr_hw_queues) { |
| req = blk_mq_tag_to_rq(shost->tag_set.tags[hwq], |
| blk_mq_unique_tag_to_tag(tag)); |
| req = blk_map_queue_find_tag(shost->bqt, tag); |
| #endif /* CONFIG_BLOCK */ |
| #endif /* _SCSI_SCSI_TCQ_H */ |