On Sat, 5 Aug 2006, Pete Zaitcev wrote:

> On Sat, 5 Aug 2006 11:14:47 -0400 (EDT), Alan Stern <[EMAIL PROTECTED]> wrote:
> 
> > > 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?
> 
> When iPod receives an eject command, it shuts down and displays the
> "OK to disconnect" graphic.

Really?  I've never heard of that behavior before, but I'll take your word
for it.  It's not surprising, considering all the other weird stuff we've 
heard about iPods doing.

Nobody seems to have paid much attention to the details of the actual
command.  A normal eject command would have LoEj set and Start clear,
which is not true of the command shown in Martin's log. It has LoEj clear
and Start set, which makes it a "Spin-Up" command rather than an "Eject"
command.

> > 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.
> 
> Bull!
> 
> > With the iPod, there is nothing to eject.  Even worse, when the iPod 
> > receives a SCSI eject command, it usually crashes!
> 
> Well, yeah, this is what -71 is. However, when exactly the same
> eject binary is used with ub, everything works fine. Funny, isn't it?

Somehow the ioctl is not being handled the same.  The CDROMEJECT ioctl 
does the right thing, and other approximations like SCSI_IOCTL_STOP_UNIT 
are wrong.  However I can't tell exactly how the control flow works; the 
ioctl handling in sd.c is a mess.

> > > I collected some date and hopefully it will be useful to nail down the
> > > problem.
> > 
> > The problem is the iPod.
> 
> No, the problem is in our SCSI stack.

Or in the "eject" program.  The earlier bug reports showed lots of backing 
and forthing on changes there.

But honestly -- how could anyone expect the SCSI hard-disk driver to 
support an ioctl named CDROMEJECT?

> > > [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's completely all right to supply a partition to eject(1).
> The eject(1) finds the full device, and unmounts everything
> mounted on it.

I stand corrected.

> I think you're too hasty here.
> 
> Alan, look at this:
> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=193296
> 
> There was also an earlier bug, which has a lot of context about
> the way eject actually works. Martin's use of -s is a smart way
> to do it. Notice that for the majority of users in that bug, there
> is no -71. It only started happening recently.
> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=154955

Not doubt the -71 is provoked by sending a "Spin-Up" command instead of an 
"Eject" command.


On Sat, 5 Aug 2006, Martin (KaFai), Lau wrote:

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

That is what I meant, but Pete pointed out I was wrong.

> 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?
 
This comes closer to the truth.  The "eject" command actually does do
something to the iPod -- but all it does is make the "do not disconnect"  
message go away (if it is works correctly).

In any case, it really is safe to unplug the iPod whenever it isn't
mounted.

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