Virtual Storport: ejecting media? (safely)

3 things:

  1. You don’t report check condition on some scsi commands including inquiry.
  2. Are you correctly forming the check condition? Run a bus analyzer and see if your check condition shows up.
  3. As windows is automatically flushing the volume and signaling this by going into the allow media removal state then why do anything else other than wait for this graceful state.

>drive when it needs to write to the volume and unlocks it at other times. However even with the

medium in the unlocked state, the eject event is ignored…

Look at the source. Removable media support in Disk sample.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

Hi Dan,

For removable media device, disk/classpnp layer issues GESN / TEST UNIT READY to get the device status. You need to response the command with either event (for GESN) or sense data (for TEST UNIT READY) to trigger ejection.

Regards,
Michael Xing