--- - branch: MAIN date: Mon Mar 28 12:38:15 UTC 2022 files: - new: '1.299' old: '1.298' path: src/sys/kern/subr_autoconf.c pathrev: src/sys/kern/subr_autoconf.c@1.299 type: modified - new: '1.181' old: '1.180' path: src/sys/sys/device.h pathrev: src/sys/sys/device.h@1.181 type: modified id: 20220328T123815Z.1ed38a7fcf732543a6cd413351899c7026590a87 log: | autoconf(9): New function config_detach_commit. When a driver's .ca_detach function has committed to detaching -- it definitely won't back out with EBUSY, for instance -- it can call this to wake all pending calls to device_lookup_acquire and make them fail immediately. This is necessary to break a deadlock if the device_lookup_acquire calls happen inside I/O operations which the driver's .ca_detach function waits for the completion of -- without config_detach_commit, I/O operations would be stuck in device_lookup_acquire waiting for .ca_detach and .ca_detach would be stuck waiting for I/O operations to return. Most drivers won't need to call this: for autoconf drivers used the traditional way by devsw for userland device nodes, the .ca_detach routine uses vdevgone, and we will arrange to make vdevgone call config_detach_commit automagically in such drivers anyway. XXX kernel ABI change to struct device requires bump -- later change will make struct device opaque to ABI, but we're not there yet module: src subject: 'CVS commit: src/sys' unixtime: '1648471095' user: riastradh