mirror of https://github.com/ipxe/ipxe.git
[hermon] Increase polling rate for command completions
Some older versions of the hardware (and/or firmware) do not report an event when an Infiniband link reaches the INIT state. The driver works around this missing event by calling ib_smc_update() on each event queue poll while the link is in the DOWN state. This results in a very large number of commands being issued while any open Infiniband link is in the DOWN state (e.g. unplugged), to the point that the 1ms delay from waiting for each command to complete will noticeably affect responsiveness. Fix by decreasing the command completion polling delay from 1ms to 10us. Signed-off-by: Christian Iversen <ci@iversenit.dk> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>pull/234/head
parent
7d32225b55
commit
6cb12ee2b0
|
@ -137,13 +137,13 @@ static int hermon_cmd_wait ( struct hermon *hermon,
|
|||
struct hermonprm_hca_command_register *hcr ) {
|
||||
unsigned int wait;
|
||||
|
||||
for ( wait = HERMON_HCR_MAX_WAIT_MS ; wait ; wait-- ) {
|
||||
for ( wait = ( 100 * HERMON_HCR_MAX_WAIT_MS ) ; wait ; wait-- ) {
|
||||
hcr->u.dwords[6] =
|
||||
readl ( hermon->config + HERMON_HCR_REG ( 6 ) );
|
||||
if ( ( MLX_GET ( hcr, go ) == 0 ) &&
|
||||
( MLX_GET ( hcr, t ) == hermon->toggle ) )
|
||||
return 0;
|
||||
mdelay ( 1 );
|
||||
udelay ( 10 );
|
||||
}
|
||||
return -EBUSY;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue