public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Hancock <hancockrwd@gmail.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: prasannatsmkumar <prasannatsmkumar@gmail.com>,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	nautilus-list@gnome.org
Subject: Re: Fwd: Safely remove option shows with Micro SD Card connected to Linux through an Android phone
Date: Wed, 12 Dec 2012 00:26:45 -0600	[thread overview]
Message-ID: <50C823A5.3050904@gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1212111530250.1180-100000@iolanthe.rowland.org>

On 12/11/2012 02:37 PM, Alan Stern wrote:
> On Tue, 11 Dec 2012, prasannatsmkumar wrote:
>
>> Hi All,
>>
>> I connected an Android phone using USB cable to my machine running
>> Linux (Linux 3.0, 3.2, 3.5). Mounted the SD card in phone in system
>> (phone is just a pass through I guess). When I choose "Safely Remove"
>> option in nautilus file manager (gnome's default file manager) I got
>> an error saying
>>
>> "Error detaching: helper exited with exit code 1: Detaching device /dev/sdb
>> USB device: /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-5)
>> SYNCHRONIZE CACHE: OK
>> STOP UNIT: FAILED: No such file or directory"
>
> STOP UNIT means spin down the disk or eject the disc.  Since your phone
> doesn't have a disk drive or an optical disc, no wonder this step
> failed.

The reason it's likely doing a STOP UNIT on USB storage devices is that 
this is preferable for at least USB-connected HDs (at least where the 
USB to SATA, etc. converter bothers to implement the translation). For 
many drives, it's better for the disk's lifespan to power it down 
normally (as it would be if it was in a machine that was being shut 
down) so it can unload its heads in a controlled fashion, rather than 
just cutting the power on the running disk and causing an emergency head 
retract.

Some types of devices may not support that command or may not do 
anything useful with it, but "No such file or directory" seems a strange 
error to run into.

>
>> and it goes to unmounted state (yes it should go to and this is not a
>> problem). But I am not able to find the reason for the above error
>> message pop-up. If I choose "Eject" option then things are fine (I
>> think Eject does more than un-mounting the file system).
>>
>> I think "safely remove" tries to cut the power supply to the device
>> but eject does not do that. Is that correct?
>
> No, neither option cuts power.  The main difference is that "safely
> remove" disables the USB connection, so that if the device has an "okay
> to unplug now" light, the light will turn on.
>
>> If the device cannot be
>> powered down (due to battery charging) why this option is shown? Is
>> kernel exposing such capability to the user space?
>>
>> I am not sure whether this is the correct place to ask this question.
>> If this is not the correct place please direct me to correct place.
>
> You probably should get in touch with the people who maintain the
> Nautilus program if you want to know why it does something.
>
> Alan Stern
>


  reply	other threads:[~2012-12-12  6:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CANc+2y5iLuZG5wPab5Hf0-mAngpkO+72XZR3FK9kgR8-kAKZ1Q@mail.gmail.com>
2012-12-11 18:04 ` Fwd: Safely remove option shows with Micro SD Card connected to Linux through an Android phone prasannatsmkumar
2012-12-11 20:37   ` Alan Stern
2012-12-12  6:26     ` Robert Hancock [this message]
2012-12-12 15:41       ` Alan Stern
2012-12-13 16:48         ` prasannatsmkumar
2012-12-13 16:50         ` prasannatsmkumar
2012-12-13 16:41     ` prasannatsmkumar
2012-12-13 18:10       ` Alan Stern
2012-12-13 18:22         ` prasannatsmkumar
2012-12-13 19:19           ` Alan Stern
2012-12-14  6:18             ` prasannatsmkumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50C823A5.3050904@gmail.com \
    --to=hancockrwd@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=nautilus-list@gnome.org \
    --cc=prasannatsmkumar@gmail.com \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox