]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/open-amp.git/commitdiff
rpmsg: start_ipc: only kick the remote if start_ipc from master
authorWendy Liang <jliang@xilinx.com>
Mon, 16 Jan 2017 06:03:59 +0000 (22:03 -0800)
committerWendy Liang <jliang@xilinx.com>
Fri, 3 Feb 2017 21:41:22 +0000 (13:41 -0800)
It only needs to kick the remote if it is the master calls
start_ipc after it is ready.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
lib/rpmsg/rpmsg_core.c

index 2a63c2054d4f023b351931887b14d1427b8456f6..a55b36308efd279bf7c9a42155c20e741f57eb6b 100644 (file)
@@ -134,7 +134,11 @@ int rpmsg_start_ipc(struct remote_device *rdev)
                }
        }
 
-       status = rpmsg_rdev_notify(rdev);
+       if (rdev->role == RPMSG_MASTER) {
+               virt_dev->func->set_status(virt_dev,
+                       VIRTIO_CONFIG_STATUS_DRIVER_OK);
+               status = rpmsg_rdev_notify(rdev);
+       }
 
        return status;
 }