On 7/23/19 5:25 PM, Shannon Nelson wrote:
On 7/23/19 4:47 PM, Saeed Mahameed wrote:
On Mon, 2019-07-22 at 14:40 -0700, Shannon Nelson wrote:

+
+    /* Wait for dev cmd to complete, retrying if we get EAGAIN,
+     * but don't wait any longer than max_seconds.
+     */
+    max_wait = jiffies + (max_seconds * HZ);
+try_again:
+    start_time = jiffies;
+    do {
+        done = ionic_dev_cmd_done(idev);
READ_ONCE required here ? to read from coherent memory modified
by the device and read by the driver ?

Good idea, I'll add that in.

Looking closer at this, it is more for coordinating memory reads between threads and irq handlers.  This is polling a PCI register, which is already marked as volatile and in at least some definitions (e.g. x86) has a barrier.

sln

Reply via email to