diff options
| author | Michael Brown | 2011-11-14 20:13:31 +0100 |
|---|---|---|
| committer | Michael Brown | 2011-11-15 05:12:07 +0100 |
| commit | 6dd4ac77e593de3bb3825a4c868078c9aa0a887e (patch) | |
| tree | b11d647939a34c5f4bad6f272c737690624dbdcc /src/drivers/infiniband/hermon.h | |
| parent | [hermon] Reorder code in preparation for quiescing patch (diff) | |
| download | ipxe-6dd4ac77e593de3bb3825a4c868078c9aa0a887e.tar.gz ipxe-6dd4ac77e593de3bb3825a4c868078c9aa0a887e.tar.xz ipxe-6dd4ac77e593de3bb3825a4c868078c9aa0a887e.zip | |
[hermon] Ensure hardware is quiescent when no interfaces are open
WinPE has been observed to call PXENV_UNDI_SHUTDOWN but not
PXENV_STOP_UNDI. This means that Hermon hardware is left partially
active (firmware running and one event queue mapped) when WinPE starts
up, which can cause a Blue Screen of Death.
Fix by ensuring that the hardware is left quiescent (with the firmware
stopped) when no interfaces are open.
Reported-by: Itay Gazit <itayg@mellanox.co.il>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/infiniband/hermon.h')
| -rw-r--r-- | src/drivers/infiniband/hermon.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/drivers/infiniband/hermon.h b/src/drivers/infiniband/hermon.h index 1c8623035..26940f6fa 100644 --- a/src/drivers/infiniband/hermon.h +++ b/src/drivers/infiniband/hermon.h @@ -829,6 +829,8 @@ struct hermon_port { /** A Hermon device */ struct hermon { + /** PCI device */ + struct pci_device *pci; /** PCI configuration registers */ void *config; /** PCI user Access Region */ @@ -841,11 +843,30 @@ struct hermon { /** Command output mailbox */ void *mailbox_out; - /** Firmware area in external memory */ + /** Device open request counter */ + unsigned int open_count; + + /** Firmware size */ + size_t firmware_len; + /** Firmware area in external memory + * + * This is allocated when first needed, and freed only on + * final teardown, in order to avoid memory map changes at + * runtime. + */ userptr_t firmware_area; /** ICM map */ struct hermon_icm_map icm_map[HERMON_ICM_NUM_REGIONS]; - /** ICM area */ + /** ICM size */ + size_t icm_len; + /** ICM AUX size */ + size_t icm_aux_len; + /** ICM area + * + * This is allocated when first needed, and freed only on + * final teardown, in order to avoid memory map changes at + * runtime. + */ userptr_t icm; /** Event queue */ |
