Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2298284rdg; Sun, 15 Oct 2023 22:37:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEY1BQ/jjzhi6wYoTALpZHi+b1CYNM+JzOmF+muEr5i2QbqLHMxyQeCLBm2po0/ZuJlO0lZ X-Received: by 2002:a25:ef42:0:b0:d9a:56c2:545c with SMTP id w2-20020a25ef42000000b00d9a56c2545cmr16105988ybm.15.1697434629977; Sun, 15 Oct 2023 22:37:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697434629; cv=none; d=google.com; s=arc-20160816; b=JEBVo/8H0njCEbUFgIQ2fuPK3rl0LJW/Y8qHZny0KDxHll5wLFJFz5LeAhxuL9b3OX O8ocdtvBYyaXD/tlkEPq84ujtDYx6W/AbvT+4nfG/2/q1ylERGSq95Qso1fBWYDj9zXx 4reBsk2ehbG378cyGx0vZi74Ns7OKEsxgTVFCOoq5dTs5PARz58qYzoAoM79qSr6C4BW LM1itO2t3/M02o2/7LtH+BIGz6uHlckqJ+1dpHn+RTlm+nA4qsdg7xrPhRCxHUeBkxzT sWbLekXVoHBAZbhQDjskBUMcDAS1JuEA3Fub74YPCKiEWktSRj8SH3C6D7OjjbLFDcNr 722A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=IZ0mnJmE9YjcS62tPX8Tw/0uf/Mz+7eHFvjS114hWUA=; fh=rwbbOpirGLazcG3VmHY7vQI1XGYPlr4kq9/FvO3l4jE=; b=uAo/HOQ+D36rnLRF5qO9GF5Iv5jIdWvHvcNcIRwCL9HNDGg+jenoBZx8u2RZhbkD3+ Dt0NfGFSYwENAUV4Q9EbKR6aKIqX/ug1/CRiz6Assf5XGvrV6Rv+Bc/XjDQB9gio+FSp 0MG5MmEe5vlkNz2rgbQ+1LRf9nEK8LHZd+M+1TY0psxcFYcQ/WiND16IT+3/tFfTcsVG a9xzl9x8yEvZ+16nPMigc0UzEHpsXxLfutGzVTmmfxEFeyFz07F7oqvmz4jHzpCHmQZC cBwBaWkkaU33KlXdZeZxJ16OUllacnRQyw5Ajytz/qJ2fQLODx177KAkx7jjF/E+tDkD OXMw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id x18-20020a63f712000000b0058c3a0497c2si9660674pgh.538.2023.10.15.22.37.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Oct 2023 22:37:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id CB0AF8077985; Sun, 15 Oct 2023 22:37:08 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231980AbjJPFhF (ORCPT + 51 others); Mon, 16 Oct 2023 01:37:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231941AbjJPFgp (ORCPT ); Mon, 16 Oct 2023 01:36:45 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F4F519A for ; Sun, 15 Oct 2023 22:36:35 -0700 (PDT) X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 39G5aQyD52175048, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.93/5.92) with ESMTPS id 39G5aQyD52175048 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 16 Oct 2023 13:36:26 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.17; Mon, 16 Oct 2023 13:36:26 +0800 Received: from [127.0.1.1] (172.21.71.113) by RTEXMBS04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Mon, 16 Oct 2023 13:36:25 +0800 From: Ping-Ke Shih To: CC: , Subject: [PATCH 0/2] wifi: rtw88: dump registers related to firmware state when it get abnormal Date: Mon, 16 Oct 2023 13:35:52 +0800 Message-ID: <20231016053554.744180-1-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [172.21.71.113] X-ClientProxiedBy: RTEXMBS02.realtek.com.tw (172.21.6.95) To RTEXMBS04.realtek.com.tw (172.21.6.97) X-KSE-ServerInfo: RTEXMBS04.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 15 Oct 2023 22:37:08 -0700 (PDT) In field, someone reported firmware of rtw88 doesn't response H2C commands, or failed to enter PS mode. But, it is hard to reproduce in our side, so add this debug patch to have a regular flow to collect registers for easier remote debugging. Chin-Yen Lee (2): wifi: rtw88: debug: add to check if debug mask is enabled wifi: rtw88: dump firmware debug information in abnormal state drivers/net/wireless/realtek/rtw88/debug.h | 12 ++++ drivers/net/wireless/realtek/rtw88/fw.c | 74 ++++++++++++++++++++++ drivers/net/wireless/realtek/rtw88/fw.h | 3 + drivers/net/wireless/realtek/rtw88/main.h | 6 ++ drivers/net/wireless/realtek/rtw88/ps.c | 2 + drivers/net/wireless/realtek/rtw88/reg.h | 23 +++++++ 6 files changed, 120 insertions(+) -- 2.25.1