Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105773
b: refs/heads/master
c: dd7c7bc
h: refs/heads/master
i:
  105771: 97bed55
v: v3
  • Loading branch information
Rusty Russell committed Jul 25, 2008
1 parent f7d4cf4 commit 8aee28d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: faeba830b086bc9e58748869054e994cb09693cd
refs/heads/master: dd7c7bc46211785a1aa7d70feb15830f62682b3c
5 changes: 5 additions & 0 deletions trunk/drivers/virtio/virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ static int virtio_dev_probe(struct device *_d)
set_bit(f, dev->features);
}

/* Transport features are always preserved to pass to set_features. */
for (i = VIRTIO_TRANSPORT_F_START; i < VIRTIO_TRANSPORT_F_END; i++)
if (device_features & (1 << i))
set_bit(i, dev->features);

err = drv->probe(dev);
if (err)
add_status(dev, VIRTIO_CONFIG_S_FAILED);
Expand Down
6 changes: 6 additions & 0 deletions trunk/include/linux/virtio_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
/* We've given up on this device. */
#define VIRTIO_CONFIG_S_FAILED 0x80

/* Some virtio feature bits (currently bits 28 through 31) are reserved for the
* transport being used (eg. virtio_ring), the rest are per-device feature
* bits. */
#define VIRTIO_TRANSPORT_F_START 28
#define VIRTIO_TRANSPORT_F_END 32

/* Do we get callbacks when the ring is completely used, even if we've
* suppressed them? */
#define VIRTIO_F_NOTIFY_ON_EMPTY 24
Expand Down

0 comments on commit 8aee28d

Please sign in to comment.