Skip to content
Snippets Groups Projects
Commit 175420f4 authored by Dor Laor's avatar Dor Laor
Browse files

Publish virtio-blk features through the get_feature interface

parent e433188c
No related branches found
No related tags found
No related merge requests found
......@@ -344,4 +344,14 @@ struct driver virtio_blk_driver = {
return 0;
}
u32 virtio_blk::get_driver_features(void)
{
u32 base = virtio_driver::get_driver_features();
return (base | ( 1 << VIRTIO_BLK_F_SIZE_MAX)
| ( 1 << VIRTIO_BLK_F_SEG_MAX)
| ( 1 << VIRTIO_BLK_F_GEOMETRY)
| ( 1 << VIRTIO_BLK_F_RO)
| ( 1 << VIRTIO_BLK_F_BLK_SIZE));
}
}
......@@ -157,7 +157,7 @@ namespace virtio {
virtual bool load(void);
virtual bool unload(void);
virtual u32 get_driver_features(void) { return ((1 << VIRTIO_BLK_F_SIZE_MAX)); }
virtual u32 get_driver_features(void);
virtio_blk_req* make_virtio_req(u64 sector, virtio_blk_request_type type, int val);
int make_virtio_request(struct bio*);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment