diff options
Diffstat (limited to 'drivers/block/virtio_blk.c')
-rw-r--r-- | drivers/block/virtio_blk.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 43db3ea15b54..aa1a3d5a3e2b 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c | |||
@@ -213,7 +213,7 @@ static int virtblk_ioctl(struct block_device *bdev, fmode_t mode, | |||
213 | * Only allow the generic SCSI ioctls if the host can support it. | 213 | * Only allow the generic SCSI ioctls if the host can support it. |
214 | */ | 214 | */ |
215 | if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_SCSI)) | 215 | if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_SCSI)) |
216 | return -ENOIOCTLCMD; | 216 | return -ENOTTY; |
217 | 217 | ||
218 | return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp); | 218 | return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp); |
219 | } | 219 | } |
@@ -360,6 +360,9 @@ static int __devinit virtblk_probe(struct virtio_device *vdev) | |||
360 | blk_queue_max_phys_segments(vblk->disk->queue, vblk->sg_elems-2); | 360 | blk_queue_max_phys_segments(vblk->disk->queue, vblk->sg_elems-2); |
361 | blk_queue_max_hw_segments(vblk->disk->queue, vblk->sg_elems-2); | 361 | blk_queue_max_hw_segments(vblk->disk->queue, vblk->sg_elems-2); |
362 | 362 | ||
363 | /* No need to bounce any requests */ | ||
364 | blk_queue_bounce_limit(vblk->disk->queue, BLK_BOUNCE_ANY); | ||
365 | |||
363 | /* No real sector limit. */ | 366 | /* No real sector limit. */ |
364 | blk_queue_max_sectors(vblk->disk->queue, -1U); | 367 | blk_queue_max_sectors(vblk->disk->queue, -1U); |
365 | 368 | ||
@@ -424,7 +427,12 @@ static unsigned int features[] = { | |||
424 | VIRTIO_BLK_F_SCSI, VIRTIO_BLK_F_IDENTIFY | 427 | VIRTIO_BLK_F_SCSI, VIRTIO_BLK_F_IDENTIFY |
425 | }; | 428 | }; |
426 | 429 | ||
427 | static struct virtio_driver virtio_blk = { | 430 | /* |
431 | * virtio_blk causes spurious section mismatch warning by | ||
432 | * simultaneously referring to a __devinit and a __devexit function. | ||
433 | * Use __refdata to avoid this warning. | ||
434 | */ | ||
435 | static struct virtio_driver __refdata virtio_blk = { | ||
428 | .feature_table = features, | 436 | .feature_table = features, |
429 | .feature_table_size = ARRAY_SIZE(features), | 437 | .feature_table_size = ARRAY_SIZE(features), |
430 | .driver.name = KBUILD_MODNAME, | 438 | .driver.name = KBUILD_MODNAME, |