/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _SCSI_SCSI_TCQ_H #define _SCSI_SCSI_TCQ_H #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 */ #ifdef CONFIG_BLOCK /** * scsi_host_find_tag - find the tagged command by host * @shost: pointer to scsi_host * @tag: tag * * 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, int tag) { struct request *req = NULL; if (tag == SCSI_NO_TAG) return 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)); } } else { req = blk_map_queue_find_tag(shost->bqt, tag); } if (!req) return NULL; return blk_mq_rq_to_pdu(req); }Contributors
| Person | Tokens | Prop | Commits | CommitProp |
| Christoph Hellwig | 77 | 70.64% | 3 | 33.33% |
| Bart Van Assche | 18 | 16.51% | 2 | 22.22% |
| David C Somayajulu | 5 | 4.59% | 1 | 11.11% |
| James Bottomley | 5 | 4.59% | 1 | 11.11% |
| Jens Axboe | 3 | 2.75% | 1 | 11.11% |
| Shaohua Li | 1 | 0.92% | 1 | 11.11% |
| Total | 109 | 100.00% | 9 | 100.00% |
| Person | Tokens | Prop | Commits | CommitProp |
| Christoph Hellwig | 101 | 70.63% | 3 | 27.27% |
| Bart Van Assche | 18 | 12.59% | 2 | 18.18% |
| James Bottomley | 8 | 5.59% | 1 | 9.09% |
| David Howells | 6 | 4.20% | 1 | 9.09% |
| David C Somayajulu | 5 | 3.50% | 1 | 9.09% |
| Jens Axboe | 3 | 2.10% | 1 | 9.09% |
| Shaohua Li | 1 | 0.70% | 1 | 9.09% |
| Greg Kroah-Hartman | 1 | 0.70% | 1 | 9.09% |
| Total | 143 | 100.00% | 11 | 100.00% |