mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
iwlwifi: add FreeBSD specific debugging
"Invalid TXQ id" and "Queue <n> is stuck <x> <y>" are two errors seen more commonly by FreeBSD users. Try to gather some extra data the "easy way" adding more error logging for these situations in the hope to find a clue or at least do more targetd debugging in the future. Note that for one of the errors the Linux Intel driver has a TODO to print register data. If that will show up in future versions of the driver this may also help. Sponsored by: The FreeBSD Foundation MFC after: 3 days
This commit is contained in:
parent
489482e276
commit
e674ddec0b
2 changed files with 18 additions and 0 deletions
|
|
@ -1139,6 +1139,11 @@ static int iwl_mvm_tx_mpdu(struct iwl_mvm *mvm, struct sk_buff *skb,
|
|||
WARN_ON_ONCE(info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM);
|
||||
|
||||
if (WARN_ONCE(txq_id == IWL_MVM_INVALID_QUEUE, "Invalid TXQ id")) {
|
||||
#if defined(__FreeBSD__)
|
||||
IWL_ERR(mvm, "fc %#06x sta_id %u tid %u txq_id %u mvm %p "
|
||||
"skb %p { len %u } info %p sta %p\n", fc, mvmsta->sta_id,
|
||||
tid, txq_id, mvm, skb, skb->len, info, sta);
|
||||
#endif
|
||||
iwl_trans_free_tx_cmd(mvm->trans, dev_cmd);
|
||||
spin_unlock(&mvmsta->lock);
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -988,6 +988,19 @@ void iwl_txq_log_scd_error(struct iwl_trans *trans, struct iwl_txq *txq)
|
|||
if (trans->trans_cfg->use_tfh) {
|
||||
IWL_ERR(trans, "Queue %d is stuck %d %d\n", txq_id,
|
||||
txq->read_ptr, txq->write_ptr);
|
||||
#if defined(__FreeBSD__)
|
||||
/*
|
||||
* Dump some more queue and timer information to rule
|
||||
* out a LinuxKPI issues and gather some extra data.
|
||||
*/
|
||||
IWL_ERR(trans, " need_update %d frozen %d ampdu %d "
|
||||
"now %ju stuck_timer.expires %ju "
|
||||
"frozen_expiry_remainder %ju wd_timeout %ju\n",
|
||||
txq->need_update, txq->frozen, txq->ampdu,
|
||||
(uintmax_t)jiffies, (uintmax_t)txq->stuck_timer.expires,
|
||||
(uintmax_t)txq->frozen_expiry_remainder,
|
||||
(uintmax_t)txq->wd_timeout);
|
||||
#endif
|
||||
/* TODO: access new SCD registers and dump them */
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue