Skip to content

drivers: PHY Microchip KSZ8081 will block system work queue for 500/1000ms #78651

Closed
@stomschik-ask

Description

@stomschik-ask

Describe the bug
I am using the NXP MIMXRT1060-EVK with Microchip KSZ8081 Ethernet PHY. The function phy_mc_ksz8081_reset() will busy wait for 500ms or even 1000ms (if a reset pin is configured) for the reset of the Ethernet PHY. The function will be called from the system workqueue for example when plugging in or out the Ethernet cable. By default, the system work queue priority is the lowest cooperative priority, i.e. the busy wait won't be preempted by any other thread until finished.

To Reproduce
Use for example the Telnet console sample

  1. west build --pristine -b mimxrt1060_evk samples/net/telnet
  2. run the sample from the debugger
  3. set breakpoint at phy_mc_ksz8081_reset()
  4. unplug the Ethernet cable
  5. phy_mc_ksz8081_reset() will busy wait for 2x500ms in the context of the system workqueue

Expected behavior
Items in the system workqueue shall not perform blocking operations that would delay other system workqueue processing to an unacceptable degree.

Impact
Realtime deadlines might not be met. Our application is doing audio processing and blocking the thread providing audio samples to I2S driver will result in audio dropouts.

Environment

  • OS: Windows
  • Zephyr SDK 0.16.8
  • Zephyr 3.7.0

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions