diff options
author | Sathya Perla <sathyap@serverengines.com> | 2009-06-09 22:23:50 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-11 05:47:19 -0400 |
commit | 934037bc2ed29a94bbde72aa6a2e66bdc5861b98 (patch) | |
tree | 45104a213708003c341a3b10d3c9cb9b4503adea /drivers/net/benet | |
parent | a7a0ef31def6b6badd94fc96c8f17c2e18d91513 (diff) |
be2net: Fix be_tx_q_clean() being called on freed queues
In the tx queue destroy path, be_tx_q_clean() is currently called after the tx queues are freed; it must be called before.
Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/benet')
-rw-r--r-- | drivers/net/benet/be_main.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index 86f70af93d60..66bb56874d9b 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c | |||
@@ -1056,8 +1056,13 @@ static void be_tx_queues_destroy(struct be_adapter *adapter) | |||
1056 | struct be_queue_info *q; | 1056 | struct be_queue_info *q; |
1057 | 1057 | ||
1058 | q = &adapter->tx_obj.q; | 1058 | q = &adapter->tx_obj.q; |
1059 | if (q->created) | 1059 | if (q->created) { |
1060 | be_cmd_q_destroy(&adapter->ctrl, q, QTYPE_TXQ); | 1060 | be_cmd_q_destroy(&adapter->ctrl, q, QTYPE_TXQ); |
1061 | |||
1062 | /* No more tx completions can be rcvd now; clean up if there | ||
1063 | * are any pending completions or pending tx requests */ | ||
1064 | be_tx_q_clean(adapter); | ||
1065 | } | ||
1061 | be_queue_free(adapter, q); | 1066 | be_queue_free(adapter, q); |
1062 | 1067 | ||
1063 | q = &adapter->tx_obj.cq; | 1068 | q = &adapter->tx_obj.cq; |
@@ -1065,10 +1070,6 @@ static void be_tx_queues_destroy(struct be_adapter *adapter) | |||
1065 | be_cmd_q_destroy(&adapter->ctrl, q, QTYPE_CQ); | 1070 | be_cmd_q_destroy(&adapter->ctrl, q, QTYPE_CQ); |
1066 | be_queue_free(adapter, q); | 1071 | be_queue_free(adapter, q); |
1067 | 1072 | ||
1068 | /* No more tx completions can be rcvd now; clean up if there are | ||
1069 | * any pending completions or pending tx requests */ | ||
1070 | be_tx_q_clean(adapter); | ||
1071 | |||
1072 | q = &adapter->tx_eq.q; | 1073 | q = &adapter->tx_eq.q; |
1073 | if (q->created) | 1074 | if (q->created) |
1074 | be_cmd_q_destroy(&adapter->ctrl, q, QTYPE_EQ); | 1075 | be_cmd_q_destroy(&adapter->ctrl, q, QTYPE_EQ); |