History

netxen_nic: use spin_[un]lock_bh around tx_clean_lock

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.

Tony Camuso committed 11 years ago

Commit c232d8a1 parent 17d5ceb1 file · +2 −2Browse files

Unified · Split

drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c+2−2
@@ -135,7 +135,7 @@ void netxen_release_tx_buffers(struct netxen_adapter *adapter) · 134 unmodified lines
135 int i, j;135 int i, j;
136 struct nx_host_tx_ring *tx_ring = adapter->tx_ring;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 cmd_buf = tx_ring->cmd_buf_arr;139 cmd_buf = tx_ring->cmd_buf_arr;
140 for (i = 0; i < tx_ring->num_desc; i++) {140 for (i = 0; i < tx_ring->num_desc; i++) {
141 buffrag = cmd_buf->frag_array;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 cmd_buf++;160 cmd_buf++;
161 }161 }
162 spin_unlock(&adapter->tx_clean_lock);162 spin_unlock_bh(&adapter->tx_clean_lock);
163}163}
164 164
165void netxen_free_sw_resources(struct netxen_adapter *adapter)165void netxen_free_sw_resources(struct netxen_adapter *adapter)