6c46ebb0 | 15-Nov-2023 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
dpaa2: fdt improve detection for dpmac/phys
'pcs-handles' are not mandatory in the device tree here so do not enforce them. This allows us to find dpmac entries needed for phys on the WHLE-LS1 as w
dpaa2: fdt improve detection for dpmac/phys
'pcs-handles' are not mandatory in the device tree here so do not enforce them. This allows us to find dpmac entries needed for phys on the WHLE-LS1 as well.
MFC after: 3 days Reviewed by: jceel, dsl Differential Revision: https://reviews.freebsd.org/D42644
show more ...
|
964b3408 | 17-Nov-2023 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
dpaa2: defer link_state updates until we are up
dpaa2_ni_media_change() was called in early setup stages, before we were fully setup. That lead to internal driver state being all synched and fine b
dpaa2: defer link_state updates until we are up
dpaa2_ni_media_change() was called in early setup stages, before we were fully setup. That lead to internal driver 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 there 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 lose 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] Reviewed by: dsl, dch Differential Revision: https://reviews.freebsd.org/D42643
show more ...
|