Hello, there is cdrom autoclose feature that is supposed to close the tray, wait for the disc to become ready, and then open the device. This used to work in ancient times. Then in old times there was a hack in util-linux which worked around the breakage which probably resulted from switching to scsi emulation. Currently util-linux maintainer refuses to merge another hack on the basis that kernel still has the feature so it should be fixed there. The code needs not be replicated in every userspace utility like mount or dd which has no business knowing which devices are CD-roms and where the autoclose setting is in the kernel. Link: https://lore.kernel.org/lkml/cover.1513263482.git.msuchanek@xxxxxxx/ Link: https://lore.kernel.org/lkml/cover.1571834862.git.msuchanek@xxxxxxx/ v3: - change the VMware workaround to use blacklist flag - use exported function instead of ioctl Michal Suchanek (7): cdrom: add poll_event_interruptible cdrom: factor out common open_for_* code cdrom: wait for the tray to close cdrom: export autoclose logic as a separate function bdev: add open_finish. scsi: blacklist: add VMware ESXi cdrom - broken tray emulation. scsi: sr: wait for the medium to become ready Documentation/filesystems/locking.rst | 2 + drivers/cdrom/cdrom.c | 192 ++++++++++++++------------ drivers/scsi/scsi_devinfo.c | 15 +- drivers/scsi/sr.c | 60 ++++++-- fs/block_dev.c | 21 ++- include/linux/blkdev.h | 1 + include/linux/cdrom.h | 1 + include/scsi/scsi_devinfo.h | 7 +- 8 files changed, 191 insertions(+), 108 deletions(-) -- 2.23.0