Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 296006
b: refs/heads/master
c: 41a6ee0
h: refs/heads/master
v: v3
  • Loading branch information
Ohad Ben-Cohen committed Mar 6, 2012
1 parent 0c1ddbf commit 04279ad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 04a9016e82193cfbe2f9111b4c59de5628fbbe3b
refs/heads/master: 41a6ee09ee8dd7ac3a6ac12a24e26279b5d93385
20 changes: 10 additions & 10 deletions trunk/drivers/remoteproc/remoteproc_virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@ static void rproc_virtio_del_vqs(struct virtio_device *vdev)
struct virtqueue *vq, *n;
struct rproc *rproc = vdev_to_rproc(vdev);

/* power down the remote processor before deleting vqs */
rproc_shutdown(rproc);

list_for_each_entry_safe(vq, n, &vdev->vqs, list) {
struct rproc_virtio_vq_info *rpvq = vq->priv;
vring_del_virtqueue(vq);
kfree(rpvq);
}

/* power down the remote processor */
rproc_shutdown(rproc);
}

static int rproc_virtio_find_vqs(struct virtio_device *vdev, unsigned nvqs,
Expand All @@ -145,13 +145,6 @@ static int rproc_virtio_find_vqs(struct virtio_device *vdev, unsigned nvqs,
if (nvqs != 2)
return -EINVAL;

/* boot the remote processor */
ret = rproc_boot(rproc);
if (ret) {
dev_err(rproc->dev, "rproc_boot() failed %d\n", ret);
goto error;
}

for (i = 0; i < nvqs; ++i) {
vqs[i] = rp_find_vq(vdev, i, callbacks[i], names[i]);
if (IS_ERR(vqs[i])) {
Expand All @@ -160,6 +153,13 @@ static int rproc_virtio_find_vqs(struct virtio_device *vdev, unsigned nvqs,
}
}

/* now that the vqs are all set, boot the remote processor */
ret = rproc_boot(rproc);
if (ret) {
dev_err(rproc->dev, "rproc_boot() failed %d\n", ret);
goto error;
}

return 0;

error:
Expand Down

0 comments on commit 04279ad

Please sign in to comment.