Thanks for your reply.

My ipod is showing the "do not disconnect" message on its screen at the mintue 
I plugged it in.  It shows up before mounting it and I never mounted it during 
the test I posted before.

If I run the "eject" command after connecting < 1 minute, the eject command 
succeeds and the "do not disconnect" message disappears.  Then something must 
be done right in this "eject" command at that moment so that it makes the "do 
not disconnect" message disappears from my ipod.  If it fails, I have to remove 
the uhci_hcd and ehci_hcd module to make this "do not disconnect" message goes 
away.

When I google about linux ipod, almost every pages told people to use the 
"eject" command to make the "do not disconnect" message goes away from ipod 
before unplugging it.

You mean "eject" is the wrong command to use and something else should be used?

or

Do you mean the "eject" command does nothing to ipod and the "do not 
disconnect" message on the ipod screeen message is bogus? I can unplug my ipod 
safely and immediately after umount?

or

It is some properitary usb commands that only Window and Mac know how to issue 
it? In window, I can still connect my ipod as mass storeage and press the 
"safely remove" command to make this message disappear from my ipod.

Many thanks

--Martin

----- Original Message ----
From: Alan Stern <[EMAIL PROTECTED]>
To: "Martin (KaFai), Lau" <[EMAIL PROTECTED]>
Cc: linux-usb-devel@lists.sourceforge.net
Sent: Saturday, August 5, 2006 8:14:47 AM
Subject: Re: [linux-usb-devel] cannot eject ipod. more data with usb-storage 
debug msg

On Fri, 4 Aug 2006, Martin (KaFai), Lau wrote:

> Hi.
> 
> I think a few people have posted the same problem before but I cannot
> find any answer on this...I am still having problem with ejecting ipod
> after a few verions of kernel 2.6 and keep getting "reset high speed USB
> device using ehci_hcd"

You must be using the wrong word.  "Eject" means "remove something from 
something else".  For example, you can eject a floppy disk from its drive, 
or you can eject a memory card from a card reader.  But what can you eject 
from an iPod?

Do you mean that the "eject" command gets errors when you run it for the 
iPod?  The real problem is that you shouldn't be using the "eject" command 
at all.

"eject" does two things: It does an unmount and it tries to do a real 
eject.  For example, if you have a cdrom filesystem mounted and you run 
"eject" on it, the filesystem will be unmounted and the cd disc will be 
ejected.

With the iPod, there is nothing to eject.  Even worse, when the iPod 
receives a SCSI eject command, it usually crashes!

> I collected some date and hopefully it will be useful to nail down the
> problem.

The problem is the iPod.

> 1. I have recently tried gentoo-2.6.16-gentoo-r9, gentoo-2.6.17-r4.  It
> still fails on my Pentium M laptop, my AMD+VIA chipset desktop in home
> and my Intel+Intel chipset desktop in office.
> 
> 2. I cannot eject it even without mounting it.

What are you trying to eject from the iPod?

> 3. It does not always happen.  It only happens when it is plugged in for a 
> few minutes (I can reproduce it consisently after plugging in for ~3 
> minutes).  
>    If I plug my IPod in and eject it almost immediately (let say <1 minute), 
> I can eject it every single time.

No you can't.  You can't eject it because it doesn't have anything _to_ 
eject.  All you can do is run the "eject" command -- but nothing will 
actually be removed from the iPod.

> 4. It still happens even after removing the ehci_hcd module (i.e only
> uhci_hcd remains). The only difference is the message is changed from
> "reset high speed...using ehci_hcd" to "reset high speed...using
> uchi_hcd)

That last message should be "reset full speed...using uhci_hcd".

> 5. I have turned on the usb-storage debug log in the kernel. The followings 
> are the message immediately after ejct command:
> 
> # I eject as root.
> [EMAIL PROTECTED] ~ # date; eject -v -s /dev/sda2

You've got a big error right there.  /dev/sda2 refers to a single
partition on the iPod, not the entire device itself.  It makes even less
sense to eject something from a partition than it does to eject something
from an iPod.

> Fri Aug  4 20:59:38 PDT 2006
> eject: device name is `/dev/sda2'
> eject: expanded name is `/dev/sda2'
> eject: `/dev/sda2' is not mounted
> eject: `/dev/sda2' is not a mount point
> eject: `/dev/sda2' is a multipartition device
> eject: trying to eject `/dev/sda2' using SCSI commands
> eject: SCSI eject failed
> eject: unable to eject, last error: No such device
> 
> #A capture of /var/log/messages:

> Aug  4 20:59:38 kafai-lap usb-storage: Command ALLOW_MEDIUM_REMOVAL (6 bytes)
> Aug  4 20:59:38 kafai-lap usb-storage:  1e 00 00 00 00 00

This command tells the iPod to allow its medium to be removed.  It doesn't
make sense because the iPod doesn't have any medium that can be removed, 
but the iPod accepts the command anyway.

> Aug  4 20:59:38 kafai-lap usb-storage: Command START_STOP (6 bytes)
> Aug  4 20:59:38 kafai-lap usb-storage:  1b 00 00 00 01 00

This command tells the iPod to eject its medium.  It causes the iPod to 
crash.

> Aug  4 20:59:40 kafai-lap usb-storage: -- command was aborted
> Aug  4 20:59:41 kafai-lap usb 4-3: reset high speed USB device using ehci_hcd 
> and address 7
> Aug  4 20:59:41 kafai-lap usb-storage: usb_reset_device returns 0
> Aug  4 20:59:41 kafai-lap usb-storage: scsi command aborted

The iPod never replies, so the command is aborted and Linux tries to reset
the iPod.  The reset succeeds, but the iPod still doesn't reply to any
more commands.

> Aug  4 21:00:18 kafai-lap sd 5:0:0:0: scsi: Device offlined - not ready after 
> error recovery
> Aug  4 21:00:18 kafai-lap sd 5:0:0:0: rejecting I/O to offline device

Eventually Linux has no choice but to give up entirely and take the iPod 
offline.

> I can help to do and try things out to solve this problem....I really
> need to access my ipod from my primary OS....

You can still access the iPod.  Just don't use the "eject" command.
When you want to unmount it, use "umount" instead.

Alan Stern





-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to