summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 50250f1)
raw | patch | inline | side by side (parent: 50250f1)
author | vwan@ti.com <vwan@ti.com> | |
Wed, 7 Aug 2013 00:56:20 +0000 (17:56 -0700) | ||
committer | Ramsey Harris <ramsey@ti.com> | |
Wed, 7 Aug 2013 15:51:10 +0000 (08:51 -0700) |
Signed-off-by: VW <vwan@ti.com>
diff --git a/qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/Ipc.c b/qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/Ipc.c
index f1545cfa4dbc974011c76b1f08c26e234d2cde3f..3723e27eee5eb081022c8036c047afc8d7a61772 100644 (file)
status = ProcMgr_open(&procHandle, remoteProcId);
if (status >= 0) {
- status = RscTable_update(remoteProcId, procHandle);
+ /* get IPC VRING information */
+ status = RscTable_getInfo(remoteProcId, TYPE_VDEV, 0, NULL,
+ NULL, &numVrings);
if (status >= 0) {
- /* get IPC VRING information */
- status = RscTable_getInfo(remoteProcId, TYPE_VDEV, 0, NULL,
- NULL,&numVrings);
+ status = RscTable_getInfo(remoteProcId, TYPE_VDEV, 1,
+ &vringAddr, NULL, NULL);
if (status >= 0) {
- status = RscTable_getInfo(remoteProcId, TYPE_VDEV, 1,
- &vringAddr, NULL, NULL);
+ status = MessageQCopy_attach(remoteProcId,
+ (Ptr)vringAddr, 0);
if (status >= 0) {
- status = MessageQCopy_attach(remoteProcId,
- (Ptr)vringAddr, 0);
+ status = RscTable_setStatus(remoteProcId, 7);
}
}
}
+
+ if (status >= 0) {
+ status = RscTable_update(remoteProcId, procHandle);
+ }
ProcMgr_close(&procHandle);
}
diff --git a/qnx/src/ipc3x_dev/ti/syslink/resources/RscTable.c b/qnx/src/ipc3x_dev/ti/syslink/resources/RscTable.c
index c17f203cc2ecfb63890e4ce43bb4a3a627bb8ed4..af4255c322617b240a33419b66f41037b301a823 100644 (file)
return status;
}
+Int RscTable_setStatus(UInt16 procId, UInt32 value)
+{
+ Int i;
+ Int status = 0;
+
+ RscTable_Object * obj = (RscTable_Object *)RscTable_state.handles[procId];
+ RscTable_Header * table = (RscTable_Header *)obj->rscTable;
+
+ /* Look for the vdev entry and update the status */
+ for (i = 0; i < table->num; i++) {
+ RscTable_MemEntry * entry =
+ (RscTable_MemEntry *)((UInt32)table + table->offset[i]);
+ if (entry->type == TYPE_VDEV) {
+ struct fw_rsc_vdev *vdev = (struct fw_rsc_vdev *)entry;
+ vdev->status = value;
+ break;
+ }
+ }
+
+ if (i == table->num) {
+ status = RSCTABLE_E_FAIL;
+ }
+
+ return status;
+}
+
#if defined (__cplusplus)
}
#endif /* defined (__cplusplus) */
diff --git a/qnx/src/ipc3x_dev/ti/syslink/resources/RscTable.h b/qnx/src/ipc3x_dev/ti/syslink/resources/RscTable.h
index a806699dd3323115af999dc098ac1e6fff50d937..18df3d200c7d1516fce89bfaebd2adc647af2065 100644 (file)
Int RscTable_free (RscTable_Handle * handle);
+Int RscTable_setStatus (UInt16 procId, UInt32 value);
+
#if defined (__cplusplus)
}
#endif /* defined (__cplusplus) */