Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1172225lqe; Mon, 8 Apr 2024 00:11:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXWBRSyIXF3ukxTwL/J38fLomQuBJPNA7U1v1EyOAULf7SwfGkBEA1B2uNuVrjmo3SCQV8JKBzjp8CicsIxWjy8gCffij4oZvTC37Whow== X-Google-Smtp-Source: AGHT+IG+GCTfzFryZbYZQVTrW3/nZOziLP7rvHGQIf8HgTM9Bj4Xbebv7r0QBOkeNsc1VE0nh/uQ X-Received: by 2002:a50:c016:0:b0:56e:de1:f427 with SMTP id r22-20020a50c016000000b0056e0de1f427mr5255772edb.25.1712560310400; Mon, 08 Apr 2024 00:11:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712560310; cv=pass; d=google.com; s=arc-20160816; b=Xa3f+ivK+vxetOG/S6qaboLqQ6ynpR3X3S3hUb7z3CDP1BzjgMa5qHgXpaxdTRjLAi F0+GvJJC+hzk+kOqz50UkGFN1vf64uwsiX/eGqFnkZi//vZ/J4qZq9OSiRNWrcLtSGcp pz+zZmjW+U50Bl4EkJqxaQAYpSelwxyiw65+ACa9Od5d/eaDUY2d7NbWbX0/qkQjxcyl dxYV1Pc1ZGdR5QWF5dby8iYIDdL5YRrv3FM1SIYMzIWSoscxFLMJTeLRxN57B1EYm5FD mBpD05BadnY/S1wH030tQJApSLx9PHQjY434Aq6U/3e42YxQe9brn6JjADO2LvzpgZGX 4jnQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=o5ZDfhZ1Fidgtb9vWSNNKo+1prEkRCkrCe3SIQ0lqmM=; fh=6TxI++JWpFc/Xb9uu6X8x2mrgMBcvpAULi6iAj6TIgY=; b=qpqISwOh9zqsHtYLCPS+yfC/S1ZLPTtWFuZ/+huZmTocsnSSQsyRjlN3PbtZWqzzsp Fm9pzBnbYI/UfAXi2OI6jlizFXTsDvj75vLVABOhksxJm9R6Ud5b5h1mJDDln8CXt2Dz m1rEBMCCPb0Gj0+lyvCRrUZPP2BSsQ0DsSVQ3MFiAjCwhofx5UZ2/jsX2l5nlXvdaxMk M+L3wTZ4gz9z5z9+9NUY7pMO/V8ds7BG+7+Vxdnjc5VvFVcFtNJxs7s9Abd1cIbQbPMj CLEG7CM/th4EtQgvwaRhgeyCxMHyeEG8CjG9t7/AtyhFNumE1lXOxVkS2UknPLSH29gu Hn6A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pzXbdAqK; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-134878-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-134878-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id h10-20020a056402280a00b0056e52020a0esi1597199ede.499.2024.04.08.00.11.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 00:11:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-134878-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=@kernel.org header.s=k20201202 header.b=pzXbdAqK; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-134878-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-134878-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 2405A1F2227E for ; Mon, 8 Apr 2024 07:11:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7A92524B4A; Mon, 8 Apr 2024 07:11:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pzXbdAqK" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9CA172232A; Mon, 8 Apr 2024 07:11:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712560299; cv=none; b=PFjhTnEWwEg6wzp7l6KOosYJ+//Ba9104LpMg22DICJdwtXBpbBG6K+z2gglI5o1TysDduMmibrPKgtG8dCF7LD1/aoxT4HkbuxQiJXDxucIszdvVoxzH1/Y7WevMeL7JlfYZPrh8t4Ujh6GN63elI1HRxHiiiKMeWTDjORNTN4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712560299; c=relaxed/simple; bh=pGHQpCZ+Yr6iZMOAV2LPzkSk5nqBaiHVUORfWaGQ52Y=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ErVBf8/FUACD1gMkSZ4MErNn10mMmIxno9lGLOHU86c5YDDJ+k3rxgxXw4WW1cJHQa/cKEOe50WWF6ey1RWUR5HJv1V4UYssGgAYjlob3kIGxeb9u8RD2CotpqpT+duvTn91OH7yXwaaskzLORXif3HFRgPLQsNNTIolSs5jZfg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pzXbdAqK; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2FB57C433F1; Mon, 8 Apr 2024 07:11:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712560299; bh=pGHQpCZ+Yr6iZMOAV2LPzkSk5nqBaiHVUORfWaGQ52Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pzXbdAqKEF1/uMn9bULpyVGDj8Rgx3G7S12NMzUWSTRD4haErpwkYgM3bgRdXWOIT nCrjmoSHpxQTY6D7aHRH3CWsI5NiEvr7qoj9KcVnfKkOqFccEayt/CP02Lyze6iOLE E7I6P64lDNirO4NpIGJHwHaVjpGJ3U4OZfmkiG9UN+7q7Tt/psytCn9EB7N4FDaMtc rUjD0R8LxGR1exRl8DIxtEcf4GRzzdp0MEpdSjv65WgPjbh4t7JPpl55zjPU4bCRwB YJuP357YaJAbDuKklkmwKI8qPAa07U9PiSpkwwyA2GI2DlwGaqvJpkm584HGmIVrky M6XAXRmDXofzw== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rtjAC-000000007Ws-1Svi; Mon, 08 Apr 2024 09:11:33 +0200 Date: Mon, 8 Apr 2024 09:11:32 +0200 From: Johan Hovold To: Dmitry Baryshkov Cc: Bryan O'Donoghue , Heikki Krogerus , Bjorn Andersson , Konrad Dybcio , Greg Kroah-Hartman , linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Caleb Connolly Subject: Re: [PATCH v2] usb: typec: qcom-pmic-typec: split HPD bridge alloc and registration Message-ID: References: <20240408-qc-pmic-typec-hpd-split-v2-1-1704f5321b73@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240408-qc-pmic-typec-hpd-split-v2-1-1704f5321b73@linaro.org> On Mon, Apr 08, 2024 at 04:06:40AM +0300, Dmitry Baryshkov wrote: > If a probe function returns -EPROBE_DEFER after creating another device > there is a change of ending up in a probe deferral loop, (see commit > fbc35b45f9f6 ("Add documentation on meaning of -EPROBE_DEFER"). > > In order to prevent such probe-defer loops caused by qcom-pmic-typec > driver, use the API added by Johan Hovold and move HPD bridge > registration to the end of the probe function. You should be more specific here: which function called after qcom_pmic_typec_probe() can trigger a probe deferral? I doubt that applies to tcpm->port_start() and tcpm->pdphy_start() in which case the bridge should be added before those calls unless there are other reasons for not doing so, which then also should be mentioned. I suspect the trouble is with tcpm_register_port(), but please spell that out and mention in which scenarios that function may return -EPROBE_DEFER. Johan