]> git.ipfire.org Git - thirdparty/u-boot.git/commit
virtio: add support for SIZE_MAX & SEG_MAX features
authorChristian Pötzsch <christian.poetzsch@kernkonzept.com>
Fri, 17 Apr 2026 12:03:19 +0000 (14:03 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 27 Apr 2026 17:11:54 +0000 (11:11 -0600)
commitbb4142af7ed8c94b3df3e75ca9ab3ef450e80885
tree60677a5b7a0c5a4dd6284fa8a936b31c981eac93
parent6ab5b5d2804b00d3253d09c6d8f829d918d2ed1c
virtio: add support for SIZE_MAX & SEG_MAX features

Some virtio implementations may forward the virtio requests directly to
the underlying hw. The hw may have some restrictions in how many and how
big the requests can be. Therefore, the corresponding virtio device will
announce this limitations with the SIZE_MAX & SEG_MAX feature.

Add support for those features. Split an io request into multiple virtio
requests if more than seg_max segments would be used. Also split a
single buffer request into multiple segments if the buffer is bigger
then size_max.

Signed-off-by: Christian Pötzsch <christian.poetzsch@kernkonzept.com>
Signed-off-by: Adam Lackorzynski <adam@l4re.org>
drivers/virtio/virtio_blk.c