These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / block / rsxx / dev.c
index ac8c62c..e1b8b70 100644 (file)
@@ -137,17 +137,22 @@ static void bio_dma_done_cb(struct rsxx_cardinfo *card,
                if (!card->eeh_state && card->gendisk)
                        disk_stats_complete(card, meta->bio, meta->start_time);
 
-               bio_endio(meta->bio, atomic_read(&meta->error) ? -EIO : 0);
+               if (atomic_read(&meta->error))
+                       bio_io_error(meta->bio);
+               else
+                       bio_endio(meta->bio);
                kmem_cache_free(bio_meta_pool, meta);
        }
 }
 
-static void rsxx_make_request(struct request_queue *q, struct bio *bio)
+static blk_qc_t rsxx_make_request(struct request_queue *q, struct bio *bio)
 {
        struct rsxx_cardinfo *card = q->queuedata;
        struct rsxx_bio_meta *bio_meta;
        int st = -EINVAL;
 
+       blk_queue_split(q, &bio, q->bio_split);
+
        might_sleep();
 
        if (!card)
@@ -194,12 +199,15 @@ static void rsxx_make_request(struct request_queue *q, struct bio *bio)
        if (st)
                goto queue_err;
 
-       return;
+       return BLK_QC_T_NONE;
 
 queue_err:
        kmem_cache_free(bio_meta_pool, bio_meta);
 req_err:
-       bio_endio(bio, st);
+       if (st)
+               bio->bi_error = st;
+       bio_endio(bio);
+       return BLK_QC_T_NONE;
 }
 
 /*----------------- Device Setup -------------------*/