diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-06-12 05:27:22 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-06-12 05:27:22 -0400 |
commit | bb6dfb32f90094fea647e1f27d994a8b6ddd2766 (patch) | |
tree | e63681727543bcc3251bbc82b81a9cc822cc3f5e /drivers/block | |
parent | 4f384f8bcdb5d618a0a68fb84c809e602c798b8f (diff) | |
parent | 5e70b7f3c24468bb1635b295945edb48ecd9656a (diff) |
Merge branch 'linus' into x86/gart
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/amiflop.c | 6 | ||||
-rw-r--r-- | drivers/block/brd.c | 2 | ||||
-rw-r--r-- | drivers/block/viodasd.c | 2 | ||||
-rw-r--r-- | drivers/block/virtio_blk.c | 7 | ||||
-rw-r--r-- | drivers/block/z2ram.c | 2 |
5 files changed, 13 insertions, 6 deletions
diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c index c9751b2b57e6..7516baff3bb9 100644 --- a/drivers/block/amiflop.c +++ b/drivers/block/amiflop.c | |||
@@ -1714,10 +1714,10 @@ static int __init amiga_floppy_init(void) | |||
1714 | int i, ret; | 1714 | int i, ret; |
1715 | 1715 | ||
1716 | if (!MACH_IS_AMIGA) | 1716 | if (!MACH_IS_AMIGA) |
1717 | return -ENXIO; | 1717 | return -ENODEV; |
1718 | 1718 | ||
1719 | if (!AMIGAHW_PRESENT(AMI_FLOPPY)) | 1719 | if (!AMIGAHW_PRESENT(AMI_FLOPPY)) |
1720 | return -ENXIO; | 1720 | return -ENODEV; |
1721 | 1721 | ||
1722 | if (register_blkdev(FLOPPY_MAJOR,"fd")) | 1722 | if (register_blkdev(FLOPPY_MAJOR,"fd")) |
1723 | return -EBUSY; | 1723 | return -EBUSY; |
@@ -1755,7 +1755,7 @@ static int __init amiga_floppy_init(void) | |||
1755 | if (!floppy_queue) | 1755 | if (!floppy_queue) |
1756 | goto out_queue; | 1756 | goto out_queue; |
1757 | 1757 | ||
1758 | ret = -ENXIO; | 1758 | ret = -ENODEV; |
1759 | if (fd_probe_drives() < 1) /* No usable drives */ | 1759 | if (fd_probe_drives() < 1) /* No usable drives */ |
1760 | goto out_probe; | 1760 | goto out_probe; |
1761 | 1761 | ||
diff --git a/drivers/block/brd.c b/drivers/block/brd.c index a196ef7f147f..24b97b0bef99 100644 --- a/drivers/block/brd.c +++ b/drivers/block/brd.c | |||
@@ -397,6 +397,7 @@ module_param(max_part, int, 0); | |||
397 | MODULE_PARM_DESC(max_part, "Maximum number of partitions per RAM disk"); | 397 | MODULE_PARM_DESC(max_part, "Maximum number of partitions per RAM disk"); |
398 | MODULE_LICENSE("GPL"); | 398 | MODULE_LICENSE("GPL"); |
399 | MODULE_ALIAS_BLOCKDEV_MAJOR(RAMDISK_MAJOR); | 399 | MODULE_ALIAS_BLOCKDEV_MAJOR(RAMDISK_MAJOR); |
400 | MODULE_ALIAS("rd"); | ||
400 | 401 | ||
401 | #ifndef MODULE | 402 | #ifndef MODULE |
402 | /* Legacy boot options - nonmodular */ | 403 | /* Legacy boot options - nonmodular */ |
@@ -447,6 +448,7 @@ static struct brd_device *brd_alloc(int i) | |||
447 | disk->fops = &brd_fops; | 448 | disk->fops = &brd_fops; |
448 | disk->private_data = brd; | 449 | disk->private_data = brd; |
449 | disk->queue = brd->brd_queue; | 450 | disk->queue = brd->brd_queue; |
451 | disk->flags |= GENHD_FL_SUPPRESS_PARTITION_INFO; | ||
450 | sprintf(disk->disk_name, "ram%d", i); | 452 | sprintf(disk->disk_name, "ram%d", i); |
451 | set_capacity(disk, rd_size * 2); | 453 | set_capacity(disk, rd_size * 2); |
452 | 454 | ||
diff --git a/drivers/block/viodasd.c b/drivers/block/viodasd.c index ebfe038d859e..f1c8feb5510b 100644 --- a/drivers/block/viodasd.c +++ b/drivers/block/viodasd.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * Authors: Dave Boutcher <boutcher@us.ibm.com> | 3 | * Authors: Dave Boutcher <boutcher@us.ibm.com> |
4 | * Ryan Arnold <ryanarn@us.ibm.com> | 4 | * Ryan Arnold <ryanarn@us.ibm.com> |
5 | * Colin Devilbiss <devilbis@us.ibm.com> | 5 | * Colin Devilbiss <devilbis@us.ibm.com> |
6 | * Stephen Rothwell <sfr@au1.ibm.com> | 6 | * Stephen Rothwell |
7 | * | 7 | * |
8 | * (C) Copyright 2000-2004 IBM Corporation | 8 | * (C) Copyright 2000-2004 IBM Corporation |
9 | * | 9 | * |
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 84e064ffee52..dd7ea203f940 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c | |||
@@ -260,6 +260,10 @@ static int virtblk_probe(struct virtio_device *vdev) | |||
260 | if (virtio_has_feature(vdev, VIRTIO_BLK_F_BARRIER)) | 260 | if (virtio_has_feature(vdev, VIRTIO_BLK_F_BARRIER)) |
261 | blk_queue_ordered(vblk->disk->queue, QUEUE_ORDERED_TAG, NULL); | 261 | blk_queue_ordered(vblk->disk->queue, QUEUE_ORDERED_TAG, NULL); |
262 | 262 | ||
263 | /* If disk is read-only in the host, the guest should obey */ | ||
264 | if (virtio_has_feature(vdev, VIRTIO_BLK_F_RO)) | ||
265 | set_disk_ro(vblk->disk, 1); | ||
266 | |||
263 | /* Host must always specify the capacity. */ | 267 | /* Host must always specify the capacity. */ |
264 | vdev->config->get(vdev, offsetof(struct virtio_blk_config, capacity), | 268 | vdev->config->get(vdev, offsetof(struct virtio_blk_config, capacity), |
265 | &cap, sizeof(cap)); | 269 | &cap, sizeof(cap)); |
@@ -311,6 +315,7 @@ static void virtblk_remove(struct virtio_device *vdev) | |||
311 | /* Stop all the virtqueues. */ | 315 | /* Stop all the virtqueues. */ |
312 | vdev->config->reset(vdev); | 316 | vdev->config->reset(vdev); |
313 | 317 | ||
318 | del_gendisk(vblk->disk); | ||
314 | blk_cleanup_queue(vblk->disk->queue); | 319 | blk_cleanup_queue(vblk->disk->queue); |
315 | put_disk(vblk->disk); | 320 | put_disk(vblk->disk); |
316 | mempool_destroy(vblk->pool); | 321 | mempool_destroy(vblk->pool); |
@@ -325,7 +330,7 @@ static struct virtio_device_id id_table[] = { | |||
325 | 330 | ||
326 | static unsigned int features[] = { | 331 | static unsigned int features[] = { |
327 | VIRTIO_BLK_F_BARRIER, VIRTIO_BLK_F_SEG_MAX, VIRTIO_BLK_F_SIZE_MAX, | 332 | VIRTIO_BLK_F_BARRIER, VIRTIO_BLK_F_SEG_MAX, VIRTIO_BLK_F_SIZE_MAX, |
328 | VIRTIO_BLK_F_GEOMETRY, | 333 | VIRTIO_BLK_F_GEOMETRY, VIRTIO_BLK_F_RO, |
329 | }; | 334 | }; |
330 | 335 | ||
331 | static struct virtio_driver virtio_blk = { | 336 | static struct virtio_driver virtio_blk = { |
diff --git a/drivers/block/z2ram.c b/drivers/block/z2ram.c index 2d5853cbd4b0..be20a67f1fa8 100644 --- a/drivers/block/z2ram.c +++ b/drivers/block/z2ram.c | |||
@@ -332,7 +332,7 @@ z2_init(void) | |||
332 | int ret; | 332 | int ret; |
333 | 333 | ||
334 | if (!MACH_IS_AMIGA) | 334 | if (!MACH_IS_AMIGA) |
335 | return -ENXIO; | 335 | return -ENODEV; |
336 | 336 | ||
337 | ret = -EBUSY; | 337 | ret = -EBUSY; |
338 | if (register_blkdev(Z2RAM_MAJOR, DEVICE_NAME)) | 338 | if (register_blkdev(Z2RAM_MAJOR, DEVICE_NAME)) |