From nobody Wed Sep 21 14:01:33 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MXg7d4n1wz4cYJB; Wed, 21 Sep 2022 14:01:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MXg7d3pHhz4B8Z; Wed, 21 Sep 2022 14:01:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663768893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5iQqdj4mfWYipvSOZkhgJXfLu+lkPvH0k2nAVeV20NQ=; b=xYbeIzrRhWETpd5GsNOuQGVawMcs0uJJsEzdX5UzZEWD4/V8Vu0VtzCknL3//v/owQz9DS q6r45ah48FYPk+I6Jm6fFDvyCMjY0xtfoEQiXVpdMIqPZ8OZliuIwDUBXx1SbUhdbkyJl+ B8VUuO3REct7ZMfzKGNyXsvunWm1ZD0I7EFziql+pjIYCbNFgw9DEl73sERGrWs98lB2w8 stN8qnqOguruWfeBMOE6ptvvu0evOTz8gIEEdkCTxmensIBWoJF8v4Ka4YWwqRJGY5hUXL bnG1h24iAKJZ1XQnO7s++2wY8HMBIuAuivgQDoHnNWpwc+Y9GgeHUIBv/Wg8ow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MXg7d2d5Qz153V; Wed, 21 Sep 2022 14:01:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 28LE1X2L000319; Wed, 21 Sep 2022 14:01:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28LE1XIZ000318; Wed, 21 Sep 2022 14:01:33 GMT (envelope-from git) Date: Wed, 21 Sep 2022 14:01:33 GMT Message-Id: <202209211401.28LE1XIZ000318@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 04fd1598bc92 - stable/13 - iwlwifi: add FreeBSD specific debugging List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 04fd1598bc923607ead9ab10fe7e83d6c18d5f4c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663768893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5iQqdj4mfWYipvSOZkhgJXfLu+lkPvH0k2nAVeV20NQ=; b=FchUmPyxhXhxip5Qe7a5YodSP9stVJWly22ddxqf52F4loml+gkoPhiQ+CrWIYLYS2nrsy unppJPi+p0sjghIq26B7WCqRyREmPykzaipcCd4FNEYJX2PmvHU5cXeJWEgaOcdRthcZDM wWqOHKzRmO873bvjLeAK5FFP8zUtcQIpXINflJ2LX7bsl/aJxOAcxZxMYZ/9YbP/xkE5a1 EU8hmi1rXZ59pPOtrkVgt2ih8JHnFEVmqlFrE9sPHioV9AB0NsQLDeuUXP5WS9+BtF9jUo cb4z5ezLJjTLM5C3gjdCcjUj8Q/HCA3seAIoh04+xiuz2qZruJLp6Kq8g3FOFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1663768893; a=rsa-sha256; cv=none; b=kQdKhYBMtGBSp98Y82JJ+pz3+XvZF94Nxkq96rJdNuvGh7CsnWoNZI1clEFpQUPWpfX8QE qW9Smj70XMNFs4foadKpAljzBnwW1fpoqQyrfL3qVNxffv+Y5waikEXo3XBhRttBxyWWji W5Hl2XlPawMsG3T5EoCKY6Ms/Al7MYdNre/7Wwr0sy0QAKFWB7lMVMLu/3gc2i1+3r5aaW 8afLC1J0JNZ2VH12/ul7/z33e0dQbmEC24AYKcOHB/mZ0ghu4l3DdaCX1NkMJuFV4fTwxk C9ZkZPQNltxuxYITkGzImaCmgjmKwDQhhOWbA5aJueCu+3MWyMyHuvPhmmJYTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=04fd1598bc923607ead9ab10fe7e83d6c18d5f4c commit 04fd1598bc923607ead9ab10fe7e83d6c18d5f4c Author: Bjoern A. Zeeb AuthorDate: 2022-08-17 16:11:47 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-09-21 11:46:46 +0000 iwlwifi: add FreeBSD specific debugging "Invalid TXQ id" and "Queue is stuck " 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 (cherry picked from commit e674ddec0b4138274539587fe9336b577ff1242a) --- sys/contrib/dev/iwlwifi/mvm/tx.c | 5 +++++ sys/contrib/dev/iwlwifi/queue/tx.c | 13 +++++++++++++ 2 files changed, 18 insertions(+) diff --git a/sys/contrib/dev/iwlwifi/mvm/tx.c b/sys/contrib/dev/iwlwifi/mvm/tx.c index 8125bb76f59e..303d9b1e5a02 100644 --- a/sys/contrib/dev/iwlwifi/mvm/tx.c +++ b/sys/contrib/dev/iwlwifi/mvm/tx.c @@ -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; diff --git a/sys/contrib/dev/iwlwifi/queue/tx.c b/sys/contrib/dev/iwlwifi/queue/tx.c index 3f6bda96bfb5..eb290a4fd06a 100644 --- a/sys/contrib/dev/iwlwifi/queue/tx.c +++ b/sys/contrib/dev/iwlwifi/queue/tx.c @@ -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; }