History

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: lguest: notify on empty virtio: force callback on empty. virtio_blk: fix endianess annotations virtio_config: fix len calculation of config elements virtio_net: another race with virtio_net and enable_cb virtio: An entropy device, as suggested by hpa. virtio_blk: allow read-only disks lguest: fix ugly <NULL> in /proc/interrupts virtio: set device index in common code. virtio: virtio_pci should not set bus_id. virtio: bus_id for devices should contain 'virtio' Fix crash in virtio_blk during modprobe ; rmmod ; modprobe lguest: use ioremap_cache, not ioremap

Linus Torvalds committed 18 years ago

Commit ab8cd812 parents f8356ed 208876114 files · +225 −53Browse files

Showing the changes to include/linux (3 of 14 files). Show all

Unified · Split

3 files
  1. include/linux/virtio_blk.h +5 −4
  2. include/linux/virtio_config.h +5 −1
  3. include/linux/virtio_rng.h +8 −0
include/linux/virtio_blk.h+5−4
@@ -10,18 +10,19 @@ · 9 unmodified lines
10#define VIRTIO_BLK_F_SIZE_MAX 1 /* Indicates maximum segment size */10#define VIRTIO_BLK_F_SIZE_MAX 1 /* Indicates maximum segment size */
11#define VIRTIO_BLK_F_SEG_MAX 2 /* Indicates maximum # of segments */11#define VIRTIO_BLK_F_SEG_MAX 2 /* Indicates maximum # of segments */
12#define VIRTIO_BLK_F_GEOMETRY 4 /* Legacy geometry available */12#define VIRTIO_BLK_F_GEOMETRY 4 /* Legacy geometry available */
13#define VIRTIO_BLK_F_RO 5 /* Disk is read-only */
13 14
14struct virtio_blk_config15struct virtio_blk_config
15{16{
16 /* The capacity (in 512-byte sectors). */17 /* The capacity (in 512-byte sectors). */
17 __le64 capacity;18 __u64 capacity;
18 /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */19 /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */
19 __le32 size_max;20 __u32 size_max;
20 /* The maximum number of segments (if VIRTIO_BLK_F_SEG_MAX) */21 /* The maximum number of segments (if VIRTIO_BLK_F_SEG_MAX) */
21 __le32 seg_max;22 __u32 seg_max;
22 /* geometry the device (if VIRTIO_BLK_F_GEOMETRY) */23 /* geometry the device (if VIRTIO_BLK_F_GEOMETRY) */
23 struct virtio_blk_geometry {24 struct virtio_blk_geometry {
24 __le16 cylinders;25 __u16 cylinders;
25 __u8 heads;26 __u8 heads;
26 __u8 sectors;27 __u8 sectors;
27 } geometry;28 } geometry;
include/linux/virtio_config.h+5−1
@@ -15,6 +15,10 @@ · 14 unmodified lines
15/* We've given up on this device. */15/* We've given up on this device. */
16#define VIRTIO_CONFIG_S_FAILED 0x8016#define VIRTIO_CONFIG_S_FAILED 0x80
17 17
18/* Do we get callbacks when the ring is completely used, even if we've
19 * suppressed them? */
20#define VIRTIO_F_NOTIFY_ON_EMPTY 24
21
18#ifdef __KERNEL__22#ifdef __KERNEL__
19#include <linux/virtio.h>23#include <linux/virtio.h>
20 24
@@ -99,7 +103,7 @@ static inline bool virtio_has_feature(const struct virtio_device *vdev, · 78 unmodified lines
99 * The return value is -ENOENT if the feature doesn't exist. Otherwise103 * The return value is -ENOENT if the feature doesn't exist. Otherwise
100 * the config value is copied into whatever is pointed to by v. */104 * the config value is copied into whatever is pointed to by v. */
101#define virtio_config_val(vdev, fbit, offset, v) \105#define virtio_config_val(vdev, fbit, offset, v) \
102 virtio_config_buf((vdev), (fbit), (offset), (v), sizeof(v))106 virtio_config_buf((vdev), (fbit), (offset), (v), sizeof(*v))
103 107
104static inline int virtio_config_buf(struct virtio_device *vdev,108static inline int virtio_config_buf(struct virtio_device *vdev,
105 unsigned int fbit,109 unsigned int fbit,
include/linux/virtio_rng.h+8−0
@@ -0,0 +1,8 @@
1#ifndef _LINUX_VIRTIO_RNG_H
2#define _LINUX_VIRTIO_RNG_H
3#include <linux/virtio_config.h>
4
5/* The ID for virtio_rng */
6#define VIRTIO_ID_RNG 4
7
8#endif /* _LINUX_VIRTIO_RNG_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t