[ofw][patch] bugfix in CMD interface

Leonid Keller leonid at mellanox.co.il
Sun Nov 23 11:12:31 PST 2008


[MTHCA] bugfix in CMD interface: wait for GO bit before issuing command
in polling mode. [mlnx: 3313]

 
Index: mthca/kernel/mthca_cmd.c
===================================================================
--- mthca/kernel/mthca_cmd.c (revision 1765)
+++ mthca/kernel/mthca_cmd.c (working copy)
@@ -259,10 +259,16 @@
 
  down(&dev->cmd.hcr_mutex);
 
- if (event && wait_go_bit(dev,GO_BIT_TIMEOUT)) {
-  err = -EAGAIN;
-  goto out;
- }
+ if (event)
+  if (wait_go_bit(dev,GO_BIT_TIMEOUT)) {
+   err = -EAGAIN;
+   goto out;
+  }
+ else
+  if (go_bit(dev)) {
+   err = -EAGAIN;
+   goto out;
+  }
 
  /*
   * We use writel (instead of something like memcpy_toio)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20081123/740c8f86/attachment.html>


More information about the ofw mailing list