diff options
author | Mark Brown <broonie@kernel.org> | 2015-06-09 18:35:46 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-06-09 18:35:46 +0100 |
commit | 6724af486903df57338c14424e02599e371cf563 (patch) | |
tree | 0e42ae32bbfe7e93ba9db11a1124aeb4378cbd71 /drivers/rpmsg/virtio_rpmsg_bus.c | |
parent | d2233325e5b7891914901867ca5355347d59df14 (diff) | |
parent | 9deef024a12ebae4965c89837f662905ac88944b (diff) |
Merge branch 'fix/fsl-dspi' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-fsl-dspi
Diffstat (limited to 'drivers/rpmsg/virtio_rpmsg_bus.c')
-rw-r--r-- | drivers/rpmsg/virtio_rpmsg_bus.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c index 92f6af6da699..73354ee27877 100644 --- a/drivers/rpmsg/virtio_rpmsg_bus.c +++ b/drivers/rpmsg/virtio_rpmsg_bus.c @@ -951,6 +951,7 @@ static int rpmsg_probe(struct virtio_device *vdev) void *bufs_va; int err = 0, i; size_t total_buf_space; + bool notify; vrp = kzalloc(sizeof(*vrp), GFP_KERNEL); if (!vrp) @@ -1030,8 +1031,22 @@ static int rpmsg_probe(struct virtio_device *vdev) } } + /* + * Prepare to kick but don't notify yet - we can't do this before + * device is ready. + */ + notify = virtqueue_kick_prepare(vrp->rvq); + + /* From this point on, we can notify and get callbacks. */ + virtio_device_ready(vdev); + /* tell the remote processor it can start sending messages */ - virtqueue_kick(vrp->rvq); + /* + * this might be concurrent with callbacks, but we are only + * doing notify, not a full kick here, so that's ok. + */ + if (notify) + virtqueue_notify(vrp->rvq); dev_info(&vdev->dev, "rpmsg host is online\n"); |