mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-21 10:01:00 +00:00
sfc: farch: fix TX queue lookup in TX event handling
commit83b09a1807
upstream. We're starting from a TXQ label, not a TXQ type, so efx_channel_get_tx_queue() is inappropriate (and could return NULL, leading to panics). Fixes:12804793b1
("sfc: decouple TXQ type from label") Cc: stable@vger.kernel.org Signed-off-by: Edward Cree <ecree.xilinx@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
fb791572d6
commit
bf2b941d0a
1 changed files with 4 additions and 4 deletions
|
@ -835,14 +835,14 @@ efx_farch_handle_tx_event(struct efx_channel *channel, efx_qword_t *event)
|
|||
/* Transmit completion */
|
||||
tx_ev_desc_ptr = EFX_QWORD_FIELD(*event, FSF_AZ_TX_EV_DESC_PTR);
|
||||
tx_ev_q_label = EFX_QWORD_FIELD(*event, FSF_AZ_TX_EV_Q_LABEL);
|
||||
tx_queue = efx_channel_get_tx_queue(
|
||||
channel, tx_ev_q_label % EFX_MAX_TXQ_PER_CHANNEL);
|
||||
tx_queue = channel->tx_queue +
|
||||
(tx_ev_q_label % EFX_MAX_TXQ_PER_CHANNEL);
|
||||
efx_xmit_done(tx_queue, tx_ev_desc_ptr);
|
||||
} else if (EFX_QWORD_FIELD(*event, FSF_AZ_TX_EV_WQ_FF_FULL)) {
|
||||
/* Rewrite the FIFO write pointer */
|
||||
tx_ev_q_label = EFX_QWORD_FIELD(*event, FSF_AZ_TX_EV_Q_LABEL);
|
||||
tx_queue = efx_channel_get_tx_queue(
|
||||
channel, tx_ev_q_label % EFX_MAX_TXQ_PER_CHANNEL);
|
||||
tx_queue = channel->tx_queue +
|
||||
(tx_ev_q_label % EFX_MAX_TXQ_PER_CHANNEL);
|
||||
|
||||
netif_tx_lock(efx->net_dev);
|
||||
efx_farch_notify_tx_desc(tx_queue);
|
||||
|
|
Loading…
Reference in a new issue