[ofw] patch: [MTHCA] bugfix in CMD interface: wait for GO bit before issuing command in polling mode.
Tzachi Dar
tzachid at mellanox.co.il
Thu Nov 13 08:47:15 PST 2008
This patch goes to the trunk, unless there is anoher RC.
Signed off by: leonid.
Index: Q:/projinf4/trunk/hw/mthca/kernel/mthca_cmd.c
===================================================================
--- Q:/projinf4/trunk/hw/mthca/kernel/mthca_cmd.c (revision 3312)
+++ Q:/projinf4/trunk/hw/mthca/kernel/mthca_cmd.c (revision 3313)
@@ -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/20081113/da368707/attachment.html>
More information about the ofw
mailing list