Skip to content

Commit 80ff204

Browse files
committed
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 <[email protected]> Reviewed-by: Ming Lei <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 944e7c8 commit 80ff204

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

drivers/block/ataflop.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,6 +1471,15 @@ static void setup_req_params( int drive )
14711471
ReqTrack, ReqSector, (unsigned long)ReqData ));
14721472
}
14731473

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+
14741483
static blk_status_t ataflop_queue_rq(struct blk_mq_hw_ctx *hctx,
14751484
const struct blk_mq_queue_data *bd)
14761485
{
@@ -1947,6 +1956,7 @@ static const struct block_device_operations floppy_fops = {
19471956

19481957
static const struct blk_mq_ops ataflop_mq_ops = {
19491958
.queue_rq = ataflop_queue_rq,
1959+
.commit_rqs = ataflop_commit_rqs,
19501960
};
19511961

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

0 commit comments

Comments
 (0)