Page MenuHomeFreeBSD

dpaa2: defer link_state updates until we are up
ClosedPublic

Authored by bz on Nov 17 2023, 12:53 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 9, 3:24 AM
Unknown Object (File)
Sat, Nov 30, 12:31 AM
Unknown Object (File)
Nov 20 2024, 11:12 PM
Unknown Object (File)
Nov 18 2024, 3:48 AM
Unknown Object (File)
Nov 18 2024, 3:35 AM
Unknown Object (File)
Nov 13 2024, 10:16 PM
Unknown Object (File)
Nov 11 2024, 3:46 AM
Unknown Object (File)
Nov 3 2024, 4:54 AM
Subscribers

Details

Summary

dpaa2_ni_media_change() was called in early setup stages, before we
were fully setup. That lead to internal state being all synched and
fine but hardware state was lost/never setup corrently.

Introduce dpaa2_ni_media_change_locked() so we can avoid reccursive
locking and call "dpaa2_ni_media_change()" instead of mii_mediachg()
as the latter does not setup our state their either.

In order for this all to work, call if_setdrvflagbits() just before
rather than after the above.

Also remove an unecessary direct call to dpaa2_ni_miibus_statchg()
which mii_mediachg() will trigger anyway.

This all fixes a problem [1] that one had to break the link (either
unplugging/replugging the cable or using ifconfig media none;
ifconfig media auto) to re-trigger the all updates and get the
full state programmed when hardware expected.

MFC after: 3 days
GH-Issue: https://github.com/mcusim/freebsd-src/issues/21 [1]

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 54487
Build 51376: arc lint + arc unit