#ifndef _SCSI_SCSI_TCQ_H #define _SCSI_SCSI_TCQ_H #include #include #include #include #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 req->special; } #endif /* CONFIG_BLOCK */ #endif /* _SCSI_SCSI_TCQ_H */ nup net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
AgeCommit message (Expand)AuthorFilesLines
2017-02-07virtio_net: refactor freeze/restore logic into virtnet reset logicJohn Fastabend3-48/+73
2017-02-07virtio_net: remove duplicate queue pair binding in XDPJohn Fastabend1-13/+7
2017-02-07virtio_net: factor out xdp handler for readabilityJohn Fastabend1-51/+35
2017-02-07virtio_net: wrap rtnl_lock in test for calling with lock already heldJohn Fastabend1-10/+21
2017-02-06Merge branch 'bridge-improve-cache-utilization'David S. Miller11-52/+59
2017-02-06bridge: fdb: write to used and updated at most once per jiffyNikolay Aleksandrov2-2/+4
2017-02-06bridge: move write-heavy fdb members in their own cache lineNikolay Aleksandrov1-4/+6
2017-02-06bridge: move to workqueue gcNikolay Aleksandrov10-23/+29
2017-02-06bridge: modify bridge and port to have often accessed fields in one cache lineNikolay Aleksandrov1-23/+20
2017-02-06bpf: enable verifier to add 0 to packet ptrWilliam Tu2-1/+24
2017-02-06bpf: test for AND edge casesJosef Bacik1-0/+55
2017-02-06Merge branch 'dsa-add-fabric-notifier'David S. Miller7-49/+205
2017-02-06net: dsa: introduce bridge notifierVivien Didelot3-11/+71
2017-02-06net: dsa: add switch notifierVivien Didelot6-0/+77
2017-02-06net: dsa: change state setter scopeVivien Didelot1-6/+9
2017-02-06net: dsa: rollback bridging on errorVivien Didelot1-1/+13
2017-02-06net: dsa: simplify netdevice events handlingVivien Didelot1-28/+16
2017-02-06net: dsa: move netdevice notifier registrationVivien Didelot3-10/+26
2017-02-06net/mlx5e: fix another maybe-uninitialized false-positiveArnd Bergmann