Message ID | 20210202143239.10714-1-mike.looijmans@topic.nl (mailing list archive) |
---|---|
State | Accepted |
Commit | e0183b974d3008ae769d769cabfa2051c896dd48 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [v2] net: mdiobus: Prevent spike on MDIO bus reset signal | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Guessed tree name to be net-next |
netdev/subject_prefix | warning | Target tree name not specified in the subject |
netdev/cc_maintainers | success | CCed 6 of 6 maintainers |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 18 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
netdev/stable | success | Stable not CCed |
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Tue, 2 Feb 2021 15:32:39 +0100 you wrote: > The mdio_bus reset code first de-asserted the reset by allocating with > GPIOD_OUT_LOW, then asserted and de-asserted again. In other words, if > the reset signal defaulted to asserted, there'd be a short "spike" > before the reset. > > Here is what happens depending on the pre-existing state of the reset > signal: > Reset (previously asserted): ~~~|_|~~~~|_______ > Reset (previously deasserted): _____|~~~~|_______ > ^ ^ ^ > A B C > > [...] Here is the summary with links: - [v2] net: mdiobus: Prevent spike on MDIO bus reset signal https://git.kernel.org/netdev/net-next/c/e0183b974d30 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index 2b42e46066b4..34e98ae75110 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c @@ -543,8 +543,8 @@ int __mdiobus_register(struct mii_bus *bus, struct module *owner) mutex_init(&bus->mdio_lock); mutex_init(&bus->shared_lock); - /* de-assert bus level PHY GPIO reset */ - gpiod = devm_gpiod_get_optional(&bus->dev, "reset", GPIOD_OUT_LOW); + /* assert bus level PHY GPIO reset */ + gpiod = devm_gpiod_get_optional(&bus->dev, "reset", GPIOD_OUT_HIGH); if (IS_ERR(gpiod)) { err = dev_err_probe(&bus->dev, PTR_ERR(gpiod), "mii_bus %s couldn't get reset GPIO\n", @@ -553,8 +553,6 @@ int __mdiobus_register(struct mii_bus *bus, struct module *owner) return err; } else if (gpiod) { bus->reset_gpiod = gpiod; - - gpiod_set_value_cansleep(gpiod, 1); fsleep(bus->reset_delay_us); gpiod_set_value_cansleep(gpiod, 0); if (bus->reset_post_delay_us > 0)