Re: Fwd: Safely remove option shows with Micro SD Card connected to Linux through an Android phone

2012-12-13 Thread prasannatsmkumar
On Fri, Dec 14, 2012 at 12:49 AM, Alan Stern  wrote:
> On Thu, 13 Dec 2012, prasannatsmkumar wrote:
>
>> On Thu, Dec 13, 2012 at 11:40 PM, Alan Stern  
>> wrote:
>> > On Thu, 13 Dec 2012, prasannatsmkumar wrote:
>> >
>> >> On Wed, Dec 12, 2012 at 2:07 AM, Alan Stern  
>> >> wrote:
>> >> > 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.
>> >>
>> >> Yes of course it does not have a optical disc or disk drive. But I
>> >> thought if there is no such thing nautilus should not try to spin
>> >> down. Linux kernel has nothing to do with this problem though.
>> >
>> > Right.  Bear in mind that nautilus may not have any way of finding out
>> > whether the device has removable media, other than requesting for the
>> > media to be ejected.  But if it doesn't know then failure of the
>> > request shouldn't be reported as an error.
>>
>> Is kernel not exposing this information?
>
> What I wrote earlier was wrong, sorry.

No problem :).


> No, the kernel does not export it.  But user programs can get the
> information directly from the device in exactly the same way that the
> kernel does, by issuing an INQUIRY command.

I will try to file a bug in nautilus project. As I am not in the
nautilus mailing list my mails are not getting delivered.

>
>>  The other OS shows "Eject"
>> for the android device and for other pen drive I get a "safely remove"
>> option - stated this assuming the options in nautilus and the other OS
>> mean the same.
>
> Alan Stern
>

Thanks,
PrasannaKumar
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Fwd: Safely remove option shows with Micro SD Card connected to Linux through an Android phone

2012-12-13 Thread Alan Stern
On Thu, 13 Dec 2012, prasannatsmkumar wrote:

> On Thu, Dec 13, 2012 at 11:40 PM, Alan Stern  
> wrote:
> > On Thu, 13 Dec 2012, prasannatsmkumar wrote:
> >
> >> On Wed, Dec 12, 2012 at 2:07 AM, Alan Stern  
> >> wrote:
> >> > 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.
> >>
> >> Yes of course it does not have a optical disc or disk drive. But I
> >> thought if there is no such thing nautilus should not try to spin
> >> down. Linux kernel has nothing to do with this problem though.
> >
> > Right.  Bear in mind that nautilus may not have any way of finding out
> > whether the device has removable media, other than requesting for the
> > media to be ejected.  But if it doesn't know then failure of the
> > request shouldn't be reported as an error.
> 
> Is kernel not exposing this information?

What I wrote earlier was wrong, sorry.

No, the kernel does not export it.  But user programs can get the
information directly from the device in exactly the same way that the
kernel does, by issuing an INQUIRY command.

>  The other OS shows "Eject"
> for the android device and for other pen drive I get a "safely remove"
> option - stated this assuming the options in nautilus and the other OS
> mean the same.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Fwd: Safely remove option shows with Micro SD Card connected to Linux through an Android phone

2012-12-13 Thread prasannatsmkumar
On Thu, Dec 13, 2012 at 11:40 PM, Alan Stern  wrote:
> On Thu, 13 Dec 2012, prasannatsmkumar wrote:
>
>> On Wed, Dec 12, 2012 at 2:07 AM, Alan Stern  
>> wrote:
>> > 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.
>>
>> Yes of course it does not have a optical disc or disk drive. But I
>> thought if there is no such thing nautilus should not try to spin
>> down. Linux kernel has nothing to do with this problem though.
>
> Right.  Bear in mind that nautilus may not have any way of finding out
> whether the device has removable media, other than requesting for the
> media to be ejected.  But if it doesn't know then failure of the
> request shouldn't be reported as an error.

Is kernel not exposing this information? The other OS shows "Eject"
for the android device and for other pen drive I get a "safely remove"
option - stated this assuming the options in nautilus and the other OS
mean the same.

Thanks,
PrasannaKumar
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Fwd: Safely remove option shows with Micro SD Card connected to Linux through an Android phone

