diff options
author | James Morris <james.l.morris@oracle.com> | 2015-11-23 22:46:28 +1100 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2015-11-23 22:46:28 +1100 |
commit | ebd68df3f24b318d391d15c458d6f43f340ba36a (patch) | |
tree | f0277bc4b853abe5db1d30fa4e10b05bba7f2ac5 /drivers/net/ethernet/sfc/mcdi.c | |
parent | security/capability.h: cap_issubset/isclear can be boolean (diff) | |
parent | Linux 4.4-rc2 (diff) | |
download | linux-dev-ebd68df3f24b318d391d15c458d6f43f340ba36a.tar.xz linux-dev-ebd68df3f24b318d391d15c458d6f43f340ba36a.zip |
Sync to Linus v4.4-rc2 for LSM developers.
Diffstat (limited to 'drivers/net/ethernet/sfc/mcdi.c')
-rw-r--r-- | drivers/net/ethernet/sfc/mcdi.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/net/ethernet/sfc/mcdi.c b/drivers/net/ethernet/sfc/mcdi.c index 98d172b04f71..41fb6b60a3f0 100644 --- a/drivers/net/ethernet/sfc/mcdi.c +++ b/drivers/net/ethernet/sfc/mcdi.c @@ -9,7 +9,7 @@ #include <linux/delay.h> #include <linux/moduleparam.h> -#include <asm/cmpxchg.h> +#include <linux/atomic.h> #include "net_driver.h" #include "nic.h" #include "io.h" @@ -1028,10 +1028,21 @@ static void efx_mcdi_ev_death(struct efx_nic *efx, int rc) /* Consume the status word since efx_mcdi_rpc_finish() won't */ for (count = 0; count < MCDI_STATUS_DELAY_COUNT; ++count) { - if (efx_mcdi_poll_reboot(efx)) + rc = efx_mcdi_poll_reboot(efx); + if (rc) break; udelay(MCDI_STATUS_DELAY_US); } + + /* On EF10, a CODE_MC_REBOOT event can be received without the + * reboot detection in efx_mcdi_poll_reboot() being triggered. + * If zero was returned from the final call to + * efx_mcdi_poll_reboot(), the MC reboot wasn't noticed but the + * MC has definitely rebooted so prepare for the reset. + */ + if (!rc && efx->type->mcdi_reboot_detected) + efx->type->mcdi_reboot_detected(efx); + mcdi->new_epoch = true; /* Nobody was waiting for an MCDI request, so trigger a reset */ |