aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/infiniband/hermon.h
diff options
context:
space:
mode:
authorMichael Brown <mcb30@etherboot.org>2009-10-14 02:09:49 +0100
committerMichael Brown <mcb30@etherboot.org>2009-10-14 02:11:16 +0100
commit9f7141a1cedeca6d55b9ce43322f509a4577c883 (patch)
treee2a90b24905305267a83904747643ebec171191d /src/drivers/infiniband/hermon.h
parent4175b778c277c87980266c854139b7f93b5564d9 (diff)
downloadipxe-9f7141a1cedeca6d55b9ce43322f509a4577c883.tar.gz
[hermon] Reset device during probe()
Some systems will retry their boot sequence in the event of a boot failure. On these systems, the second and subsequent boot attempts will fail to initialise the Hermon HCA. Fix by resetting the HCA during probe(). This incurs a one-second cost, but there seems to be no viable alternative. Originally-fixed-by: Itay Gazit <itaygazit@gmail.com>
Diffstat (limited to 'src/drivers/infiniband/hermon.h')
-rw-r--r--src/drivers/infiniband/hermon.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/drivers/infiniband/hermon.h b/src/drivers/infiniband/hermon.h
index f19fd3598..c53f3da5a 100644
--- a/src/drivers/infiniband/hermon.h
+++ b/src/drivers/infiniband/hermon.h
@@ -29,6 +29,11 @@ FILE_LICENCE ( GPL2_OR_LATER );
#define HERMON_PCI_CONFIG_BAR_SIZE 0x100000
#define HERMON_PCI_UAR_BAR PCI_BASE_ADDRESS_2
+/* Device reset */
+#define HERMON_RESET_OFFSET 0x0f0010
+#define HERMON_RESET_MAGIC 0x01000000UL
+#define HERMON_RESET_WAIT_TIME_MS 1000
+
/* Work queue entry and completion queue entry opcodes */
#define HERMON_OPCODE_NOP 0x00
#define HERMON_OPCODE_SEND 0x0a