Skip to content

wip: first stab at separating out all phy related things to phy thread#47

Closed
eriang wants to merge 1 commit intomasterfrom
eriang/stm32-phy-fix
Closed

wip: first stab at separating out all phy related things to phy thread#47
eriang wants to merge 1 commit intomasterfrom
eriang/stm32-phy-fix

Conversation

@eriang
Copy link
Collaborator

@eriang eriang commented Mar 24, 2026

Claudes summary of the changes:

stm32h7_eth_init — now only does clock/GPIO/SYSCFG setup, stores phyrst/mode/flags into the struct, and starts the PHY thread.

stm32h7_phy_thread — now begins with the PHY reset pulse, then driver_probe. On failure it loops forever (satisfying attribute((noreturn))). On success it calls stm32h7_eth_mac_init, then enters the link-polling loop.

stm32h7_eth_mac_init (new) — contains everything that used to follow the probe in stm32h7_eth_init: MAC address, ring alloc, soft reset, PTP init (using se->se_flags), DMA config, ether_netif_init, and IRQ enable.

@eriang eriang marked this pull request as draft March 24, 2026 20:37
Claudes  summary of the changes:

stm32h7_eth_init — now only does clock/GPIO/SYSCFG setup, stores phyrst/mode/flags
into the struct, and starts the PHY thread.

stm32h7_phy_thread — now begins with the PHY reset pulse, then driver_probe.
On failure it loops forever (satisfying __attribute__((noreturn))). On success it calls
stm32h7_eth_mac_init, then enters the link-polling loop.

stm32h7_eth_mac_init (new) — contains everything that used to follow the probe in
stm32h7_eth_init: MAC address, ring alloc, soft reset, PTP init (using se->se_flags),
DMA config, ether_netif_init, and IRQ enable.

eriang: changed udelay to usleep in thread.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@eriang eriang force-pushed the eriang/stm32-phy-fix branch from 6c75712 to 34a6443 Compare March 24, 2026 20:52
@eriang eriang closed this Mar 25, 2026
@eriang
Copy link
Collaborator Author

eriang commented Mar 25, 2026

@andoma will implement other solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants