diff options
author | Ajit Khaparde <ajitk@serverengines.com> | 2010-07-29 06:18:58 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-30 23:59:06 -0700 |
commit | 0fc48c37ff3969dde71a43fa7c8f176d4bd90a3e (patch) | |
tree | 5d2d400a09be92fde256ba2501fcd5ea426d0179 /drivers/net/benet/be_cmds.c | |
parent | 48e9989e033966fd738d062ea9730fe10085fdd1 (diff) |
be2net: fix to avoid sending get_stats request if one is already being processed.
GET_STATS request uses the same memory region as the response.
If a new request for get stats is fired before the response for
the previous get_stats request is received, the response will
corrupt the new request, causing the f/w to misbehave.
Signed-off-by: Somnath K <somnathk@serverengines.com>
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/benet/be_cmds.c')
-rw-r--r-- | drivers/net/benet/be_cmds.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c index 7fd860dcbc8..3d305494a60 100644 --- a/drivers/net/benet/be_cmds.c +++ b/drivers/net/benet/be_cmds.c @@ -75,6 +75,7 @@ static int be_mcc_compl_process(struct be_adapter *adapter, be_dws_le_to_cpu(&resp->hw_stats, sizeof(resp->hw_stats)); netdev_stats_update(adapter); + adapter->stats_ioctl_sent = false; } } else if ((compl_status != MCC_STATUS_NOT_SUPPORTED) && (compl->tag0 != OPCODE_COMMON_NTWK_MAC_QUERY)) { @@ -951,6 +952,7 @@ int be_cmd_get_stats(struct be_adapter *adapter, struct be_dma_mem *nonemb_cmd) sge->len = cpu_to_le32(nonemb_cmd->size); be_mcc_notify(adapter); + adapter->stats_ioctl_sent = true; err: spin_unlock_bh(&adapter->mcc_lock); |