* CDROMEJECT (or START_STOP(2)) completely disables USB flash stick
@ 2006-07-06 9:10 Andrey Borzenkov
2006-07-06 13:02 ` Jan Engelhardt
0 siblings, 1 reply; 2+ messages in thread
From: Andrey Borzenkov @ 2006-07-06 9:10 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-scsi
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
While working on some HAL issues I hit some not clear - to me at least -
behavior. I was testing HAL Eject method that under Linux effectively
calls 'eject /dev/block'. Now for USB stick - at least, that I have, this
results in "ejecting medium" without apparently any way to get it back (the
only way is to replug stick).
UEVENT[1152175788.114199] remove@/block/sda/sda1
ACTION=remove
DEVPATH=/block/sda/sda1
SUBSYSTEM=block
SEQNUM=1332
MINOR=1
MAJOR=8
PHYSDEVPATH=/devices/pci0000:00/0000:00:02.0/usb1/1-1/1-1:1.0/host1/target1:0:0/1:0:0:0
PHYSDEVBUS=scsi
PHYSDEVDRIVER=sd
In this state I do see device:
{pts/0}% sudo sdparm -a /dev/sda
/dev/sda: 128MB 2.00
{pts/0}% cat /proc/scsi/scsi
Attached devices:
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: Model: 128MB Rev: 2.00
Type: Direct-Access ANSI SCSI revision: 02
but any attempt to get partition back results in
{pts/0}% LC_ALL=C sudo blockdev --rereadpt /dev/sda
/dev/sda: No medium found
I tried 'sdparm -C start' without much success as well:
{pts/0}% LC_ALL=C sudo sdparm -v -C start /dev/sda
/dev/sda: 128MB 2.00
Start stop unit command: 1b 00 00 00 01 00
{pts/0}% LC_ALL=C sudo blockdev --rereadpt /dev/sda
/dev/sda: No medium found
Well, I just try to understand if this is a expected (and reasonable)
behaviour or a bug in hardware or possibly software?
Thank you
- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
iD8DBQFErNN2R6LMutpd94wRAg1DAJ9EITRTZCm/ej5PXzxAK71s7sUCVACgiNFx
KXOuNAwwhPKYcogaK6LgMZM=
=MHVX
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: CDROMEJECT (or START_STOP(2)) completely disables USB flash stick
2006-07-06 9:10 CDROMEJECT (or START_STOP(2)) completely disables USB flash stick Andrey Borzenkov
@ 2006-07-06 13:02 ` Jan Engelhardt
0 siblings, 0 replies; 2+ messages in thread
From: Jan Engelhardt @ 2006-07-06 13:02 UTC (permalink / raw)
To: Andrey Borzenkov; +Cc: linux-kernel, linux-scsi
>
>While working on some HAL issues I hit some not clear - to me at least -
>behavior. I was testing HAL Eject method that under Linux effectively
>calls 'eject /dev/block'. Now for USB stick - at least, that I have, this
>results in "ejecting medium" without apparently any way to get it back (the
>only way is to replug stick).
I suppose eject does the same as `sdparm -C eject`, and yes, it does not
seem like you can reload an USB stick with the opposite of eject, `sdparm
-C load` (at least these are the commands that work for CDROM devices).
>{pts/0}% LC_ALL=C sudo blockdev --rereadpt /dev/sda
>/dev/sda: No medium found
>
>I tried 'sdparm -C start' without much success as well:
>
>{pts/0}% LC_ALL=C sudo sdparm -v -C start /dev/sda
> /dev/sda: 128MB 2.00
> Start stop unit command: 1b 00 00 00 01 00
>{pts/0}% LC_ALL=C sudo blockdev --rereadpt /dev/sda
>/dev/sda: No medium found
>
>Well, I just try to understand if this is a expected (and reasonable)
>behaviour or a bug in hardware or possibly software?
I cannot close the tray of the CDROM drive with -C start (or -C ready), so
I doubt the same will be true for USB sticks.
Maybe all of this is a limitation of USB sticks - I got to check it with
real USB harddisks or hotswap SCA disks.
Jan Engelhardt
--
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-07-06 13:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-06 9:10 CDROMEJECT (or START_STOP(2)) completely disables USB flash stick Andrey Borzenkov
2006-07-06 13:02 ` Jan Engelhardt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox