Page MenuHomeFreeBSD

if_dwc: add detach method
ClosedPublic

Authored by mhorne on Jun 15 2022, 7:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 24, 11:18 PM
Unknown Object (File)
Jan 14 2024, 10:22 AM
Unknown Object (File)
Jan 14 2024, 9:55 AM
Unknown Object (File)
Dec 23 2023, 12:37 AM
Unknown Object (File)
Dec 17 2023, 9:33 AM
Unknown Object (File)
Dec 1 2023, 2:11 AM
Unknown Object (File)
Oct 29 2023, 12:13 AM
Unknown Object (File)
Sep 12 2023, 6:10 PM
Subscribers

Details

Summary

It might not be super useful at the moment, but it works.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

It is useful for testing, thanks ;)

This revision is now accepted and ready to land.Jun 15 2022, 8:07 PM
In D35496#805065, @manu wrote:

It is useful for testing, thanks ;)

Exactly, only I couldn't convince devctl to reattach the device :')

sys/dev/dwc/if_dwc.c
1755

This is slightly racy ->the interrupt should be teardown first, otherwise it may occurs in the middle
of HW deinitialization or ifc destruction.

Disable and tear down interrupts first in the detach method.

This revision now requires review to proceed.Jun 16 2022, 2:44 PM
mhorne added inline comments.
sys/dev/dwc/if_dwc.c
1755

Thanks. Am I right in thinking that the call to ether_ifdetach() adequately protects us from races with dwc_ioctl()?

Meaning, it should not be possible for dwc_ioctl(SIOCGIFMEDIA) to occur while we are deleting the miibus child.

This revision was not accepted when it landed; it landed in state Needs Review.Jun 23 2022, 6:16 PM
This revision was automatically updated to reflect the committed changes.
mhorne marked an inline comment as done.