mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
virtio: simplify config mechanism.
Previously we used a type/len pair within the config space, but this seems overkill. We now simply define a structure which represents the layout in the config space: the config space can now only be extended at the end. The main driver-visible changes: 1) We indicate what fields are present with an explicit feature bit. 2) Virtqueues are explicitly numbered, and not in the config space. Signed-off-by: Rusty Russell <[email protected]>
This commit is contained in:
parent
f35d9d8aae
commit
a586d4f601
11 changed files with 280 additions and 281 deletions
|
|
@ -236,13 +236,13 @@ static int p9_virtio_probe(struct virtio_device *dev)
|
|||
|
||||
/* Find the input queue. */
|
||||
dev->priv = chan;
|
||||
chan->in_vq = dev->config->find_vq(dev, p9_virtio_intr);
|
||||
chan->in_vq = dev->config->find_vq(dev, 0, p9_virtio_intr);
|
||||
if (IS_ERR(chan->in_vq)) {
|
||||
err = PTR_ERR(chan->in_vq);
|
||||
goto free;
|
||||
}
|
||||
|
||||
chan->out_vq = dev->config->find_vq(dev, NULL);
|
||||
chan->out_vq = dev->config->find_vq(dev, 1, NULL);
|
||||
if (IS_ERR(chan->out_vq)) {
|
||||
err = PTR_ERR(chan->out_vq);
|
||||
goto free_in_vq;
|
||||
|
|
|
|||
Loading…
Reference in a new issue