Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus

* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
move virtrng_remove to .devexit.text
move virtballoon_remove to .devexit.text
virtio_blk: Revert serial number support
virtio: let header files include virtio_ids.h
virtio_blk: revert QUEUE_FLAG_VIRT addition

+12 -48
-1
Documentation/lguest/lguest.c
··· 42 #include <signal.h> 43 #include "linux/lguest_launcher.h" 44 #include "linux/virtio_config.h" 45 - #include <linux/virtio_ids.h> 46 #include "linux/virtio_net.h" 47 #include "linux/virtio_blk.h" 48 #include "linux/virtio_console.h"
··· 42 #include <signal.h> 43 #include "linux/lguest_launcher.h" 44 #include "linux/virtio_config.h" 45 #include "linux/virtio_net.h" 46 #include "linux/virtio_blk.h" 47 #include "linux/virtio_console.h"
+3 -36
drivers/block/virtio_blk.c
··· 3 #include <linux/blkdev.h> 4 #include <linux/hdreg.h> 5 #include <linux/virtio.h> 6 - #include <linux/virtio_ids.h> 7 #include <linux/virtio_blk.h> 8 #include <linux/scatterlist.h> 9 ··· 182 vblk->vq->vq_ops->kick(vblk->vq); 183 } 184 185 - /* return ATA identify data 186 - */ 187 - static int virtblk_identify(struct gendisk *disk, void *argp) 188 - { 189 - struct virtio_blk *vblk = disk->private_data; 190 - void *opaque; 191 - int err = -ENOMEM; 192 - 193 - opaque = kmalloc(VIRTIO_BLK_ID_BYTES, GFP_KERNEL); 194 - if (!opaque) 195 - goto out; 196 - 197 - err = virtio_config_buf(vblk->vdev, VIRTIO_BLK_F_IDENTIFY, 198 - offsetof(struct virtio_blk_config, identify), opaque, 199 - VIRTIO_BLK_ID_BYTES); 200 - 201 - if (err) 202 - goto out_kfree; 203 - 204 - if (copy_to_user(argp, opaque, VIRTIO_BLK_ID_BYTES)) 205 - err = -EFAULT; 206 - 207 - out_kfree: 208 - kfree(opaque); 209 - out: 210 - return err; 211 - } 212 - 213 static void virtblk_prepare_flush(struct request_queue *q, struct request *req) 214 { 215 req->cmd_type = REQ_TYPE_LINUX_BLOCK; ··· 193 { 194 struct gendisk *disk = bdev->bd_disk; 195 struct virtio_blk *vblk = disk->private_data; 196 - void __user *argp = (void __user *)data; 197 - 198 - if (cmd == HDIO_GET_IDENTITY) 199 - return virtblk_identify(disk, argp); 200 201 /* 202 * Only allow the generic SCSI ioctls if the host can support it. ··· 200 if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_SCSI)) 201 return -ENOTTY; 202 203 - return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp); 204 } 205 206 /* We provide getgeo only to please some old bootloader/partitioning tools */ ··· 300 } 301 302 vblk->disk->queue->queuedata = vblk; 303 - queue_flag_set_unlocked(QUEUE_FLAG_VIRT, vblk->disk->queue); 304 305 if (index < 26) { 306 sprintf(vblk->disk->disk_name, "vd%c", 'a' + index % 26); ··· 412 static unsigned int features[] = { 413 VIRTIO_BLK_F_BARRIER, VIRTIO_BLK_F_SEG_MAX, VIRTIO_BLK_F_SIZE_MAX, 414 VIRTIO_BLK_F_GEOMETRY, VIRTIO_BLK_F_RO, VIRTIO_BLK_F_BLK_SIZE, 415 - VIRTIO_BLK_F_SCSI, VIRTIO_BLK_F_IDENTIFY, VIRTIO_BLK_F_FLUSH 416 }; 417 418 /*
··· 3 #include <linux/blkdev.h> 4 #include <linux/hdreg.h> 5 #include <linux/virtio.h> 6 #include <linux/virtio_blk.h> 7 #include <linux/scatterlist.h> 8 ··· 183 vblk->vq->vq_ops->kick(vblk->vq); 184 } 185 186 static void virtblk_prepare_flush(struct request_queue *q, struct request *req) 187 { 188 req->cmd_type = REQ_TYPE_LINUX_BLOCK; ··· 222 { 223 struct gendisk *disk = bdev->bd_disk; 224 struct virtio_blk *vblk = disk->private_data; 225 226 /* 227 * Only allow the generic SCSI ioctls if the host can support it. ··· 233 if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_SCSI)) 234 return -ENOTTY; 235 236 + return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, 237 + (void __user *)data); 238 } 239 240 /* We provide getgeo only to please some old bootloader/partitioning tools */ ··· 332 } 333 334 vblk->disk->queue->queuedata = vblk; 335 336 if (index < 26) { 337 sprintf(vblk->disk->disk_name, "vd%c", 'a' + index % 26); ··· 445 static unsigned int features[] = { 446 VIRTIO_BLK_F_BARRIER, VIRTIO_BLK_F_SEG_MAX, VIRTIO_BLK_F_SIZE_MAX, 447 VIRTIO_BLK_F_GEOMETRY, VIRTIO_BLK_F_RO, VIRTIO_BLK_F_BLK_SIZE, 448 + VIRTIO_BLK_F_SCSI, VIRTIO_BLK_F_FLUSH 449 }; 450 451 /*
+1 -2
drivers/char/hw_random/virtio-rng.c
··· 21 #include <linux/scatterlist.h> 22 #include <linux/spinlock.h> 23 #include <linux/virtio.h> 24 - #include <linux/virtio_ids.h> 25 #include <linux/virtio_rng.h> 26 27 /* The host will fill any buffer we give it with sweet, sweet randomness. We ··· 116 return 0; 117 } 118 119 - static void virtrng_remove(struct virtio_device *vdev) 120 { 121 vdev->config->reset(vdev); 122 hwrng_unregister(&virtio_hwrng);
··· 21 #include <linux/scatterlist.h> 22 #include <linux/spinlock.h> 23 #include <linux/virtio.h> 24 #include <linux/virtio_rng.h> 25 26 /* The host will fill any buffer we give it with sweet, sweet randomness. We ··· 117 return 0; 118 } 119 120 + static void __devexit virtrng_remove(struct virtio_device *vdev) 121 { 122 vdev->config->reset(vdev); 123 hwrng_unregister(&virtio_hwrng);
-1
drivers/char/virtio_console.c
··· 31 #include <linux/err.h> 32 #include <linux/init.h> 33 #include <linux/virtio.h> 34 - #include <linux/virtio_ids.h> 35 #include <linux/virtio_console.h> 36 #include "hvc_console.h" 37
··· 31 #include <linux/err.h> 32 #include <linux/init.h> 33 #include <linux/virtio.h> 34 #include <linux/virtio_console.h> 35 #include "hvc_console.h" 36
-1
drivers/net/virtio_net.c
··· 22 #include <linux/ethtool.h> 23 #include <linux/module.h> 24 #include <linux/virtio.h> 25 - #include <linux/virtio_ids.h> 26 #include <linux/virtio_net.h> 27 #include <linux/scatterlist.h> 28 #include <linux/if_vlan.h>
··· 22 #include <linux/ethtool.h> 23 #include <linux/module.h> 24 #include <linux/virtio.h> 25 #include <linux/virtio_net.h> 26 #include <linux/scatterlist.h> 27 #include <linux/if_vlan.h>
+1 -2
drivers/virtio/virtio_balloon.c
··· 19 */ 20 //#define DEBUG 21 #include <linux/virtio.h> 22 - #include <linux/virtio_ids.h> 23 #include <linux/virtio_balloon.h> 24 #include <linux/swap.h> 25 #include <linux/kthread.h> ··· 247 return err; 248 } 249 250 - static void virtballoon_remove(struct virtio_device *vdev) 251 { 252 struct virtio_balloon *vb = vdev->priv; 253
··· 19 */ 20 //#define DEBUG 21 #include <linux/virtio.h> 22 #include <linux/virtio_balloon.h> 23 #include <linux/swap.h> 24 #include <linux/kthread.h> ··· 248 return err; 249 } 250 251 + static void __devexit virtballoon_remove(struct virtio_device *vdev) 252 { 253 struct virtio_balloon *vb = vdev->priv; 254
+1
include/linux/Kbuild
··· 364 unifdef-y += videodev2.h 365 unifdef-y += videodev.h 366 unifdef-y += virtio_config.h 367 unifdef-y += virtio_blk.h 368 unifdef-y += virtio_net.h 369 unifdef-y += virtio_9p.h
··· 364 unifdef-y += videodev2.h 365 unifdef-y += videodev.h 366 unifdef-y += virtio_config.h 367 + unifdef-y += virtio_ids.h 368 unifdef-y += virtio_blk.h 369 unifdef-y += virtio_net.h 370 unifdef-y += virtio_9p.h
+1
include/linux/virtio_9p.h
··· 2 #define _LINUX_VIRTIO_9P_H 3 /* This header is BSD licensed so anyone can use the definitions to implement 4 * compatible drivers/servers. */ 5 #include <linux/virtio_config.h> 6 7 /* Maximum number of virtio channels per partition (1 for now) */
··· 2 #define _LINUX_VIRTIO_9P_H 3 /* This header is BSD licensed so anyone can use the definitions to implement 4 * compatible drivers/servers. */ 5 + #include <linux/virtio_ids.h> 6 #include <linux/virtio_config.h> 7 8 /* Maximum number of virtio channels per partition (1 for now) */
+1
include/linux/virtio_balloon.h
··· 2 #define _LINUX_VIRTIO_BALLOON_H 3 /* This header is BSD licensed so anyone can use the definitions to implement 4 * compatible drivers/servers. */ 5 #include <linux/virtio_config.h> 6 7 /* The feature bitmap for virtio balloon */
··· 2 #define _LINUX_VIRTIO_BALLOON_H 3 /* This header is BSD licensed so anyone can use the definitions to implement 4 * compatible drivers/servers. */ 5 + #include <linux/virtio_ids.h> 6 #include <linux/virtio_config.h> 7 8 /* The feature bitmap for virtio balloon */
+1 -4
include/linux/virtio_blk.h
··· 3 /* This header is BSD licensed so anyone can use the definitions to implement 4 * compatible drivers/servers. */ 5 #include <linux/types.h> 6 #include <linux/virtio_config.h> 7 8 /* Feature bits */ ··· 14 #define VIRTIO_BLK_F_RO 5 /* Disk is read-only */ 15 #define VIRTIO_BLK_F_BLK_SIZE 6 /* Block size of disk is available*/ 16 #define VIRTIO_BLK_F_SCSI 7 /* Supports scsi command passthru */ 17 - #define VIRTIO_BLK_F_IDENTIFY 8 /* ATA IDENTIFY supported */ 18 #define VIRTIO_BLK_F_FLUSH 9 /* Cache flush command support */ 19 - 20 - #define VIRTIO_BLK_ID_BYTES (sizeof(__u16[256])) /* IDENTIFY DATA */ 21 22 struct virtio_blk_config { 23 /* The capacity (in 512-byte sectors). */ ··· 31 } geometry; 32 /* block size of device (if VIRTIO_BLK_F_BLK_SIZE) */ 33 __u32 blk_size; 34 - __u8 identify[VIRTIO_BLK_ID_BYTES]; 35 } __attribute__((packed)); 36 37 /*
··· 3 /* This header is BSD licensed so anyone can use the definitions to implement 4 * compatible drivers/servers. */ 5 #include <linux/types.h> 6 + #include <linux/virtio_ids.h> 7 #include <linux/virtio_config.h> 8 9 /* Feature bits */ ··· 13 #define VIRTIO_BLK_F_RO 5 /* Disk is read-only */ 14 #define VIRTIO_BLK_F_BLK_SIZE 6 /* Block size of disk is available*/ 15 #define VIRTIO_BLK_F_SCSI 7 /* Supports scsi command passthru */ 16 #define VIRTIO_BLK_F_FLUSH 9 /* Cache flush command support */ 17 18 struct virtio_blk_config { 19 /* The capacity (in 512-byte sectors). */ ··· 33 } geometry; 34 /* block size of device (if VIRTIO_BLK_F_BLK_SIZE) */ 35 __u32 blk_size; 36 } __attribute__((packed)); 37 38 /*
+1
include/linux/virtio_console.h
··· 1 #ifndef _LINUX_VIRTIO_CONSOLE_H 2 #define _LINUX_VIRTIO_CONSOLE_H 3 #include <linux/types.h> 4 #include <linux/virtio_config.h> 5 /* This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so 6 * anyone can use the definitions to implement compatible drivers/servers. */
··· 1 #ifndef _LINUX_VIRTIO_CONSOLE_H 2 #define _LINUX_VIRTIO_CONSOLE_H 3 #include <linux/types.h> 4 + #include <linux/virtio_ids.h> 5 #include <linux/virtio_config.h> 6 /* This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so 7 * anyone can use the definitions to implement compatible drivers/servers. */
+1
include/linux/virtio_net.h
··· 3 /* This header is BSD licensed so anyone can use the definitions to implement 4 * compatible drivers/servers. */ 5 #include <linux/types.h> 6 #include <linux/virtio_config.h> 7 #include <linux/if_ether.h> 8
··· 3 /* This header is BSD licensed so anyone can use the definitions to implement 4 * compatible drivers/servers. */ 5 #include <linux/types.h> 6 + #include <linux/virtio_ids.h> 7 #include <linux/virtio_config.h> 8 #include <linux/if_ether.h> 9
+1
include/linux/virtio_rng.h
··· 2 #define _LINUX_VIRTIO_RNG_H 3 /* This header is BSD licensed so anyone can use the definitions to implement 4 * compatible drivers/servers. */ 5 #include <linux/virtio_config.h> 6 7 #endif /* _LINUX_VIRTIO_RNG_H */
··· 2 #define _LINUX_VIRTIO_RNG_H 3 /* This header is BSD licensed so anyone can use the definitions to implement 4 * compatible drivers/servers. */ 5 + #include <linux/virtio_ids.h> 6 #include <linux/virtio_config.h> 7 8 #endif /* _LINUX_VIRTIO_RNG_H */
-1
net/9p/trans_virtio.c
··· 43 #include <net/9p/transport.h> 44 #include <linux/scatterlist.h> 45 #include <linux/virtio.h> 46 - #include <linux/virtio_ids.h> 47 #include <linux/virtio_9p.h> 48 49 #define VIRTQUEUE_NUM 128
··· 43 #include <net/9p/transport.h> 44 #include <linux/scatterlist.h> 45 #include <linux/virtio.h> 46 #include <linux/virtio_9p.h> 47 48 #define VIRTQUEUE_NUM 128