2012-12-13 Thread Alan Stern
On Thu, 13 Dec 2012, prasannatsmkumar wrote:

> On Wed, Dec 12, 2012 at 2:07 AM, Alan Stern  wrote:
> > 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.
> 
> Yes of course it does not have a optical disc or disk drive. But I
> thought if there is no such thing nautilus should not try to spin
> down. Linux kernel has nothing to do with this problem though.

Right.  Bear in mind that nautilus may not have any way of finding out
whether the device has removable media, other than requesting for the
media to be ejected.  But if it doesn't know then failure of the 
request shouldn't be reported as an error.

> > 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.
> 
> I have seen lights going off in my pen drive, so naturally as an user
> I assumed that nautilus request the kernel to cut down the power and
> kernel did that. After choosing "Safely Remove" option my device node
> (/dev/sdb or whatever) still exists?

No, it is gone.  At least, I think so -- I'm not sure exactly what 
nautilus does when you select "Safely Remove".  The kernel's USB stack 
has a "remove" interface that is meant for this sort of thing; I've 
been assuming that this is what nautilus uses.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Fwd: Safely remove option shows with Micro SD Card connected to Linux through an Android phone

2012-12-13 Thread prasannatsmkumar
On Wed, Dec 12, 2012 at 9:11 PM, Alan Stern  wrote:
> That's the error code returned by the USB stack when a request is
> cancelled synchronously.  But it is intended for internal kernel use
> only; it should not appear at the userspace level.  Without knowing the
> details of what the program did, it's hard to tell how that code got
> there.

Makes sense. Seeing the reason having this is really helpful I think.
A good information :).

Forgot to copy all so sending this reply again.

Thanks,
PrasannaKumar
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Fwd: Safely remove option shows with Micro SD Card connected to Linux through an Android phone

2012-12-13 Thread prasannatsmkumar
On Wed, Dec 12, 2012 at 9:11 PM, Alan Stern  wrote:
> That's the error code returned by the USB stack when a request is
> cancelled synchronously.  But it is intended for internal kernel use
> only; it should not appear at the userspace level.  Without knowing the
> details of what the program did, it's hard to tell how that code got
> there.

I am not much aware of the nautilus code. May be people who work on
Nautilus will be able to provide this information.

Can any nautilus contributor or one who has idea of nautilus code
explain this? Having safe to remove and eject are great and fine
tuning them will be very useful for users.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Fwd: Safely remove option shows with Micro SD Card connected to Linux through an Android phone

2012-12-13 Thread prasannatsmkumar
On Wed, Dec 12, 2012 at 2:07 AM, Alan Stern  wrote:
> 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.

Yes of course it does not have a optical disc or disk drive. But I
thought if there is no such thing nautilus should not try to spin
down. Linux kernel has nothing to do with this problem though.

>
> 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.

I have seen lights going off in my pen drive, so naturally as an user
I assumed that nautilus request the kernel to cut down the power and
kernel did that. After choosing "Safely Remove" option my device node
(/dev/sdb or whatever) still exists?

>
> You probably should get in touch with the people who maintain the
> Nautilus program if you want to know why it does something.

Yeah sure. Nautilus people are in this list. I will communicate with them.

Thanks and Regards,
PrasannaKumar
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Fwd: Safely remove option shows with Micro SD Card connected to Linux through an Android phone

2012-12-13 Thread prasannatsmkumar
On Wed, Dec 12, 2012 at 2:07 AM, Alan Stern st...@rowland.harvard.edu wrote:
 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.

Yes of course it does not have a optical disc or disk drive. But I
thought if there is no such thing nautilus should not try to spin
down. Linux kernel has nothing to do with this problem though.


 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.

I have seen lights going off in my pen drive, so naturally as an user
I assumed that nautilus request the kernel to cut down the power and
kernel did that. After choosing Safely Remove option my device node
(/dev/sdb or whatever) still exists?


 You probably should get in touch with the people who maintain the
 Nautilus program if you want to know why it does something.

Yeah sure. Nautilus people are in this list. I will communicate with them.

