While testing this driver with DEBUG_LOCKDEP and DEBUG_SPINLOCK enabled did not produce any traces, it would be more prudent in the case of tx_clean_lock to use spin_[un]lock_bh, since this lock is manipulated in both the process and softirq contexts. This patch was tested for functionality and regressions with netperf and DEBUG_LOCKDEP and DEBUG_SPINLOCK enabled.
Unified · Split
| @@ -135,7 +135,7 @@ void netxen_release_tx_buffers(struct netxen_adapter *adapter) · 134 unmodified lines | ||
| 135 | 135 | int i, j; |
| 136 | 136 | struct nx_host_tx_ring *tx_ring = adapter->tx_ring; |
| 137 | 137 | |
| 138 | − spin_lock(&adapter->tx_clean_lock); | |
| 138 | + spin_lock_bh(&adapter->tx_clean_lock); | |
| 139 | 139 | cmd_buf = tx_ring->cmd_buf_arr; |
| 140 | 140 | for (i = 0; i < tx_ring->num_desc; i++) { |
| 141 | 141 | buffrag = cmd_buf->frag_array; |
| @@ -159,7 +159,7 @@ void netxen_release_tx_buffers(struct netxen_adapter *adapter) · 17 unmodified lines | ||
| 159 | 159 | } |
| 160 | 160 | cmd_buf++; |
| 161 | 161 | } |
| 162 | − spin_unlock(&adapter->tx_clean_lock); | |
| 162 | + spin_unlock_bh(&adapter->tx_clean_lock); | |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | void netxen_free_sw_resources(struct netxen_adapter *adapter) |