summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 244eba0)
raw | patch | inline | side by side (parent: 244eba0)
author | vwan@ti.com <vwan@ti.com> | |
Tue, 1 Apr 2014 23:20:27 +0000 (16:20 -0700) | ||
committer | Chris Ring <cring@ti.com> | |
Thu, 3 Apr 2014 18:20:09 +0000 (11:20 -0700) |
This is to address SDOCM00106156.
In commit c98d2c5624aac20bcdd738f5a54fbddca045fd69, we have fixed a race
condition on the BIOS side by clearing the VRING_USED_F_NO_NOTIFY flag
prior to checking whether there are remaining buffers. We are now doing
the same on the host side.
Note that this code is not currently exercised on the host, but is simply
maintained to ensure that the VirtQueue module is complete in functionality.
Signed-off-by: VW <vwan@ti.com>
In commit c98d2c5624aac20bcdd738f5a54fbddca045fd69, we have fixed a race
condition on the BIOS side by clearing the VRING_USED_F_NO_NOTIFY flag
prior to checking whether there are remaining buffers. We are now doing
the same on the host side.
Note that this code is not currently exercised on the host, but is simply
maintained to ensure that the VirtQueue module is complete in functionality.
Signed-off-by: VW <vwan@ti.com>
qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/transports/virtio/VirtQueue.c | patch | blob | history |
diff --git a/qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/transports/virtio/VirtQueue.c b/qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/transports/virtio/VirtQueue.c
index 7242423edc04590ef4454f54e4f5c162d8c2ebcb..90481866a0d3256c13c8fc1a76562ca518561b2c 100644 (file)
/*
- * Copyright (c) 2011, Texas Instruments Incorporated
+ * Copyright (c) 2011-2014, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
(IArg)vq, vq->last_avail_idx, vq->vring.avail->idx, vq->vring.num,
(IArg)&vq->vring.avail, (IArg)vq->vring.avail);
+ /* Clear flag here to avoid race condition with remote processor.
+ * This is a negative flag, clearing it means that we want to
+ * receive an interrupt when a buffer has been added to the pool.
+ */
+ vq->vring.used->flags &= ~VRING_USED_F_NO_NOTIFY;
/* There's nothing available? */
if (vq->last_avail_idx == vq->vring.avail->idx) {
/* We need to know about added buffers */
- vq->vring.used->flags &= ~VRING_USED_F_NO_NOTIFY;
-
return (-1);
}