mlx4_core: Change command token on timeout The FW command token is currently only updated on a command completion event. This means that on command timeout, the same token will be reused for new command, which results in a mess if the timed out command *does* eventually complete.

This is the same change as the patch for mthca from Michael
S. Tsirkin <mst@dev.mellanox.co.il> that was just merged. It seems
sensible to avoid gratuitous differences in FW command processing
between mthca and mlx4.

Signed-off-by: Roland Dreier <rolandd@cisco.com>

+1 -2
+1 -2
drivers/net/mlx4/cmd.c
··· 246 context->result = mlx4_status_to_errno(status); 247 context->out_param = out_param; 248 249 - context->token += priv->cmd.token_mask + 1; 250 - 251 complete(&context->done); 252 } 253 ··· 262 spin_lock(&cmd->context_lock); 263 BUG_ON(cmd->free_head < 0); 264 context = &cmd->context[cmd->free_head]; 265 cmd->free_head = context->next; 266 spin_unlock(&cmd->context_lock); 267
··· 246 context->result = mlx4_status_to_errno(status); 247 context->out_param = out_param; 248 249 complete(&context->done); 250 } 251 ··· 264 spin_lock(&cmd->context_lock); 265 BUG_ON(cmd->free_head < 0); 266 context = &cmd->context[cmd->free_head]; 267 + context->token += cmd->token_mask + 1; 268 cmd->free_head = context->next; 269 spin_unlock(&cmd->context_lock); 270