Received: by 2002:ab2:2997:0:b0:1ec:cbc4:63fb with SMTP id n23csp558384lqb; Thu, 29 Feb 2024 08:27:16 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUxtkfjkAjnMa+gNB/vmwMNkH0gZmP0ka4dmFQxzUpBnVHW8nESE5XYfgirxrYMAfE9V2zpmNvHs0mgXf5mqSA3IJBf4T8ZBB2iJAvwcw== X-Google-Smtp-Source: AGHT+IG/rfL8JuUV37VxXaEstWYYCr98gxlDpwon5+C7gTuf0fhqHSpL5hYiKZ7f0GNIGTcWKk9d X-Received: by 2002:a17:902:a3c7:b0:1db:c6ff:664a with SMTP id q7-20020a170902a3c700b001dbc6ff664amr2394763plb.53.1709224036467; Thu, 29 Feb 2024 08:27:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709224036; cv=pass; d=google.com; s=arc-20160816; b=rS69YrX73PhkDqLSbvdLmAmJNRZGCMfJTTABgKsxOfl4sWma/ubYS4ggrKM43CWl+W HlU7Trm9Ogz1FH8l0d8IjF+urt7c6AiFaCVapYVLXvdDt1p0K6Ab5d5j2C2jZBPVlEzS Y914DmS9LScVuitsqZI4w2V+L63QMlNjji4TnVuyVEKfXC+gDl4YDfooruLeOgQR2GOg +dnEFrsbPXZpMP4Lcgqv6tIQ8GQDN6gj4AbFCy+tqK3Bj3M8zXNO0em5kBS7SLmPTWwC R0XKFdlZMQIPIXdwijoELELqK7VBiYs/ojbzgoSTJ4P4ngYU1syMd8pJ3WPzzcR05p9Q NAOw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=S/AJuI1oSfPQ0LA9yvudELzVMUIIFfUVRY1Cw8WuV1Y=; fh=I3ThE2zlmk+tyoiMPwDEDL6kIXcSVQHQahq1tVxbHD8=; b=fUUmZhpOGUrsunj8eisYv2BT8uuJ+nx00G3eJqwGNi9xOHo+xuLlaQzLMfDsaHSZuN SZzu2LoF3YB3D5nAL+N+KlfSt+yJIkQWnYpV1uYhAi5FSxtoWwjXZXCG383aCVe+2k3n ekGJnMjL7koOQN3z4SpAs+L9NtNtpIuU0fvNF2ByJ0cjfTwpsYxlmWRc4knRMnwUjNIY C+tx+oUx62HiGxa+hgoAdF2VwoWNRRrWL+TUmhZEvmPrdY4jAAR5ucrMBvdEqNqkWjXl b3hrTCJMPXjyzyovBalHJAbxG9BCrB/GcnGT+3FyAmssQBqZRCbAglAqAjkUasQ+ivx9 ukNg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=v87BRxfS; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-87066-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87066-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id b6-20020a170902d50600b001dc5ff7d078si1664462plg.562.2024.02.29.08.27.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 08:27:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-87066-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=v87BRxfS; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-87066-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87066-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id A023D282A30 for ; Thu, 29 Feb 2024 16:26:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C31E97827C; Thu, 29 Feb 2024 16:20:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="v87BRxfS" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (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 39E637827D; Thu, 29 Feb 2024 16:20:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709223624; cv=none; b=FHDcEWgx2P2NsxNsECV/1PjKxveumD7RS4zACVO/QahsnEZeUrLE3ItJ3N1B2ifYDfz7yWS0FcIkend5YIDp2gSZ4ChvRaMDp+RuNDlFUirM6oE1A31+X9MtXBNlrOzZxF6yZxZSld9f0BkPFkNwsdQt6/1b86RXyi5mh6FbwMc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709223624; c=relaxed/simple; bh=EG0AQMhvajtRtj7h37GNmIv5kRJfqZmGy40sXuFridE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=EzQWw2rpED7wokga3mr5Eg5vVR93okFYsH44/wNltaVDd3hhvxTbD0xl6QGCwA+Y6tpOAD6KjNYkWOniJh6Sma8oOaLSs5ruIeq9H0423FIZZxneiLrFRTXHH8A0vJ9ueJ5FdQfIhPF/BWCcuw+bEXQkmDjr4SJQZA10m8XtTjo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=v87BRxfS; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1709223618; bh=EG0AQMhvajtRtj7h37GNmIv5kRJfqZmGy40sXuFridE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=v87BRxfSazLj7SyYlAEei17Nshjcn1N/7j/le0FQKvKyn9t1w2mlSvIJyECKconh2 RjSMpnq374Gzpm1BbKC5mPYhUibBC5OlBVlKG61EMd9gx+u2koByF3KXndn6DJKiFe p4rrd6vMfCPyd0zQHf7DItjKcA74Frp1INQEkAyQe+wnB/gdQ3fTel4zHvpDDHzLG2 tH1uHCZvZEO5+gJftGYLxRSYWlgJWmm1EvWF/1UYJ3I/yS0jA8UEiML7QyNm6K6+Bf n19mw1ODQiItTyfDgpJUfsS1JagKYT/E+qDprAGxuyAHFnrarbAXXkeY14zyaPwSso +MIfSuYq3vpdQ== Received: from notapiano (zone.collabora.co.uk [167.235.23.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 643CC3782066; Thu, 29 Feb 2024 16:20:15 +0000 (UTC) Date: Thu, 29 Feb 2024 11:20:13 -0500 From: =?utf-8?B?TsOtY29sYXMgRi4gUi4gQS4=?= Prado To: AngeloGioacchino Del Regno Cc: linux-pci@vger.kernel.org, ryder.lee@mediatek.com, jianjun.wang@mediatek.com, lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, p.zabel@pengutronix.de, matthias.bgg@gmail.com, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com, wenst@chromium.org Subject: Re: [PATCH v2] PCI: mediatek-gen3: Assert MAC reset only if PHY reset also present Message-ID: <27b54e13-35da-44cd-9f02-a48a84c63e79@notapiano> References: <20240229092449.580971-1-angelogioacchino.delregno@collabora.com> 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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240229092449.580971-1-angelogioacchino.delregno@collabora.com> On Thu, Feb 29, 2024 at 10:24:49AM +0100, AngeloGioacchino Del Regno wrote: > Some SoCs have two PCI-Express controllers: in the case of MT8195, > one of them is using a dedicated PHY, but the other uses a combo PHY > that is shared with USB and in that case the PHY cannot be reset > from the PCIe driver, or USB functionality will be unable to resume. > > Resetting the PCIe MAC without also resetting the PHY will result in > a full system lockup at PCIe resume time and the only option to > resume operation is to hard reboot the system (with a PMIC cut-off). > > To resolve this issue, check if we've got both a PHY and a MAC reset > and, if not, never assert resets at PM suspend time: in that case, > the link is still getting powered down as both the clocks and the > power domains will go down anyway. > > Fixes: d537dc125f07 ("PCI: mediatek-gen3: Add system PM support") > Signed-off-by: AngeloGioacchino Del Regno With this applied resume finally works on MT8195-Tomato! And I no longer see the errors I mentioned in [1]. So, Tested-by: N?colas F. R. A. Prado Thanks, N?colas [1] https://lore.kernel.org/all/d8cfb804-e47a-471c-8bc0-e974ee045655@notapiano/