]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[hermon] Throttle debug output when sensing port type
authorChristian Iversen <ci@iversenit.dk>
Tue, 26 Jan 2021 23:06:37 +0000 (00:06 +0100)
committerMichael Brown <mcb30@ipxe.org>
Mon, 1 Feb 2021 12:35:22 +0000 (12:35 +0000)
When auto-detecting the initial port type, the Hermon driver will spam
the debug output without hesitation.  Add a short delay in each
iteration to fix this.

Signed-off-by: Christian Iversen <ci@iversenit.dk>
src/drivers/infiniband/hermon.c

index e3b692dc9e4224de485557fd9f7e88fca76dbf91..35326ac6e896e6a164986df8f245a714a0114431 100644 (file)
@@ -3743,6 +3743,9 @@ static int hermon_set_port_type ( struct hermon *hermon,
                                rc = port_type;
                                return rc;
                        }
+
+                       /* Avoid spamming debug output */
+                       mdelay ( 50 );
                } while ( ( port_type == HERMON_PORT_TYPE_UNKNOWN ) &&
                          ( ( elapsed = ( currticks() - start ) ) <
                            HERMON_SENSE_PORT_TIMEOUT ) );