diff options
author | Jens Axboe <axboe@kernel.dk> | 2018-11-01 18:36:27 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-11-07 15:42:32 -0500 |
commit | f664a3cc17b7d0a2bc3b3ab96181e1029b0ec0e6 (patch) | |
tree | d49b6866c48f12638ae5e8dcbddf97d0074243e4 /include/scsi | |
parent | 3a7ea2c483a53fc89e336f69c6ee1d7defe00811 (diff) |
scsi: kill off the legacy IO path
This removes the legacy (non-mq) IO path for SCSI.
Cc: linux-scsi@vger.kernel.org
Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Tested-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Omar Sandoval <osandov@fb.com>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/scsi_host.h | 18 | ||||
-rw-r--r-- | include/scsi/scsi_tcq.h | 14 |
2 files changed, 7 insertions, 25 deletions
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 5ea06d310a25..aa760df8c6b3 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/blk-mq.h> | 11 | #include <linux/blk-mq.h> |
12 | #include <scsi/scsi.h> | 12 | #include <scsi/scsi.h> |
13 | 13 | ||
14 | struct request_queue; | ||
15 | struct block_device; | 14 | struct block_device; |
16 | struct completion; | 15 | struct completion; |
17 | struct module; | 16 | struct module; |
@@ -22,7 +21,6 @@ struct scsi_target; | |||
22 | struct Scsi_Host; | 21 | struct Scsi_Host; |
23 | struct scsi_host_cmd_pool; | 22 | struct scsi_host_cmd_pool; |
24 | struct scsi_transport_template; | 23 | struct scsi_transport_template; |
25 | struct blk_queue_tags; | ||
26 | 24 | ||
27 | 25 | ||
28 | /* | 26 | /* |
@@ -547,14 +545,8 @@ struct Scsi_Host { | |||
547 | struct scsi_host_template *hostt; | 545 | struct scsi_host_template *hostt; |
548 | struct scsi_transport_template *transportt; | 546 | struct scsi_transport_template *transportt; |
549 | 547 | ||
550 | /* | 548 | /* Area to keep a shared tag map */ |
551 | * Area to keep a shared tag map (if needed, will be | 549 | struct blk_mq_tag_set tag_set; |
552 | * NULL if not). | ||
553 | */ | ||
554 | union { | ||
555 | struct blk_queue_tag *bqt; | ||
556 | struct blk_mq_tag_set tag_set; | ||
557 | }; | ||
558 | 550 | ||
559 | atomic_t host_busy; /* commands actually active on low-level */ | 551 | atomic_t host_busy; /* commands actually active on low-level */ |
560 | atomic_t host_blocked; | 552 | atomic_t host_blocked; |
@@ -648,7 +640,6 @@ struct Scsi_Host { | |||
648 | /* The controller does not support WRITE SAME */ | 640 | /* The controller does not support WRITE SAME */ |
649 | unsigned no_write_same:1; | 641 | unsigned no_write_same:1; |
650 | 642 | ||
651 | unsigned use_blk_mq:1; | ||
652 | unsigned use_cmd_list:1; | 643 | unsigned use_cmd_list:1; |
653 | 644 | ||
654 | /* Host responded with short (<36 bytes) INQUIRY result */ | 645 | /* Host responded with short (<36 bytes) INQUIRY result */ |
@@ -742,11 +733,6 @@ static inline int scsi_host_in_recovery(struct Scsi_Host *shost) | |||
742 | shost->tmf_in_progress; | 733 | shost->tmf_in_progress; |
743 | } | 734 | } |
744 | 735 | ||
745 | static inline bool shost_use_blk_mq(struct Scsi_Host *shost) | ||
746 | { | ||
747 | return shost->use_blk_mq; | ||
748 | } | ||
749 | |||
750 | extern int scsi_queue_work(struct Scsi_Host *, struct work_struct *); | 736 | extern int scsi_queue_work(struct Scsi_Host *, struct work_struct *); |
751 | extern void scsi_flush_work(struct Scsi_Host *); | 737 | extern void scsi_flush_work(struct Scsi_Host *); |
752 | 738 | ||
diff --git a/include/scsi/scsi_tcq.h b/include/scsi/scsi_tcq.h index e192a0caa850..6053d46e794e 100644 --- a/include/scsi/scsi_tcq.h +++ b/include/scsi/scsi_tcq.h | |||
@@ -23,19 +23,15 @@ static inline struct scsi_cmnd *scsi_host_find_tag(struct Scsi_Host *shost, | |||
23 | int tag) | 23 | int tag) |
24 | { | 24 | { |
25 | struct request *req = NULL; | 25 | struct request *req = NULL; |
26 | u16 hwq; | ||
26 | 27 | ||
27 | if (tag == SCSI_NO_TAG) | 28 | if (tag == SCSI_NO_TAG) |
28 | return NULL; | 29 | return NULL; |
29 | 30 | ||
30 | if (shost_use_blk_mq(shost)) { | 31 | hwq = blk_mq_unique_tag_to_hwq(tag); |
31 | u16 hwq = blk_mq_unique_tag_to_hwq(tag); | 32 | if (hwq < shost->tag_set.nr_hw_queues) { |
32 | 33 | req = blk_mq_tag_to_rq(shost->tag_set.tags[hwq], | |
33 | if (hwq < shost->tag_set.nr_hw_queues) { | 34 | blk_mq_unique_tag_to_tag(tag)); |
34 | req = blk_mq_tag_to_rq(shost->tag_set.tags[hwq], | ||
35 | blk_mq_unique_tag_to_tag(tag)); | ||
36 | } | ||
37 | } else { | ||
38 | req = blk_map_queue_find_tag(shost->bqt, tag); | ||
39 | } | 35 | } |
40 | 36 | ||
41 | if (!req) | 37 | if (!req) |