diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/virtio_blk.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index cc6d39383a3f..78be6b8c89e0 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c | |||
@@ -242,7 +242,7 @@ static int virtblk_probe(struct virtio_device *vdev) | |||
242 | index++; | 242 | index++; |
243 | 243 | ||
244 | /* If barriers are supported, tell block layer that queue is ordered */ | 244 | /* If barriers are supported, tell block layer that queue is ordered */ |
245 | if (vdev->config->feature(vdev, VIRTIO_BLK_F_BARRIER)) | 245 | if (virtio_has_feature(vdev, VIRTIO_BLK_F_BARRIER)) |
246 | blk_queue_ordered(vblk->disk->queue, QUEUE_ORDERED_TAG, NULL); | 246 | blk_queue_ordered(vblk->disk->queue, QUEUE_ORDERED_TAG, NULL); |
247 | 247 | ||
248 | /* Host must always specify the capacity. */ | 248 | /* Host must always specify the capacity. */ |
@@ -308,7 +308,13 @@ static struct virtio_device_id id_table[] = { | |||
308 | { 0 }, | 308 | { 0 }, |
309 | }; | 309 | }; |
310 | 310 | ||
311 | static unsigned int features[] = { | ||
312 | VIRTIO_BLK_F_BARRIER, VIRTIO_BLK_F_SEG_MAX, VIRTIO_BLK_F_SIZE_MAX, | ||
313 | }; | ||
314 | |||
311 | static struct virtio_driver virtio_blk = { | 315 | static struct virtio_driver virtio_blk = { |
316 | .feature_table = features, | ||
317 | .feature_table_size = ARRAY_SIZE(features), | ||
312 | .driver.name = KBUILD_MODNAME, | 318 | .driver.name = KBUILD_MODNAME, |
313 | .driver.owner = THIS_MODULE, | 319 | .driver.owner = THIS_MODULE, |
314 | .id_table = id_table, | 320 | .id_table = id_table, |