diff options
author | Jens Axboe <axboe@kernel.dk> | 2018-11-28 08:09:07 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-11-29 12:12:27 -0500 |
commit | 80ff2040ac3dd6d9d68d59159b0a6dffd8adc5ff (patch) | |
tree | f40be630d16f7a35dabf5a47f46e11a01399bb6a /drivers/block/ataflop.c | |
parent | 944e7c87967c820a0f34a935b1f2799944099750 (diff) |
ataflop: implement mq_ops->commit_rqs() hook
We need this for blk-mq to kick things into gear, if we told it that
we had more IO coming, but then failed to deliver on that promise.
Reviewed-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/ataflop.c')
-rw-r--r-- | drivers/block/ataflop.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c index 313064b1005c..b0dbbdfeb33e 100644 --- a/drivers/block/ataflop.c +++ b/drivers/block/ataflop.c | |||
@@ -1471,6 +1471,15 @@ static void setup_req_params( int drive ) | |||
1471 | ReqTrack, ReqSector, (unsigned long)ReqData )); | 1471 | ReqTrack, ReqSector, (unsigned long)ReqData )); |
1472 | } | 1472 | } |
1473 | 1473 | ||
1474 | static void ataflop_commit_rqs(struct blk_mq_hw_ctx *hctx) | ||
1475 | { | ||
1476 | spin_lock_irq(&ataflop_lock); | ||
1477 | atari_disable_irq(IRQ_MFP_FDC); | ||
1478 | finish_fdc(); | ||
1479 | atari_enable_irq(IRQ_MFP_FDC); | ||
1480 | spin_unlock_irq(&ataflop_lock); | ||
1481 | } | ||
1482 | |||
1474 | static blk_status_t ataflop_queue_rq(struct blk_mq_hw_ctx *hctx, | 1483 | static blk_status_t ataflop_queue_rq(struct blk_mq_hw_ctx *hctx, |
1475 | const struct blk_mq_queue_data *bd) | 1484 | const struct blk_mq_queue_data *bd) |
1476 | { | 1485 | { |
@@ -1947,6 +1956,7 @@ static const struct block_device_operations floppy_fops = { | |||
1947 | 1956 | ||
1948 | static const struct blk_mq_ops ataflop_mq_ops = { | 1957 | static const struct blk_mq_ops ataflop_mq_ops = { |
1949 | .queue_rq = ataflop_queue_rq, | 1958 | .queue_rq = ataflop_queue_rq, |
1959 | .commit_rqs = ataflop_commit_rqs, | ||
1950 | }; | 1960 | }; |
1951 | 1961 | ||
1952 | static struct kobject *floppy_find(dev_t dev, int *part, void *data) | 1962 | static struct kobject *floppy_find(dev_t dev, int *part, void *data) |