Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2624202rbb; Wed, 28 Feb 2024 07:36:32 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUo5gTzoBXidN/N1+MnjrJswmF5hUVRD2K+j0Cab4HhlgROUZh+8mnjrrjJhcTMz0LR1utcTBU6SlhFSDNW7jRbpeE91w6Wqx5ykb6Xdg== X-Google-Smtp-Source: AGHT+IF7vOWx++XYFrr0d3DdoFxOekQY0dcY9gJSdZo9pMmV9lzsxw4PVcR3/XVkRObp2gZ4kNZe X-Received: by 2002:a17:902:d50e:b0:1dc:90a7:660a with SMTP id b14-20020a170902d50e00b001dc90a7660amr14277713plg.61.1709134592545; Wed, 28 Feb 2024 07:36:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709134592; cv=pass; d=google.com; s=arc-20160816; b=LQexyuWBLXCRivw3CJ03utX+vYfACQFCtB77qeYq+1t3kKZnzVjnwFB367/lLzXYRE qssMcqv45CAOnBFGrQAdBqYetkgNN+EawrgZM/UgB4hUNp4p08Ig9s60A8fKa28Ik2zf yD5K2Ieakz2oEO3vl7MrYtuYQhK1T1zPubu6zqfZdANUmhncKeiqUWoqHJkmMRgincr2 SgYhgvIcC6l6lznb7kXJzV7t4jfzS/lju2Ob8d3IOZWueXNKXLTqgZF/No5t8omXcr2B tYolmaf0uA6eamYml/IwaHbsfgxesvKGi8sUzqhZjbPQI6eKSG1xSsW+mxuLDqq4lUfU jYpQ== 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=NgSKT9bSt+5HyOHU2nbwhRfsX+0p99ARykC4+Vikdec=; fh=YnEy5PrjHYeUDfIdlIr6Ue2YFmgnglwJGSsnfqsN+Is=; b=Y6a6KgW74AVKUNqseIzhdg6OcC7G0zsCtAcqYv2KJtJjmHg6+aI8c87CyRkrlkYktX y1K0tXq6/LujH+vVq4OvfC+b7jOtdfUKrnMGIYXbDbbtdSBbkaKj2JYlHyC1RMselMP1 JsDvHm1P9KhuxyeEccSxT0G0Zpc+KSsfU8J20CNnIBAIedwYXqH2UdBs/nMPEBa2intw TOEoZpeF5euHh37qCb2Imxgrj+mBjIt27tpRsLmLIsZj6QzYNZi7Pt4mSQUAY+o4CWau YLo5pmsFrwi6Uvj46avCSZ+a89zo4mNvwYRbmYX4tb+focgKJTT+LV2R4NewOiTBUosM tqMQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=aKq5Y6QM; 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-4202-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4202-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id q10-20020a170902a3ca00b001dc179c39f4si3438319plb.61.2024.02.28.07.36.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 07:36:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-4202-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=aKq5Y6QM; 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-4202-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4202-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id E8C2BB2829C for ; Wed, 28 Feb 2024 15:10:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DE87615B114; Wed, 28 Feb 2024 15:10:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="aKq5Y6QM" 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 7324A1534F4; Wed, 28 Feb 2024 15:10:10 +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=1709133011; cv=none; b=Y8A5nQfChJsX3vjTziXzrRFTQq4DjmMPikzTrC3EChNwz6ieTxfGQRM5s6gKvPYVActC4LtXHZoLuJXWHUQkTWpbpOAqScCqqelrd2pcd6JcY6M+QL/++ze+BW/I4UNILm7LzO7U6tpHzf7bLF8c/Jn+baoSpwSOUdc/UmJutGI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709133011; c=relaxed/simple; bh=9u/8+KZJ0MTJJfCJtK/uTqbOvB/Bdowsj61A4/yqMCk=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=dvrXZ3mUWemcnf6T8M4yvg3C+atv2rc/ntQ5df3BshfXG4OW1mnajH/bjI+QWwkaDvQS+0HLNgjhnvZIFz1oSVWb1sZNcS0eIe0IAEfq5tyRhA2D78v5l/eW6kejHnGwjK6HHEo3sbgfA4JczVJj5RKogJAp2gq+pg5WQJy6/lY= 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=aKq5Y6QM; 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 41S7xIuE029887; Wed, 28 Feb 2024 15:09:59 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=NgSKT9bSt+5HyOHU2nbwhRfsX+0p99ARykC4+Vikdec=; b=aK q5Y6QMY9hI4wbjESWkIrv0eZyF2ziwlNnY9XaL/Dt1qFsuCcHBjwTIuPRRL3nBHF RQnPXxHd4N1QmCmifr5FyvyUr0fpVd4bDD6WngIBF3lr6+kG0u0v50V8HZYXcEbQ kKEkzEZ73j4UXtwzcUXLk2E0ZlKkjneclBdm5fwcecq5oHrttbEoPNRemN6rDY2S naSHj7cFXWetq0Ok0AyLfrj9BSADp2OGeW53ML1DGAzIfXvVnYofQQaklW8Kxfmg OHwvDPpH/bCWjvOOTPlSKjS1jGWJUza+qVdcctIqVWdUOvAhgc19R+ZSMzrckY91 YNtmPIbRXd9a0LvTMEOg== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3whw3f1f59-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Feb 2024 15:09:58 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 41SF9vIq016764 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Feb 2024 15:09:57 GMT Received: from [10.110.113.97] (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, 28 Feb 2024 07:09:57 -0800 Message-ID: <1d0f2a64-85d1-4f2d-81f1-6a6938ad3d34@quicinc.com> Date: Wed, 28 Feb 2024 07:09:56 -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 v4 1/3] bus: mhi: host: add mhi_power_down_keep_dev() Content-Language: en-US To: Baochen Qiang , , CC: , , , , , , , References: <20240228022243.17762-1-quic_bqiang@quicinc.com> <20240228022243.17762-2-quic_bqiang@quicinc.com> From: Jeff Johnson In-Reply-To: <20240228022243.17762-2-quic_bqiang@quicinc.com> Content-Type: text/plain; charset="UTF-8" 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: HMPjIilb73nt7sz1IHjINmNd_s4H4MSs X-Proofpoint-GUID: HMPjIilb73nt7sz1IHjINmNd_s4H4MSs 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-28_07,2024-02-27_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 spamscore=0 suspectscore=0 adultscore=0 impostorscore=0 priorityscore=1501 bulkscore=0 mlxscore=0 clxscore=1015 malwarescore=0 phishscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2402280119 On 2/27/2024 6:22 PM, Baochen Qiang wrote: > ath11k fails to resume: > > ath11k_pci 0000:06:00.0: timeout while waiting for restart complete > > This happens because when calling mhi_sync_power_up() the MHI subsystem > eventually calls device_add() from mhi_create_devices() but the device > creation is deferred: > > mhi mhi0_IPCR: Driver qcom_mhi_qrtr force probe deferral > > The reason for deferring device creation is explained in dpm_prepare(): > > /* > * It is unsafe if probing of devices will happen during suspend or > * hibernation and system behavior will be unpredictable in this case. > * So, let's prohibit device's probing here and defer their probes > * instead. The normal behavior will be restored in dpm_complete(). > */ > > Because the device probe is deferred, the qcom_mhi_qrtr_probe() is not > called and thus MHI channels are not prepared: > > So what this means that QRTR is not delivering messages and the QMI connection > is not working between ath11k and the firmware, resulting a failure in firmware > initialization. > > To fix this add new function mhi_power_down_keep_dev() which doesn't destroy > the devices for channels during power down. This way we avoid probe defer issue > and finally can get ath11k hibernation working with the following patches. > > Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30 > > Signed-off-by: Kalle Valo > Signed-off-by: Baochen Qiang Reviewed-by: Jeff Johnson