USB Device self-umount

Tomasz CEDRO <[email protected]> Tue, 26 Sep 2017 16:30:48 +0200
Newsgroups gmane.os.freebsd.devel.usb,gmane.os.freebsd.questions,gmane.os.freebsd.devel.hardware
Message-ID <CAFYkXjnP7Ha_uZxc1zF0pz_7C3OdsJ3h-H8uyZQE_ViX5=YzBQ@mail.gmail.com>
Hello world! :-)

I am working on a device that implements USB MSC mass storage for
firmware programming [1]. After receiving file, it flashes the
firmware image to the target MCU, then reboots and starts the program
or waits debug session..

The question is how to gracefully self-umount from a device point of
view in a way not to confuse automounter and/or usb / mass storage
drivers? Is there any way of doing that in SCSI+USB? Something like
CD-ROM eject, then device removal..

Any hints appreciated :-)
Tomek

[1] https://github.com/mbedmicro/DAPLink

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info