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
| ||
|
Message-ID: <KL1PR01MB5448316A031146A449F87BF9E6749@KL1PR01MB5448.apcprd01.prod.exchangelabs.com> Date: Thu, 11 May 2023 11:19:52 +0800 From: Yan Wang <rk.code@...look.com> To: Andrew Lunn <andrew@...n.ch> Cc: hkallweit1@...il.com, davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org, linux-kernel@...r.kernel.org, linux@...linux.org.uk Subject: Re: [PATCH v3] net: mdiobus: Add a function to deassert reset On 5/11/2023 6:15 AM, Andrew Lunn wrote: >> +static void fwnode_mdiobus_pre_enable_phy(struct fwnode_handle *fwnode) >> +{ >> + struct gpio_desc *reset; >> + >> + reset = fwnode_gpiod_get_index(fwnode, "reset", 0, GPIOD_OUT_HIGH, NULL); >> + if (IS_ERR(reset) && PTR_ERR(reset) != -EPROBE_DEFER) >> + return; >> + >> + usleep_range(100, 200); >> + gpiod_set_value_cansleep(reset, 0); >> + /*Release the reset pin,it needs to be registered with the PHY.*/ >> + gpiod_put(reset); > You are still putting it into reset, and then taking it out of > reset. This is what i said should not be done. Please only take it out > of reset if it is in reset. > > Also, you ignored my comments about delay after reset. > > Documentation/devicetree/bindings/net/ethernet-phy.yaml says: > > reset-gpios: > maxItems: 1 > description: > The GPIO phandle and specifier for the PHY reset signal. > > reset-assert-us: > description: > Delay after the reset was asserted in microseconds. If this > property is missing the delay will be skipped. > > reset-deassert-us: > description: > Delay after the reset was deasserted in microseconds. If > this property is missing the delay will be skipped. > > You are deasserting the reset, so you should look for this property, > and if it is there, delay for that amount. Some PHYs take a while > before they will respond on the bus. I'm very sorry, I forgot. Thank you > Andrew
Powered by blists - more mailing lists