virtio: Explicitly request queue sizes where needed.
Ensure that allocated queues can hold the amount of descriptors that were previously communicated to DMAResources in virtio_block and virtio_scsi. The queue allocations will now fail with B_BUFFER_OVERFLOW if the requested size cannot be provided. When requestedSizes are set to 0, no requirement is placed and the queue is sized to its advertised maximum. The requestedSizes argument can be NULL which implies all 0. Change-Id: Ifb1e032d48f8c07aedfe2bf941f32783842c8c12 Reviewed-on: https://review.haiku-os.org/c/haiku/+/8220 Reviewed-by: Jérôme Duval <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
a6a15d5e71
commit
b90dc7a4f3
@@ -117,7 +117,7 @@ typedef struct {
|
||||
const void* buffer, size_t bufferSize);
|
||||
|
||||
status_t (*alloc_queues)(virtio_device cookie, size_t count,
|
||||
virtio_queue* queues);
|
||||
virtio_queue* queues, uint16* requestedSizes);
|
||||
|
||||
void (*free_queues)(virtio_device cookie);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user