lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
 <SA1PR18MB5692D22712BA8A30BADEE3329987A@SA1PR18MB5692.namprd18.prod.outlook.com>
Date: Tue, 6 Jan 2026 15:28:37 +0000
From: Aleksandar Gerasimovski <Aleksandar.Gerasimovski@...den.com>
To: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "vkoul@...nel.org" <vkoul@...nel.org>,
        "kishon@...nel.org"
	<kishon@...nel.org>
CC: "kostap@...vell.com" <kostap@...vell.com>,
        "linux-phy@...ts.infradead.org"
	<linux-phy@...ts.infradead.org>
Subject: RE: [PATCH] phy/marvell/phy-mvebu-cp110-utmi: fix dr_mode property
 read from dts



-----Original Message-----
From: Aleksandar Gerasimovski <aleksandar.gerasimovski@...den.com> 
Sent: Tuesday, January 6, 2026 4:07 PM
To: linux-kernel@...r.kernel.org; vkoul@...nel.org; kishon@...nel.org; Aleksandar Gerasimovski <Aleksandar.Gerasimovski@...den.com>
Subject: [PATCH] phy/marvell/phy-mvebu-cp110-utmi: fix dr_mode property read from dts

The problem with the current implementation is that it does not consider that the USB controller can have multiple PHY handles with different arguments count, as for example we have in our cn9131 based platform:
"phys = <&cp0_comphy1 0>, <&cp0_utmi0>;".

In such case calling "of_usb_get_dr_mode_by_phy" with -1 (no phy-cells) leads to not proper phy detection, taking the "marvell,cp110-utmi-phy"
dts definition we can call the "of_usb_get_dr_mode_by_phy" with 0 (#phy-cells = <0>) and safely look for that phy.

Signed-off-by: Aleksandar Gerasimovski <aleksandar.gerasimovski@...den.com>
---
 drivers/phy/marvell/phy-mvebu-cp110-utmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/marvell/phy-mvebu-cp110-utmi.c b/drivers/phy/marvell/phy-mvebu-cp110-utmi.c
index 59903f86b13f..dd3e515a8e86 100644
--- a/drivers/phy/marvell/phy-mvebu-cp110-utmi.c
+++ b/drivers/phy/marvell/phy-mvebu-cp110-utmi.c
@@ -338,7 +338,7 @@ static int mvebu_cp110_utmi_phy_probe(struct platform_device *pdev)
 			return -ENOMEM;
 		}
 
-		port->dr_mode = of_usb_get_dr_mode_by_phy(child, -1);
+		port->dr_mode = of_usb_get_dr_mode_by_phy(child, 0);
 		if ((port->dr_mode != USB_DR_MODE_HOST) &&
 		    (port->dr_mode != USB_DR_MODE_PERIPHERAL)) {
 			dev_err(&pdev->dev,
--
2.34.1

**********************************************************************
DISCLAIMER:
Privileged and/or Confidential information may be contained in this message. If you are not the addressee of this message, you may not copy, use or deliver this message to anyone. In such event, you should destroy the message and kindly notify the sender by reply e-mail. It is understood that opinions or conclusions that do not relate to the official business of the company are neither given nor endorsed by the company. Thank You.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