Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2152742rdb; Sun, 4 Feb 2024 18:17:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IEfRckZimOWRtg7suQzP1qPXHMBQ9rxD6yxB4Mxuyb/IgHYsmW8Zb4hfN3YCU9et4VtNs6D X-Received: by 2002:aa7:9e9c:0:b0:6e0:4d1b:b45 with SMTP id p28-20020aa79e9c000000b006e04d1b0b45mr108172pfq.20.1707099472947; Sun, 04 Feb 2024 18:17:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707099472; cv=pass; d=google.com; s=arc-20160816; b=J9E6FGCmlnIIshSkCQLNjvSQWlxbm5NzV2G6op6fljbSzI+I0/aTT03uTVpxWXRPcV MINGlVcYT/5iIJ4zeMY2/ZgySrD0Fnfqa1i/zIjfMhD+vafCleA53thl7MnFFEklZHB0 6jArO0WcuUtbvrPitb9uAaCxZuuE2Y0DbdZqIpYY0uts2sh9+hUEsNl6DCk9vEPdV6XZ 2utBtJGYyobBW5oDssjSoLywoV3/j2qlw4TefoVGyUwVT8UW2R0pm9Ewa6KhJ/xb1lm9 dTYmLzsWaN19FsPxe9lQFelzTjZdavNJoEoEQGwiFV1QL9hQQnDVk6ExLUOAjxDQ6d9k qCQw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:content-language:accept-language :in-reply-to:references:message-id:date:thread-index:thread-topic :subject:cc:to:from; bh=lpv07Voxb6BSKSiGRy7feW4Y/PRQrWV0JSdekc00qxQ=; fh=MR6b+WKf8BYv6TjPeI5Rqs1SlfKGSa3OtU9Fo6i7MsM=; b=F3M3ipmwhLkLM17BhI6U+GX+Os0DD41ULEMLiXQFlAHgTescvfNX9LfecXzCU7WslU Vc4Cmi3xh00t92gi2RTTsP1zF0O1SdVckqYZavknmZrHWqYwoAO2sv5RL569+GHykfeb +B4rCtRtLfRGQA6efKRHaXcZUUNhQGiqWVFsXRJjuD93uv+TRgEds7sL7zihbKfgo629 kmA1V0caC/DQe/7LH425hwAsxGNbX7pOIqYVsDD6+P3wLsuQM0xn/m5u/edS4pSX0ODg c5i7n+D/9wNw9pKuXgAOz50iV2kjoqV2O1/fCcYu82RFljLWHOVoDh8fSimWJZkEEjqr NAMw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-3118-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3118-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCUOTBgBdzonkcOkLS8o8gL0m8u/zJ4pzZE89vsfZtJxuXYMZb7eoP1IT2w9KvgAfr/klXAsenErHTjxlu2lWUTgUyilFzBUT0vUhtrvHg== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id z3-20020aa79903000000b006dff751090bsi413014pff.55.2024.02.04.18.17.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 18:17:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-3118-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-3118-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3118-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 30021282A6E for ; Mon, 5 Feb 2024 02:17:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E211FA953; Mon, 5 Feb 2024 02:17:48 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 05CEBA93A; Mon, 5 Feb 2024 02:17:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.75.126.72 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707099468; cv=none; b=KZiGeUanjnPFAhp1d8O232lxbdrsEAj2efkyPX77rASThIQAcSS6tdJZw5YIlTs+b4ngS9KWSs3PzIS37ldv6G+zSbsAQq6WGchcQazBu2mxOkulsQucnnjbMJQmza9+lyqDF72C52BiBGwTp+RuoTR1AsnKyA+LR5Jhl9utQs4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707099468; c=relaxed/simple; bh=WNDuIPvjuiv1VdTFhlWFLweTVVPgBsw2pUB1O0BQSS4=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=S0+6vj/4qvHUY4BdpUwZTyJc9+PYgcQyRB99Y3dNdxS0oOrZig9Pxvx7iVfVLLdLvvmskg9roAFeySU4gJbY3Z+Jf1l2wlnrMBzZUtZlf9tOPTrm71zHb6NsWXsowr+Z52FGJK4fOC2FCft6bwWzp56bdkLIeCD2GXU3T30XXsA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com; spf=pass smtp.mailfrom=realtek.com; arc=none smtp.client-ip=211.75.126.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 4152HSL303002743, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36505.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.95/5.92) with ESMTPS id 4152HSL303002743 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 5 Feb 2024 10:17:28 +0800 Received: from RTEXMBS01.realtek.com.tw (172.21.6.94) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.32; Mon, 5 Feb 2024 10:17:28 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS01.realtek.com.tw (172.21.6.94) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Mon, 5 Feb 2024 10:17:27 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::c9b7:82a9:7e98:fa7f]) by RTEXMBS04.realtek.com.tw ([fe80::c9b7:82a9:7e98:fa7f%7]) with mapi id 15.01.2507.035; Mon, 5 Feb 2024 10:17:27 +0800 From: Ping-Ke Shih To: Fiona Klute , "linux-wireless@vger.kernel.org" CC: Kalle Valo , Ulf Hansson , "linux-mmc@vger.kernel.org" , Pavel Machek , =?iso-8859-2?Q?Ond=F8ej_Jirman?= Subject: RE: [PATCH 2/9] wifi: rtw88: Debug output for rtw8723x EFUSE Thread-Topic: [PATCH 2/9] wifi: rtw88: Debug output for rtw8723x EFUSE Thread-Index: AQHaVdDuc4Tx2NyUOkComV3+akm5JLD7AKug Date: Mon, 5 Feb 2024 02:17:27 +0000 Message-ID: <40d7f3f551254cb8b3cdfcba25052550@realtek.com> References: <20240202121050.977223-1-fiona.klute@gmx.de> <20240202121050.977223-3-fiona.klute@gmx.de> In-Reply-To: <20240202121050.977223-3-fiona.klute@gmx.de> Accept-Language: en-US, zh-TW Content-Language: zh-TW x-kse-serverinfo: RTEXMBS01.realtek.com.tw, 9 x-kse-antispam-interceptor-info: fallback x-kse-antivirus-interceptor-info: fallback Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-ServerInfo: RTEXH36505.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback > -----Original Message----- > From: Fiona Klute > Sent: Friday, February 2, 2024 8:11 PM > To: linux-wireless@vger.kernel.org; Ping-Ke Shih > Cc: Kalle Valo ; Ulf Hansson ; = linux-mmc@vger.kernel.org; Pavel > Machek ; Ond=F8ej Jirman ; Fiona Klute > Subject: [PATCH 2/9] wifi: rtw88: Debug output for rtw8723x EFUSE >=20 > Some 8703b chips contain invalid EFUSE data, getting detailed > information is critical when analyzing issues caused by that. >=20 > Signed-off-by: Fiona Klute > --- > The TX power table debug output function (rtw8723x_debug_txpwr_limit) > isn't specific to the chip family. Should I move it to debug.c > (e.g. as rtw_debug_txpwr_limit_2g)? I think no need. My another thinking is to add an debugfs entry to read these stuff out, but if failed to probe we can't get these information.=20 >=20 > drivers/net/wireless/realtek/rtw88/rtw8723x.c | 159 ++++++++++++++++++ > drivers/net/wireless/realtek/rtw88/rtw8723x.h | 11 ++ > 2 files changed, 170 insertions(+) >=20 > diff --git a/drivers/net/wireless/realtek/rtw88/rtw8723x.c > b/drivers/net/wireless/realtek/rtw88/rtw8723x.c > index 2b58064547..bca650c6bb 100644 > --- a/drivers/net/wireless/realtek/rtw88/rtw8723x.c > +++ b/drivers/net/wireless/realtek/rtw88/rtw8723x.c > @@ -63,6 +63,163 @@ static void __rtw8723x_lck(struct rtw_dev *rtwdev) > rtw_write8(rtwdev, REG_TXPAUSE, 0x00); > } >=20 > +#define DBG_EFUSE_VAL(map, name) \ I think we should not hide 'rtwdev' > + rtw_dbg(rtwdev, RTW_DBG_EFUSE, # name "=3D0x%x\n", \ > + (map)->name) > +#define DBG_EFUSE_2BYTE(map, name) \ > + rtw_dbg(rtwdev, RTW_DBG_EFUSE, # name "=3D0x%x%x\n", \ Should format be '%02x%02x' for two bytes? > + (map)->name[0], (map)->name[1]) > + > +static void rtw8723xe_efuse_debug(struct rtw_dev *rtwdev, > + struct rtw8723x_efuse *map) > +{ > + rtw_dbg(rtwdev, RTW_DBG_EFUSE, "mac_addr=3D%pM\n", map->e.mac_add= r); > + DBG_EFUSE_2BYTE(map, e.vendor_id); > + DBG_EFUSE_2BYTE(map, e.device_id); > + DBG_EFUSE_2BYTE(map, e.sub_vendor_id); > + DBG_EFUSE_2BYTE(map, e.sub_device_id); > +} > + > +static void rtw8723xu_efuse_debug(struct rtw_dev *rtwdev, > + struct rtw8723x_efuse *map) > +{ > + DBG_EFUSE_2BYTE(map, u.vendor_id); > + DBG_EFUSE_2BYTE(map, u.product_id); > + DBG_EFUSE_VAL(map, u.usb_option); > + rtw_dbg(rtwdev, RTW_DBG_EFUSE, "mac_addr=3D%pM\n", map->u.mac_add= r); Just curious why 'mac_addr' is the first one in rtw8723xe_efuse_debug(), bu= t the last one here? > +} > + [...]