aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/falcon.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2011-06-24 15:46:31 -0400
committerBen Hutchings <bhutchings@solarflare.com>2011-06-24 19:43:48 -0400
commita7d529ae2158b5300e4aa16c21f1828bc864449b (patch)
tree8a4442da3d52682945579ce76a9c075cf41a110b /drivers/net/sfc/falcon.c
parent4017dbdc14af1903dc9fcba4d08b89c02325069d (diff)
sfc: Allow resets to be upgraded; use atomic ops for safety
Currently an attempt to schedule any reset is ignored if a reset is already pending. This ignores the relative scopes - if the requested reset is greater in scope then the scheduled reset should be upgraded accordingly. There are also some race conditions which could lead to a reset request being lost. Deal with them by using atomic operations on a bitmask. This also makes tests on reset_pending easier to get right. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/sfc/falcon.c')
-rw-r--r--drivers/net/sfc/falcon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c
index 60176e873d62..a4c7830ec9b0 100644
--- a/drivers/net/sfc/falcon.c
+++ b/drivers/net/sfc/falcon.c
@@ -536,7 +536,7 @@ void falcon_reconfigure_mac_wrapper(struct efx_nic *efx)
536 efx_oword_t reg; 536 efx_oword_t reg;
537 int link_speed, isolate; 537 int link_speed, isolate;
538 538
539 isolate = (efx->reset_pending != RESET_TYPE_NONE); 539 isolate = !!ACCESS_ONCE(efx->reset_pending);
540 540
541 switch (link_state->speed) { 541 switch (link_state->speed) {
542 case 10000: link_speed = 3; break; 542 case 10000: link_speed = 3; break;