[ofw][patch] bugfix in CMD interface

Leonid Keller leonid at mellanox.co.il
Thu Nov 27 05:38:26 PST 2008


Applied in 1775.


________________________________

	From: ofw-bounces at lists.openfabrics.org
[mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Leonid Keller
	Sent: Sunday, November 23, 2008 9:13 PM
	To: ofw at lists.openfabrics.org
	Subject: [ofw][patch] bugfix in CMD interface
	
	

	[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/20081127/67f9ad7d/attachment.html>


More information about the ofw mailing list