aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/mcdi.h
diff options
context:
space:
mode:
authorDaniel Pieczko <dpieczko@solarflare.com>2013-06-20 11:40:07 +0100
committerBen Hutchings <bhutchings@solarflare.com>2013-08-27 22:27:57 +0100
commitd36a08b4ae08566426ddb7519b869ec0cd040532 (patch)
tree21be6449965c43160c057395b4983f8b6f04026a /drivers/net/ethernet/sfc/mcdi.h
parentsfc: Add EF10 support for TX/RX DMA error events handling. (diff)
downloadlinux-dev-d36a08b4ae08566426ddb7519b869ec0cd040532.tar.xz
linux-dev-d36a08b4ae08566426ddb7519b869ec0cd040532.zip
sfc: use MCDI epoch flag to improve MC reboot detection in the driver
The Huntington MC will reject all MCDI requests after an MC reboot until it sees one with the NOT_EPOCH flag clear. This flag is set by default for all requests, and then cleared on the first request after we detect that an MC reboot has occurred. The old MCDI_STATUS_DELAY_COUNT gave a timeout of 10ms, which was not long enough for the driver to detect that a reboot had occurred based on the warm boot count while calling efx_mcdi_poll_reboot() from the loop in efx_mcdi_ev_death(). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/sfc/mcdi.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/mcdi.h b/drivers/net/ethernet/sfc/mcdi.h
index 5f67ac3f2c8a..303d9e88a27f 100644
--- a/drivers/net/ethernet/sfc/mcdi.h
+++ b/drivers/net/ethernet/sfc/mcdi.h
@@ -36,6 +36,7 @@ enum efx_mcdi_mode {
* @state: Request handling state. Waited for by @wq.
* @mode: Poll for mcdi completion, or wait for an mcdi_event.
* @wq: Wait queue for threads waiting for @state != %MCDI_STATE_RUNNING
+ * @new_epoch: Indicates start of day or start of MC reboot recovery
* @iface_lock: Serialises access to all the following fields
* @seqno: The next sequence number to use for mcdi requests.
* @credits: Number of spurious MCDI completion events allowed before we
@@ -49,6 +50,7 @@ struct efx_mcdi_iface {
enum efx_mcdi_mode mode;
wait_queue_head_t wq;
spinlock_t iface_lock;
+ bool new_epoch;
unsigned int credits;
unsigned int seqno;
int resprc;