]> err.no Git - linux-2.6/commitdiff
myri10ge: add barrier in myri10ge_send_cmd
authorBrice Goglin <brice@myri.com>
Fri, 9 May 2008 00:18:45 +0000 (02:18 +0200)
committerJeff Garzik <jgarzik@redhat.com>
Tue, 13 May 2008 05:30:28 +0000 (01:30 -0400)
Add a barrier() in the usleep() loop in  myri10ge_send_cmd().
Without the barrier, some mips machine never notices that the
firmware has DMA'ed the response.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Andrew Gallatin <gallatin@myri.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/net/myri10ge/myri10ge.c

index 4a65e4155c0fbf460488396442725f8d7e766d9c..48fe624afa53945ac9af7cc2b6a9a6ead6a1e22a 100644 (file)
@@ -361,8 +361,10 @@ myri10ge_send_cmd(struct myri10ge_priv *mgp, u32 cmd,
                for (sleep_total = 0;
                     sleep_total < 1000
                     && response->result == htonl(MYRI10GE_NO_RESPONSE_RESULT);
-                    sleep_total += 10)
+                    sleep_total += 10) {
                        udelay(10);
+                       mb();
+               }
        } else {
                /* use msleep for most command */
                for (sleep_total = 0;