Thanks and Regards,
PrasannaKumar
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Fwd: Safely remove option shows with Micro SD Card connected to Linux through an Android phone

2012-12-13 Thread prasannatsmkumar
On Wed, Dec 12, 2012 at 9:11 PM, Alan Stern st...@rowland.harvard.edu wrote:
 That's the error code returned by the USB stack when a request is
 cancelled synchronously.  But it is intended for internal kernel use
 only; it should not appear at the userspace level.  Without knowing the
 details of what the program did, it's hard to tell how that code got
 there.

I am not much aware of the nautilus code. May be people who work on
Nautilus will be able to provide this information.

Can any nautilus contributor or one who has idea of nautilus code
explain this? Having safe to remove and eject are great and fine
tuning them will be very useful for users.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Fwd: Safely remove option shows with Micro SD Card connected to Linux through an Android phone

2012-12-13 Thread prasannatsmkumar
On Wed, Dec 12, 2012 at 9:11 PM, Alan Stern st...@rowland.harvard.edu wrote:
 That's the error code returned by the USB stack when a request is
 cancelled synchronously.  But it is intended for internal kernel use
 only; it should not appear at the userspace level.  Without knowing the
 details of what the program did, it's hard to tell how that code got
 there.

Makes sense. Seeing the reason having this is really helpful I think.
A good information :).

Forgot to copy all so sending this reply again.

Thanks,
PrasannaKumar
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Fwd: Safely remove option shows with Micro SD Card connected to Linux through an Android phone

2012-12-13 Thread Alan Stern
On Thu, 13 Dec 2012, prasannatsmkumar wrote:

 On Wed, Dec 12, 2012 at 2:07 AM, Alan Stern st...@rowland.harvard.edu wrote:
  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.
 
 Yes of course it does not have a optical disc or disk drive. But I
 thought if there is no such thing nautilus should not try to spin
 down. Linux kernel has nothing to do with this problem though.

Right.  Bear in mind that nautilus may not have any way of finding out
whether the device has removable media, other than requesting for the
media to be ejected.  But if it doesn't know then failure of the 
request shouldn't be reported as an error.

  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.
 
 I have seen lights going off in my pen drive, so naturally as an user
 I assumed that nautilus request the kernel to cut down the power and
 kernel did that. After choosing Safely Remove option my device node
 (/dev/sdb or whatever) still exists?

No, it is gone.  At least, I think so -- I'm not sure exactly what 
nautilus does when you select Safely Remove.  The kernel's USB stack 
has a remove interface that is meant for this sort of thing; I've 
been assuming that this is what nautilus uses.

Alan Stern

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Fwd: Safely remove option shows with Micro SD Card connected to Linux through an Android phone

2012-12-13 Thread prasannatsmkumar
On Thu, Dec 13, 2012 at 11:40 PM, Alan Stern st...@rowland.harvard.edu wrote:
 On Thu, 13 Dec 2012, prasannatsmkumar wrote:

 On Wed, Dec 12, 2012 at 2:07 AM, Alan Stern st...@rowland.harvard.edu 
 wrote:
  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.

 Yes of course it does not have a optical disc or disk drive. But I
 thought if there is no such thing nautilus should not try to spin
 down. Linux kernel has nothing to do with this problem though.

 Right.  Bear in mind that nautilus may not have any way of finding out
 whether the device has removable media, other than requesting for the
 media to be ejected.  But if it doesn't know then failure of the
 request shouldn't be reported as an error.

Is kernel not exposing this information? The other OS shows Eject
for the android device and for other pen drive I get a safely remove
option - stated this assuming the options in nautilus and the other OS
mean the same.

Thanks,
PrasannaKumar
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Fwd: Safely remove option shows with Micro SD Card connected to Linux through an Android phone

