]> git.baikalelectronics.ru Git - kernel.git/commit
sfc: Make handling of MC reboot more reliable
authorBen Hutchings <bhutchings@solarflare.com>
Tue, 20 Dec 2011 23:39:31 +0000 (23:39 +0000)
committerBen Hutchings <bhutchings@solarflare.com>
Fri, 27 Jan 2012 00:10:44 +0000 (00:10 +0000)
commit4a2e3f3a70dec0bf13e4f246f616bd52448c56b9
tree4588c2c536c165e94a3a650260453803a9a7b747
parent128900f6dd929eafdb274f5ba5b08ff8a5699496
sfc: Make handling of MC reboot more reliable

When the MC reboots, either as part of a firmware upgrade or due to a
bug, it attempts to complete (with an error) any requests that were
outstanding before the reboot.  Since there is an inherent race
condition in checking this, it will also write to a status word in
shared memory.

If we look at each of these separately, we may detect each reboot
twice, resulting in a spurious command failure after a firmware
upgrade or frustrating recovery from a firmware bug.  Instead, if a
request completion indicates a reboot, we must poll and clear the
status word.

This bug was previously masked by use of an incorrect address for the
status word.  Fix that, using the definition now included in
mcdi_pcol.h.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
drivers/net/ethernet/sfc/mcdi.c