]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[hermon] Add missing write barrier after initiating reset 1752/head
authorMichael Brown <mcb30@ipxe.org>
Fri, 10 Jul 2026 15:29:52 +0000 (16:29 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 10 Jul 2026 15:29:52 +0000 (16:29 +0100)
Ensure that the reset register write does not get reordered behind the
first PCI configuration space read that checks to see if the reset has
completed.

Debugged-by: Jaroslav Svoboda <multi.flexi@seznam.cz>
Tested-by: Jaroslav Svoboda <multi.flexi@seznam.cz>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/infiniband/hermon.c

index 70e9e4d54b23d7cd80167670f2d359a395ab2428..1f2bf66f52a2b5bd4489c3b281d54573f5bb0825 100644 (file)
@@ -2843,6 +2843,7 @@ static int hermon_reset ( struct hermon *hermon ) {
        pci_backup ( pci, &backup, PCI_CONFIG_BACKUP_ALL, backup_exclude );
        writel ( HERMON_RESET_MAGIC,
                 ( hermon->config + HERMON_RESET_OFFSET ) );
+       wmb();
 
        /* Wait until device starts responding to configuration cycles */
        for ( i = 0 ; i < HERMON_RESET_MAX_WAIT_MS ; i++ ) {