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

Commit e5c05c5d authored by Shay's avatar Shay
Browse files

virtio_blk: Added support for ICE feature



Added ICE feature and negotiation in case virtualized
FBE is supported.

Change-Id: I966f785d5dd0c347d5472e7162761db48881faa3
Signed-off-by: default avatarShay <shayn@codeaurora.org>
parent d4bea3de
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