Skip to content

Commit

Permalink
ataflop: implement mq_ops->commit_rqs() hook
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jens Axboe committed Nov 29, 2018
1 parent 944e7c8 commit 80ff204
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/block/ataflop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1471,6 +1471,15 @@ static void setup_req_params( int drive )
ReqTrack, ReqSector, (unsigned long)ReqData ));
}

static void ataflop_commit_rqs(struct blk_mq_hw_ctx *hctx)
{
spin_lock_irq(&ataflop_lock);
atari_disable_irq(IRQ_MFP_FDC);
finish_fdc();
atari_enable_irq(IRQ_MFP_FDC);
spin_unlock_irq(&ataflop_lock);
}

static blk_status_t ataflop_queue_rq(struct blk_mq_hw_ctx *hctx,
const struct blk_mq_queue_data *bd)
{
Expand Down Expand Up @@ -1947,6 +1956,7 @@ static const struct block_device_operations floppy_fops = {

static const struct blk_mq_ops ataflop_mq_ops = {
.queue_rq = ataflop_queue_rq,
.commit_rqs = ataflop_commit_rqs,
};

static struct kobject *floppy_find(dev_t dev, int *part, void *data)
Expand Down

0 comments on commit 80ff204

Please sign in to comment.