Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Sebastian Reichel" <sebastian.reichel@collabora.com>
Cc: robh@kernel.org, conor+dt@kernel.org, olteanv@gmail.com,
	neil.armstrong@linaro.org, vkoul@kernel.org,
	linux-phy@lists.infradead.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v6 05/23] phy: rockchip: usbdp: Drop seamless DP takeover
Date: Fri, 19 Jun 2026 15:47:11 +0000	[thread overview]
Message-ID: <20260619154711.E415D1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260619-rockchip-usbdp-cleanup-v6-5-3bb1f54b3f35@collabora.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] Unhandled error from reset deassertion leads to unsafe MMIO access
--

commit 8eeae98a635eaf9514a2125a383fcc16fe03b51d
Author: Sebastian Reichel <sebastian.reichel@collabora.com>

phy: rockchip: usbdp: Drop seamless DP takeover

This commit removes the seamless DisplayPort takeover feature if the
bootloader had already enabled DP. The DRM stack currently does not support
this and the code will leak clock resources on module removal.

Closes: https://lore.kernel.org/linux-phy/20260612164107.C7DB21F000E9@smtp.kernel.org/

> diff --git a/drivers/phy/rockchip/phy-rockchip-usbdp.c b/drivers/phy/rockchip/phy-rockchip-usbdp.c
> index 2845a012eafcc..ffe39c968c70c 100644
> --- a/drivers/phy/rockchip/phy-rockchip-usbdp.c
> +++ b/drivers/phy/rockchip/phy-rockchip-usbdp.c
> @@ -936,9 +936,9 @@ static int rk_udphy_get_initial_status(struct rk_udphy *udphy)
>  
>  	regmap_read(udphy->pma_regmap, CMN_LANE_MUX_AND_EN_OFFSET, &value);

[Severity: High]
This is a pre-existing issue, but is it safe to ignore the return value of
rk_udphy_reset_deassert_all() which is called immediately before this
regmap_read() in rk_udphy_get_initial_status()?

If the reset deassertion fails, the peripheral block could still be held
in reset. On ARM architectures, performing MMIO access to a block that is
actively held in reset can trigger an asynchronous external abort (SError),
leading to an immediate kernel panic.

Could this be updated to verify the return value, clean up enabled
resources like clocks, and propagate the error? The same pattern appears
in rk_udphy_init() where rk_udphy_reset_deassert() is ignored just before
calling regmap_multi_reg_write() for the PMA block.

>  	if (FIELD_GET(CMN_DP_LANE_MUX_ALL, value) && FIELD_GET(CMN_DP_LANE_EN_ALL, value))
> -		udphy->status = UDPHY_MODE_DP;
> -	else
> -		rk_udphy_disable(udphy);
> +		dev_dbg(udphy->dev, "Started with DP PHY pre-enabled; seamless takeover unsupported\n");
> +
> +	rk_udphy_disable(udphy);
>  
>  	return 0;
>  }

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260619-rockchip-usbdp-cleanup-v6-0-3bb1f54b3f35@collabora.com?part=5

  reply	other threads:[~2026-06-19 15:47 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-19 15:28 [PATCH v6 00/23] phy: rockchip: usbdp: Fixes, DP 1-lane support and cleanups Sebastian Reichel
2026-06-19 15:28 ` [PATCH v6 01/23] dt-bindings: phy: rockchip-usbdp: add improved ports scheme Sebastian Reichel
2026-06-19 15:28 ` [PATCH v6 02/23] phy: rockchip: usbdp: Update mode_change after error handling Sebastian Reichel
2026-06-19 15:49   ` sashiko-bot
2026-06-19 15:28 ` [PATCH v6 03/23] phy: rockchip: usbdp: Do not lose USB3 PHY status Sebastian Reichel
2026-06-19 15:28 ` [PATCH v6 04/23] phy: rockchip: usbdp: Fix devm_clk_bulk_get_all check Sebastian Reichel
2026-06-19 15:43   ` sashiko-bot
2026-06-19 15:28 ` [PATCH v6 05/23] phy: rockchip: usbdp: Drop seamless DP takeover Sebastian Reichel
2026-06-19 15:47   ` sashiko-bot [this message]
2026-06-19 15:28 ` [PATCH v6 06/23] phy: rockchip: usbdp: Limit DP lane count to muxed lanes Sebastian Reichel
2026-06-19 15:28 ` [PATCH v6 07/23] phy: rockchip: usbdp: Keep clocks running on PHY re-init Sebastian Reichel
2026-06-19 15:50   ` sashiko-bot
2026-06-19 15:28 ` [PATCH v6 08/23] phy: rockchip: usbdp: Amend SSC modulation deviation Sebastian Reichel
2026-06-19 15:29 ` [PATCH v6 09/23] phy: rockchip: usbdp: Fix LFPS detect threshold control Sebastian Reichel
2026-06-19 15:29 ` [PATCH v6 10/23] phy: rockchip: usbdp: Add missing mode_change update Sebastian Reichel
2026-06-19 15:29 ` [PATCH v6 11/23] phy: rockchip: usbdp: Support single-lane DP Sebastian Reichel
2026-06-19 15:48   ` sashiko-bot
2026-06-19 15:29 ` [PATCH v6 12/23] phy: rockchip: usbdp: Rename DP lane functions Sebastian Reichel
2026-06-19 15:29 ` [PATCH v6 13/23] phy: rockchip: usbdp: Use FIELD_PREP_WM16_CONST Sebastian Reichel
2026-06-19 15:29 ` [PATCH v6 14/23] phy: rockchip: usbdp: Cleanup DP lane selection function Sebastian Reichel
2026-06-19 15:29 ` [PATCH v6 15/23] phy: rockchip: usbdp: Register DP aux bridge Sebastian Reichel
2026-06-19 15:29 ` [PATCH v6 16/23] phy: rockchip: usbdp: Drop DP HPD handling Sebastian Reichel
2026-06-19 16:00   ` sashiko-bot
2026-06-19 15:29 ` [PATCH v6 17/23] phy: rockchip: usbdp: Rename mode_change to phy_needs_reinit Sebastian Reichel
2026-06-19 15:29 ` [PATCH v6 18/23] phy: rockchip: usbdp: Re-init the PHY on orientation change Sebastian Reichel
2026-06-19 15:53   ` sashiko-bot
2026-06-19 15:29 ` [PATCH v6 19/23] phy: rockchip: usbdp: Factor out lane_mux_sel setup Sebastian Reichel
2026-06-19 15:29 ` [PATCH v6 20/23] phy: rockchip: usbdp: Use guard functions for mutex Sebastian Reichel
2026-06-19 15:29 ` [PATCH v6 21/23] phy: rockchip: usbdp: Support going from DP-only mode to USB mode Sebastian Reichel
2026-06-19 15:57   ` sashiko-bot
2026-06-19 15:29 ` [PATCH v6 22/23] phy: rockchip: usbdp: Hold mutex in DP PHY configure Sebastian Reichel
2026-06-19 15:29 ` [PATCH v6 23/23] phy: rockchip: usbdp: Add some extra debug messages Sebastian Reichel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260619154711.E415D1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=neil.armstrong@linaro.org \
    --cc=olteanv@gmail.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=sebastian.reichel@collabora.com \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox