net: phy: qt2025: Wait until PHY becomes ready
Subsystems (5)
FUJITA Tomonori
maintainerPATCH 1/1 net: phy: qt2025: Wait until PHY becomes ready
Wait until a PHY becomes ready in the probe callback by using read_poll_timeout function.
Reviewed-by Andrew Lunn <[email protected]>
Reviewed-by Alice Ryhl <[email protected]>
Reviewed-by Gary Guo <[email protected]>
Signed-off-by FUJITA Tomonori <[email protected]>
---
drivers/net/phy/qt2025.rs | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
drivers/net/phy/qt2025.rs +9 -1
@@ -12,6 +12,7 @@use kernel::c_str;use kernel::error::code;use kernel::firmware::Firmware ; +use kernel::io::poll::read_poll_timeout;use kernel::net::phy::{ self, reg::{Mmd ,C45 },
@@ -19,6 +20,7 @@ };use kernel::prelude::*;use kernel::sizes::{SZ_16K ,SZ_8K }; +use kernel::time::Delta ; kernel::module_phy_driver! { drivers: [PhyQT2025 ],
@@ -93,7 +95,13 @@ fn probe(dev: &mut phy::Device) -> Result<()> {// The micro-controller will start running from SRAM. dev.write (C45 ::new (Mmd ::PCS ,0xe854 ),0x0040 )?; -// TODO: sleep here until the hw becomes ready. +read_poll_timeout ( + || dev.read (C45 ::new (Mmd ::PCS ,0xd7fd )), + |val| *val !=0x00 && *val !=0x10 , +Delta ::from_millis (50 ), +Delta ::from_secs (3 ), + )?; +Ok (()) }
base-commit: 89aec171d9d1ab168e43fcf9754b82e4c0aef9b9
Signature · 1 line
2.43.0
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Wed, 5 Nov 2025 22:31:26 +0900 you wrote:
Wait until a PHY becomes ready in the probe callback by using
read_poll_timeoutfunction.Reviewed-by Andrew Lunn <[email protected]>Reviewed-by Alice Ryhl <[email protected]>Reviewed-by Gary Guo <[email protected]>Signed-off-by FUJITA Tomonori <[email protected]>[...]
Here is the summary with links:
- [net-next,v1] net: phy: qt2025: Wait until PHY becomes ready
https://git.kernel.org/netdev/net-next/c/8a25a2e34157
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html