Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp86950rdb; Wed, 21 Feb 2024 18:34:29 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXVDGsZ4CeyA6BP7HJw4wUr27AGkoXMD/fTv7f86Z6fW7szXe5kperlZp2YXNESha8aaLD3EwEkuIhO/Avxx73Q9PpjTDUK+LnJEX7Jaw== X-Google-Smtp-Source: AGHT+IEyxV3jnv9bU2OTyfgxW8Gp3gwrB0J6DdFRZ0Fp+sLISQI8ZBbkq4QqkbOgAUk4bcLr2B1p X-Received: by 2002:a17:906:5fcb:b0:a3e:78fb:6856 with SMTP id k11-20020a1709065fcb00b00a3e78fb6856mr1084683ejv.5.1708569269666; Wed, 21 Feb 2024 18:34:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708569269; cv=pass; d=google.com; s=arc-20160816; b=jI9Cmb4xHyMQ4PM5e699lK0OyWcUuzG+s0kGFnzzKdBniBfnJsnKqMzQapOukk+4BW GreUCnIGWGCRLy6okTVs/lINsnTqEG8qGeX4+c8Jg1mUSJ39prlBxkCc6c5DwLEj2Ooi KZ18Nm3yvfHqyVVr+iFmwMLOsQQZziZvU7CDutmzzMNFzFIMu0UbQzY5IodkFkDbkPmJ n7VkJlaJcqsDGh/zw7GIEpppM2UZmyGz0zF8a87wAZvUpUttELANm6D5cHaqdwHPbAzm x0zmIIAc2InubxankqZYo195ZBKdkrPPY81mZ0Yvmk8xiruQrZRqHdxEXIr9vj4VDoYP UBGg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=Pfot7sAKRzjoMPJH/FBh9iX8mxb5jR44xgnyvxe9w3A=; fh=LXqbBHdAmYtnI3JBc8moB/66bI4UCIYiTNHKkugDCdo=; b=s73lKRgzKYPC7FaghWvNRLV5NMCbyuKoCE/wiX/HLF5GmiUgXPGCdhI6vnAjdF5Vwy GnCoIHl/B13Sz6r1sogBPG6mJ85m3pX90tx/ecfc9LZoZQE1G4++TkVt0xuoY8bNA5Sg bcSVdHixjBoJGWJ9Z009RNBNSMbXHXRHcapdrn081Q8XzEbUIXnDvE3A88XFfk9bNNhr Wx2Hr5lQsU62VMNpcF2c29X70LphkvAEiMyJBsTk51JG5dsh71izvEoIvqNShgBu2Xp3 829BA4HMjQ7rfWJDeDtvNxv4RBvRQCkwPHIwvNQFE7cThAtM3OLHawVJLPQCtcrplmwH DW3w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=FgyQFe6W; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-3892-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3892-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id js2-20020a17090797c200b00a3f8d07ba67si20372ejc.34.2024.02.21.18.34.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 18:34:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-3892-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=FgyQFe6W; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-3892-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3892-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 6E3DD1F22547 for ; Thu, 22 Feb 2024 02:34:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 384958F77; Thu, 22 Feb 2024 02:34:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="FgyQFe6W" X-Original-To: linux-wireless@vger.kernel.org Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C6DC10A05 for ; Thu, 22 Feb 2024 02:34:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708569266; cv=none; b=gv6Q4BbdM2xwXQidyOKX7XyouSIyMHpcGF1J79T2NHpYunzxBj/yhb+iYCkM8V2dR2QIZBuhBWxyU2f+FyyFZzReoUioJWqJMIV1/j5q/pRUPmqTbGShmCGPs3wvsNkj21EcimE5NGoNKPPRFaOY/o56mvnH6pY9m2QuEMwtM0U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708569266; c=relaxed/simple; bh=LOG8a9b4RTdKh25JGUxjoxnHfqLazFLczG42mm5pCpo=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=l+okCclTb5NhuRQjLFJIZ5yFpGTaGBSCimMhVmQ27b/gg+HU+p+XiGoul7T9mqwNyGcwL4uX9MGNJkcsFgeAviFy5xz1Yu4gOkGFCSoALQOEBvAThYzvxP/a9etbmE+YzgI/md6cVfyq1YapYVhtj6TGSm6UtANP4kRUHFo9uuU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=FgyQFe6W; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41LNoOqp020539; Thu, 22 Feb 2024 02:34:22 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=Pfot7sAKRzjoMPJH/FBh9iX8mxb5jR44xgnyvxe9w3A=; b=Fg yQFe6W6y9waBMoTqk66EaY+ha0J9286yY7SL99sBp28YKTsbyiMHRoxxVUvqClcr 2oZ5uYug19eHIxhVGH7sn5RBs0qonxzkqPhyz6bCd0RuXyUouC0ZjQd6IVjSQAqE y77Bf+U1GtJcB2rXCXk/+iI8lOiWus8PCa4piRReTJyaTSTu0vUhuqpm70O2euIP l+LkQYygJmAg9alUppQdVlnC019x3P7/OWv4PupnI03qUyq8Gaa4RCzN+16MpuVT epvT5nETRKgCotsoHIqvOMXrAg4NTNP041cQbcHL6zgi1dibWWMLtQ9uDfvZUbbC W8Yfv0FY0ujQBRTdIllg== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wdpjn8uhk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Feb 2024 02:34:21 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 41M2YLVw030842 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Feb 2024 02:34:21 GMT Received: from [10.231.195.68] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 21 Feb 2024 18:34:19 -0800 Message-ID: <5828b835-6b4d-4245-991a-7f6b54ee8b51@quicinc.com> Date: Thu, 22 Feb 2024 10:34:16 +0800 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 5/5] wifi: ath11k: thermal: don't try to register multiple times Content-Language: en-US To: Jeff Johnson , , "Kalle Valo (QUIC)" CC: References: <20240221024725.10057-1-quic_bqiang@quicinc.com> <20240221024725.10057-6-quic_bqiang@quicinc.com> From: Baochen Qiang In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: uV9foEl_WsDLbFi93Q31RYrhryUItgOF X-Proofpoint-GUID: uV9foEl_WsDLbFi93Q31RYrhryUItgOF X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-22_01,2024-02-21_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 suspectscore=0 spamscore=0 priorityscore=1501 impostorscore=0 lowpriorityscore=0 clxscore=1015 bulkscore=0 mlxlogscore=984 malwarescore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2402220018 On 2/22/2024 1:15 AM, Jeff Johnson wrote: > On 2/20/2024 6:47 PM, Baochen Qiang wrote: >> From: Kalle Valo >> >> Every time the firmware boots we call ath11k_core_qmi_firmware_ready() which >> ends up calling ath11k_thermal_register(). So we try to register thermal >> devices multiple times. And when we power off the firmware during >> suspend/hibernation (implemented in the next patch) we get a warning in resume: >> >> hwmon hwmon4: PM: parent phy0 should not be sleeping >> >> Workaround this similarly like ath11k_mac_register() does by testing >> ATH11K_FLAG_REGISTERED. >> >> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30 >> >> Signed-off-by: Kalle Valo > > you need to add your own S-O-B Oh, sorry for missing that. Hi Kalle, I see you have put this series in pending branch. I am wondering if I need to send a v2 to add my S-O-B tag, or you have any other plan? > >> --- >> drivers/net/wireless/ath/ath11k/thermal.c | 5 ++++- >> 1 file changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/net/wireless/ath/ath11k/thermal.c b/drivers/net/wireless/ath/ath11k/thermal.c >> index c29b11ab5bfa..41e7499f075f 100644 >> --- a/drivers/net/wireless/ath/ath11k/thermal.c >> +++ b/drivers/net/wireless/ath/ath11k/thermal.c >> @@ -1,7 +1,7 @@ >> // SPDX-License-Identifier: BSD-3-Clause-Clear >> /* >> * Copyright (c) 2020 The Linux Foundation. All rights reserved. >> - * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. >> + * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved. >> */ >> >> #include >> @@ -163,6 +163,9 @@ int ath11k_thermal_register(struct ath11k_base *ab) >> struct ath11k_pdev *pdev; >> int i, ret; >> >> + if (test_bit(ATH11K_FLAG_REGISTERED, &ab->dev_flags)) >> + return 0; >> + >> for (i = 0; i < ab->num_radios; i++) { >> pdev = &ab->pdevs[i]; >> ar = pdev->ar; >