IIRC, the mass storage device presents itself at the SCSI
level as a removeable device and ms windows uses this to set
the write policy for the device to optimise for "quick
removal" (no write caching if I understand correctly). I
think this makes it no longer necessary to show the "safe
removal" icon in the task bar.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am not the OP, but since I would like this functionality
too, so I can offer some additional information.
The eject function can be found by right clicking the
removable drive icon. Usually this is used for internal
USB card readers if you want to remove a card. Stopping
the USB device is not a good option for internal readers,
as it is difficult to be able to physically unplug/plug
them in to get the device started again, without
rebooting. Eject is therefor very handy.
The SCSI commands that are used by Windows 2000 are; 0x1E
Prevent Allow Medium Removal, and 0x1B Start Stop Unit. I
haven't checked if the commands are the same for XP.
I can confirm that under Windows 2000 that it does indeed
do write caching, even for removable devices. This was
changed in Windows XP, to allow for the quick removal of
removable devices. As a result the performance under XP is
really terrible, usually under 60kB/s. If the removable
medium bit is cleared, then the performance is about the
same as Win2k with the bit set. The side effect of
clearing the removable medium bit, is that XP then wants to
create a recycle bin, and the system volume information.
My customer discovered the terrible XP performance while
trying to use external USB card readers. He tried a number
of different manufacturers before discovering that it is an
XP issue. The only option seems to be to clear the
removable medium bit, as there seem to be no other settings
to control this.
I hope this helps,
Mike Anton
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A couple of different things seem to get mixed up in this
thread. Can the original poster clarify the feature request?
First of all, the eject command indeed does not work.
Windows sends a 0x1E SCSI command that is not supported yet
by the MSC example. The currently implemented SCSI commands
are the ones listed as required in the USB. org MSC
compliance test specification document. However, looking at
the referenced SCSI documents, this list is not complete or
perhaps even incorrect. I'd like to get the requirements
perfectly clear before implementing any more commands.
Ofcourse, if anybody is not happy with that, they can just
take the code and add the commands themselves.
Somehow I don't see the low throughput under Windows XP, I
get definately more than 60 kB/s, even when the device is
optimised for quick removal. Can't you just tell windows to
enable write caching? IIRC, this setting is remembered by
windows when the device has a valid serial number (currently
hardcoded to 'DEADC0DECAFE'). Clearing the removeable medium
bit seems a bit like a hack to work around a windows bug and
I'm reluctant to do that.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm sorry, I didn't mean to hijack the OP's thread. I had
just noticed the same problem, and thought the comments
would be useful.
I took a look at implementing the required commands for
eject, but I couldn't figure out what the responses needed
to be, and what else needed to be done. I did find the
SCSI docs, but there didn't seem to be enough info there
for me to work with.
I'll create a thread under general discussions for the
continuation the XP write performance thread.
Mike
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=282107
What do you mean exactly by "eject" feature?
IIRC, the mass storage device presents itself at the SCSI
level as a removeable device and ms windows uses this to set
the write policy for the device to optimise for "quick
removal" (no write caching if I understand correctly). I
think this makes it no longer necessary to show the "safe
removal" icon in the task bar.
Logged In: YES
user_id=1471492
I am not the OP, but since I would like this functionality
too, so I can offer some additional information.
The eject function can be found by right clicking the
removable drive icon. Usually this is used for internal
USB card readers if you want to remove a card. Stopping
the USB device is not a good option for internal readers,
as it is difficult to be able to physically unplug/plug
them in to get the device started again, without
rebooting. Eject is therefor very handy.
The SCSI commands that are used by Windows 2000 are; 0x1E
Prevent Allow Medium Removal, and 0x1B Start Stop Unit. I
haven't checked if the commands are the same for XP.
I can confirm that under Windows 2000 that it does indeed
do write caching, even for removable devices. This was
changed in Windows XP, to allow for the quick removal of
removable devices. As a result the performance under XP is
really terrible, usually under 60kB/s. If the removable
medium bit is cleared, then the performance is about the
same as Win2k with the bit set. The side effect of
clearing the removable medium bit, is that XP then wants to
create a recycle bin, and the system volume information.
My customer discovered the terrible XP performance while
trying to use external USB card readers. He tried a number
of different manufacturers before discovering that it is an
XP issue. The only option seems to be to clear the
removable medium bit, as there seem to be no other settings
to control this.
I hope this helps,
Mike Anton
Logged In: YES
user_id=282107
A couple of different things seem to get mixed up in this
thread. Can the original poster clarify the feature request?
First of all, the eject command indeed does not work.
Windows sends a 0x1E SCSI command that is not supported yet
by the MSC example. The currently implemented SCSI commands
are the ones listed as required in the USB. org MSC
compliance test specification document. However, looking at
the referenced SCSI documents, this list is not complete or
perhaps even incorrect. I'd like to get the requirements
perfectly clear before implementing any more commands.
Ofcourse, if anybody is not happy with that, they can just
take the code and add the commands themselves.
Somehow I don't see the low throughput under Windows XP, I
get definately more than 60 kB/s, even when the device is
optimised for quick removal. Can't you just tell windows to
enable write caching? IIRC, this setting is remembered by
windows when the device has a valid serial number (currently
hardcoded to 'DEADC0DECAFE'). Clearing the removeable medium
bit seems a bit like a hack to work around a windows bug and
I'm reluctant to do that.
Logged In: YES
user_id=1471492
I'm sorry, I didn't mean to hijack the OP's thread. I had
just noticed the same problem, and thought the comments
would be useful.
I took a look at implementing the required commands for
eject, but I couldn't figure out what the responses needed
to be, and what else needed to be done. I did find the
SCSI docs, but there didn't seem to be enough info there
for me to work with.
I'll create a thread under general discussions for the
continuation the XP write performance thread.
Mike