Skip to content

Commit c232d8a

Browse files
camusodavem330
authored andcommitted
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. Signed-off-by: Tony Camuso <[email protected]> Acked-by: Neil Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 17d5ceb commit c232d8a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ void netxen_release_tx_buffers(struct netxen_adapter *adapter)
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)
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)

0 commit comments

Comments
 (0)