2012-12-13 Thread Alan Stern
On Thu, 13 Dec 2012, prasannatsmkumar wrote:

 On Thu, Dec 13, 2012 at 11:40 PM, Alan Stern st...@rowland.harvard.edu 
 wrote:
  On Thu, 13 Dec 2012, prasannatsmkumar wrote:
 
  On Wed, Dec 12, 2012 at 2:07 AM, Alan Stern st...@rowland.harvard.edu 
  wrote:
   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.
 
  Yes of course it does not have a optical disc or disk drive. But I
  thought if there is no such thing nautilus should not try to spin
  down. Linux kernel has nothing to do with this problem though.
 
  Right.  Bear in mind that nautilus may not have any way of finding out
  whether the device has removable media, other than requesting for the
  media to be ejected.  But if it doesn't know then failure of the
  request shouldn't be reported as an error.
 
 Is kernel not exposing this information?

What I wrote earlier was wrong, sorry.

No, the kernel does not export it.  But user programs can get the
information directly from the device in exactly the same way that the
kernel does, by issuing an INQUIRY command.

  The other OS shows Eject
 for the android device and for other pen drive I get a safely remove
 option - stated this assuming the options in nautilus and the other OS
 mean the same.

Alan Stern

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Fwd: Safely remove option shows with Micro SD Card connected to Linux through an Android phone

2012-12-13 Thread prasannatsmkumar
On Fri, Dec 14, 2012 at 12:49 AM, Alan Stern st...@rowland.harvard.edu wrote:
 On Thu, 13 Dec 2012, prasannatsmkumar wrote:

 On Thu, Dec 13, 2012 at 11:40 PM, Alan Stern st...@rowland.harvard.edu 
 wrote:
  On Thu, 13 Dec 2012, prasannatsmkumar wrote:
 
  On Wed, Dec 12, 2012 at 2:07 AM, Alan Stern st...@rowland.harvard.edu 
  wrote:
   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.
 
  Yes of course it does not have a optical disc or disk drive. But I
  thought if there is no such thing nautilus should not try to spin
  down. Linux kernel has nothing to do with this problem though.
 
  Right.  Bear in mind that nautilus may not have any way of finding out
  whether the device has removable media, other than requesting for the
  media to be ejected.  But if it doesn't know then failure of the
  request shouldn't be reported as an error.

 Is kernel not exposing this information?

 What I wrote earlier was wrong, sorry.

No problem :).


 No, the kernel does not export it.  But user programs can get the
 information directly from the device in exactly the same way that the
 kernel does, by issuing an INQUIRY command.

I will try to file a bug in nautilus project. As I am not in the
nautilus mailing list my mails are not getting delivered.


  The other OS shows Eject
 for the android device and for other pen drive I get a safely remove
 option - stated this assuming the options in nautilus and the other OS
 mean the same.

 Alan Stern


Thanks,
PrasannaKumar
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Fwd: Safely remove option shows with Micro SD Card connected to Linux through an Android phone

2012-12-12 Thread Alan Stern
On Wed, 12 Dec 2012, Robert Hancock wrote:

> 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/pci:00/: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.

That's the error code returned by the USB stack when a request is 
cancelled synchronously.  But it is intended for internal kernel use 
only; it should not appear at the userspace level.  Without knowing the 
details of what the program did, it's hard to tell how that code got 
there.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Fwd: Safely remove option shows with Micro SD Card connected to Linux through an Android phone

2012-12-12 Thread Alan Stern
On Wed, 12 Dec 2012, Robert Hancock wrote:

 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/pci:00/: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.

That's the error code returned by the USB stack when a request is 
cancelled synchronously.  But it is intended for internal kernel use 
only; it should not appear at the userspace level.  Without knowing the 
details of what the program did, it's hard to tell how that code got 
there.

Alan Stern

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Fwd: Safely remove option shows with Micro SD Card connected to Linux through an Android phone

2012-12-11 Thread Robert Hancock

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/pci:00/: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



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Fwd: Safely remove option shows with Micro SD Card connected to Linux through an Android phone

2012-12-11 Thread Alan Stern
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/pci:00/: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.

> 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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Fwd: Safely remove option shows with Micro SD Card connected to Linux through an Android phone

2012-12-11 Thread Alan Stern
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/pci:00/: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.

 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

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Fwd: Safely remove option shows with Micro SD Card connected to Linux through an Android phone

2012-12-11 Thread Robert Hancock

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/pci:00/: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



--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/