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
135135 int i, j;
136136 struct nx_host_tx_ring *tx_ring = adapter->tx_ring;
137137
138− spin_lock(&adapter->tx_clean_lock);
138+ spin_lock_bh(&adapter->tx_clean_lock);
139139 cmd_buf = tx_ring->cmd_buf_arr;
140140 for (i = 0; i < tx_ring->num_desc; i++) {
141141 buffrag = cmd_buf->frag_array;
@@ -159,7 +159,7 @@ void netxen_release_tx_buffers(struct netxen_adapter *adapter) · 17 unmodified lines
159159 }
160160 cmd_buf++;
161161 }
162− spin_unlock(&adapter->tx_clean_lock);
162+ spin_unlock_bh(&adapter->tx_clean_lock);
163163 }
164164
165165 void netxen_free_sw_resources(struct netxen_adapter *adapter)