Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e8f2043 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "virtio_blk: Added support for ICE feature"

parents a863b366 e5c05c5d
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -342,9 +342,11 @@ static blk_status_t virtio_queue_rq(struct blk_mq_hw_ctx *hctx,
	vbr->out_hdr.ioprio = cpu_to_virtio32(vblk->vdev, req_get_ioprio(req));

	retval = virtblk_handle_ice(vblk, req);
	if (retval != BLK_STS_OK)
	if (retval != BLK_STS_OK) {
		if (retval == BLK_STS_RESOURCE)
			blk_mq_run_hw_queue(hctx, true);
		return retval;

	}
	blk_mq_start_request(req);

	num = blk_rq_map_sg(hctx->queue, req, vbr->sg);
@@ -794,6 +796,8 @@ static int virtblk_probe(struct virtio_device *vdev)
	INIT_WORK(&vblk->config_work, virtblk_config_changed_work);

#ifdef CONFIG_PFK_VIRTUALIZED
	if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_ICE))
		return -ENOTTY;
	INIT_WORK(&vblk->ice_cfg_work, virtblk_ice_work);
	vblk->work_pending = false;
#endif
@@ -1038,6 +1042,9 @@ static unsigned int features[] = {
	VIRTIO_BLK_F_RO, VIRTIO_BLK_F_BLK_SIZE,
	VIRTIO_BLK_F_FLUSH, VIRTIO_BLK_F_TOPOLOGY, VIRTIO_BLK_F_CONFIG_WCE,
	VIRTIO_BLK_F_MQ,
#ifdef CONFIG_PFK_VIRTUALIZED
	VIRTIO_BLK_F_ICE,
#endif
};

static struct virtio_driver virtio_blk = {
+1 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@
#define VIRTIO_BLK_F_BLK_SIZE	6	/* Block size of disk is available*/
#define VIRTIO_BLK_F_TOPOLOGY	10	/* Topology information is available */
#define VIRTIO_BLK_F_MQ		12	/* support more than one vq */
#define VIRTIO_BLK_F_ICE		23	/* support ice virtualization */

/* Legacy feature bits */
#ifndef VIRTIO_BLK_NO_LEGACY