Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys/dev/onewire



Module Name:    src
Committed By:   brad
Date:           Wed Nov 11 12:22:42 UTC 2026

Modified Files:
        src/sys/dev/onewire: onewire.c

Log Message:
20 years ago when the 1-Wire infrastructure was ported over from
OpenBSD, the calls in the onewire_detach() function in the onewirebus
(sys/dev/onewire/onewire.c) code for config_detach_children() was
commented out.  I don't know why this was done, exactly, as there
wasn't any particular comments present.  I suspect it might have been
because owtemp, the common end device, could not detach or maybe
detaching just didn't work as expected at that time.

The string of devices are as follows:

End controller     -> onewirebus -> End device
gpioow or ds2482ow ->            -> such as owtemp or ds24e17iic

If the onewirebus does not call config_detach_children(), the end
devices will end up orphened and not detach if the controller is
unloaded, such as with modunload.  In a DIAGNOSTIC kernel, you will
panic with a complaint about the end device still being present.

Put back the config_detach_children() call in onewire.c.  Tested on
aarch64 on a DIAGNOSTIC kernel with several ds248x controllers and
some owtemp end devices.  Generally, one can now unload the controller
driver without any problems now, but I can't promise that there are
not bugs in all of this stuff.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/onewire/onewire.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index