[openib-general] Race in mthca_cmd_post()
John Partridge
johnip at sgi.com
Tue Oct 24 08:50:07 PDT 2006
Roland Dreier wrote:
> I thought I had everything I needed -- but actually could you send a
> new copy of the patch along with a Signed-off-by: line?
OK here it is. A file copy is attached too in case my mailer messed up the format :-
mthca_reset.c: Fix a non-blocking Config Write that needs flushing in mthca_reset()
Signed-off-by: John Partridge johnip at sgi.com
---
--- openib-1.1-buildable-ORIG/drivers/infiniband/hw/mthca/mthca_reset.c 2006-09-20 07:19:24.000000000 -0500
+++ openib-1.1/drivers/infiniband/hw/mthca/mthca_reset.c 2006-10-19 13:55:04.292275707 -0500
@@ -281,6 +281,17 @@
goto out;
}
+ /*
+ * Perform a "flush" of the pci_write_config_dword() for PCI_COMMAND.
+ * The PCI_COMMAND to the HCA must complete before we exit mthca_reset()
+ * or any PIO Memory Reads via the BAR will fail at this point.
+ */
+ if (pci_read_config_dword(mdev->pdev, PCI_COMMAND, hca_header)) {
+ err = -ENODEV;
+ mthca_err(mdev, "Couldn't access HCA memory after restoring, "
+ "aborting.\n");
+ }
+
out:
if (bridge)
pci_dev_put(bridge);
Many Thanks for your help with this.
Regards
John
--
John Partridge
Silicon Graphics Inc
Tel: 651-683-3428
Vnet: 233-3428
E-Mail: johnip at sgi.com
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pv954262.patch
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20061024/6ff8e112/attachment.ksh>
More information about the general
mailing list