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 [EMAIL PROTECTED]
---
--- 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: [EMAIL PROTECTED]
mthca_reset.c: Fix a non-blocking Config Write that needs flushing in 
mthca_reset()

Signed-off-by: John Partridge [EMAIL PROTECTED]
---
--- 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);
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to