[hermon] Throttle debug output when sensing port type

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>
pull/245/head
Christian Iversen 2021-01-27 00:06:37 +01:00 committed by Michael Brown
parent 299c671f57
commit 7b2b35981f
1 changed files with 3 additions and 0 deletions

View 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 ) );