--- - branch: MAIN date: Mon Mar 28 12:33:50 UTC 2022 files: - new: '1.41' old: '1.40' path: src/sys/kern/subr_devsw.c pathrev: src/sys/kern/subr_devsw.c@1.41 type: modified - new: '1.156' old: '1.155' path: src/sys/sys/conf.h pathrev: src/sys/sys/conf.h@1.156 type: modified id: 20220328T123350Z.ebb60d1bd928d6c46fc30afcfbbe2f3b0a7ecb3e log: | driver(9): New devsw members d_cfdriver, d_devtounit. If set, then bdev_open/cdev_open will use d_devtounit to map the dev_t to an autoconf instance (e.g., /dev/wd0a -> wd0) and hold a reference with device_lookup_acquire across the call to d_open. This guarantees that the autoconf instance cannot be detached while the devsw's d_open function is trying to open it (and also that the autoconf instance has finished *_attach before anyone can open it). Of course, if the underlying hardware has gone away, there will be I/O errors, but this avoids software synchronization bugs between open and detach for drivers that opt into it. It's up to the driver and bus to figure out how to deal with I/O errors from operations on hardware that has gone away while the software hasn't finished notifying everything that it's gone yet. XXX kernel ABI change to struct bdevsw/cdevsw requires bump module: src subject: 'CVS commit: src/sys' unixtime: '1648470830' user: riastradh