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)
Oct 17 2024, 6:34 AM
Unknown Object (File)
Oct 15 2024, 11:16 PM
Unknown Object (File)
Oct 15 2024, 2:20 PM
Unknown Object (File)
Oct 13 2024, 8:04 PM
Unknown Object (File)
Oct 12 2024, 8:23 AM
Unknown Object (File)
Oct 11 2024, 12:30 AM
Unknown Object (File)
Oct 10 2024, 12:51 AM
Unknown Object (File)
Oct 10 2024, 12:51 AM
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.