Re: kern/60494: Non-MP safe TULIP driver on GENERIC kernel causes apparent spinlock in ifmedia_match during boot

Jason Thorpe <[email protected]> Sat, 25 Jul 2026 06:55:29 -0700
Newsgroups gmane.os.netbsd.bugs
Message-ID <[email protected]>
> On Jul 23, 2026, at 4:35 PM, [email protected] via gnats <[email protected]> wrote:
> 
> When a delay in completion of autonegotiation was introduced into the emulator, we no longer got caught in a tight guest loop and boot proceeded successfully and normally.  The introduced delay was only 50ms. 
> 
> We appear to be in....
> 
> sys_ioctl -> isoo_ioctl -> doifioctl -> tlp_ioctl -> ether_ioctl -> ifmedia_ioctl(SIOCSIFMEDIA) -> ifmedia_change -> tlp_mediachange -> tlp_init -> tlp_2114x_isv_tmsw_set -> tlp_2114x_nway_servce -> tlp_2114x_nway_statchg -> ifmedia_match -> mutex_spin_enter 

Hm, support for the SIA NWay block is constructed more or less like a generic PHY driver, but none of the locking logic that was added to the MII layer was added to it.  I think doing that is the best course of action.  Stay tuned.

-- thorpej