Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Question about an error message from enum-device/enum-usb after disconnecting the iPod : (6 Items)
   
Question about an error message from enum-device/enum-usb after disconnecting the iPod  
Hi,

May I ask a question about an error message from enum-device or enum-usb after I disconnects the iPod. Please see below 
for the message.

ustatus=0x2000004 ulen=0
ustatus=0x2000004 ulen=0
ustatus=0x2000004 ulen=0
ustatus=0x2000004 ulen=0
ustatus=0x2000004 ulen=0
ustatus=0x2000004 ulen=0
ustatus=0x2000004 ulen=0
ustatus=0x2000004 ulen=0
ustatus=0x2000004 ulen=0
ustatus=0x2000004 ulen=0
ustatus=0x2000004 ulen=0
ustatus=0x2000004 ulen=0
ustatus=0x2000004 ulen=0
RECV: EIO, errno=19
UMOUNT: 
Unable to find removal id '512'
Unable to find removal id '513'

This message is always printed out on the console after the iPod is disconnected(the number of lines of ustatus=
0x2000004 ulen=0 will become more or less sometimes).
Just wonder why has such message, and I couldn't figure out where this message comes from so assume it is from enum-
device/enum-usb because I use it to enumerate the iPod drivers. 
Furthermore, in the message, it seems EIO error actually doesn't match errno=19 which is ENODEV  /* No such device  */ 
from errno.h, and really curious about the meanings of removal id '512' and '513',  and maybe also the meaning of 
ustatus=0x2000004 ulen=0 as well, thanks.

Regards,
Chris
Re: Question about an error message from enum-device/enum-usb after disconnecting the iPod  
> ustatus=0x2000004 ulen=0
> ustatus=0x2000004 ulen=0

These are the iPod driver attempting to receive packets. It takes some amount of milliseconds before the USB stack 
notifies the iPod driver that the device is removed (it uses a callback mechanism, the iPod driver doesn't try to 
interpret the exact meaning of the errors). If the callback comes a bit later, you see more of these logs. You can 
safely ignore them. If you want to see what the status means, look into "sys/usbdi.h", you can see USDB_STATUS_* defines
, some for high bits and some for lower bits.

> RECV: EIO, errno=19
> UMOUNT: 

Then you see these logs because the iPod driver finally realizes that the iPod is gone. These are again logs from the 
iPod driver.

> Unable to find removal id '512'
> Unable to find removal id '513'

These last set of logs are are from the enumerator. It tries to slay some processes which it spawned, but those 
processes are already gone. For example, io-audio self terminates so it should always print at least one of those 
messages. I didn't expect the iPod driver to terminate itself though, could you be launching anything else when an iPod 
is inserted? One thing you can try is to start the enumerator on the command line with verbosity, it should print what 
the remove id are (i.e. it will show what it launches and the associated ID):

slay enum-devices enum-usb
enum-device -vvvvv &



Regards,
Gilles
Re: Question about an error message from enum-device/enum-usb after disconnecting the iPod  
Much thanks for the info.

BTW, after enabling verbose mode to 5 for both enum-devices and enum-usb, it seems it still doesn't give out any info 
related to removal_id= 512 and removal_id=513.
 
And the logs after the iPod is removed become as follows:
Enumerator data: 'g28692 removal_id=512 '
Unable to find removal id '512'
Enumerator data: 'g28692 removal_id=513 '
Unable to find removal id '513'
Enumerator data: 'g28692 removal_id=514 '

In my application, I think enum-usb just enumerates two instances after the iPod is inserted, one is the io-fs-media 
driver for iPod and the other is the io-audio by observing the logs from pidin, it doesn't look like something else is 
launched as shown in pidin logs below.
(Only part of pidin logs after the iPod inserted is attached for simplicity)
   pidin
     pid tid name               prio STATE       Blocked                     
   24595   1 bin/enum-devices    10r REPLY       4                           
   28692   1 bin/enum-usb        10r SIGWAITINFO                             
   28692   2 bin/enum-usb        10r REPLY       9                           
   28693   1 r/sbin/io-fs-media  10r RECEIVE     1                           
   28693   2 r/sbin/io-fs-media  12r REPLY       9                           
   28694   1 proc/boot/io-audio  10r SIGWAITINFO                             
   28694   2 proc/boot/io-audio  49r REPLY       9                           
   28694   3 proc/boot/io-audio  12r RECEIVE     1                           
   28694   4 proc/boot/io-audio  12r RECEIVE     1                           
   28694   5 proc/boot/io-audio  10r RECEIVE     1                           
   28695   1 proc/boot/pidin     10r REPLY       1  

So I thought removal_id=514 could relate to io-audio which has been successfully terminated by enum-usb, one of the 
removal_id=512 and removal_id=513 could belong to io-fs-media which could not be terminated automatically, but the other
 still no idea why.

Regards,
Chris
Re: Question about an error message from enum-device/enum-usb after disconnecting the iPod  
I'll try to follow up internally and get more information about this. I'm not sure what the extra removal ID's are for. 
I assume this isn't causing a problem, you just want a better understanding of what is going on? It does seem strange.

Regards,
Gilles
Re: Question about an error message from enum-device/enum-usb after disconnecting the iPod  
> So I thought removal_id=514 could relate to io-audio which has been 
> successfully terminated by enum-usb, one of the removal_id=512 and removal_id=
> 513 could belong to io-fs-media which could not be terminated automatically, 
> but the other still no idea why.

Hi Chris,

I've got more info.  Basically enum-usb doesn't know what enum-devices does with the information it provides. The iPod 
has multiple interfaces and enum-usb just reports all of them, on insertion and removal. The iPod has two audio 
interfaces present and one HID interface, but only one instance of io-audio is launched by enum-devices, so on removal 
when enum-usb reports three interfaces have been removed, enum-devices prints that message because it didn't have 
anything associated with one of the interfaces.

Does this answer your question?

Regards,
Gilles
Re: Question about an error message from enum-device/enum-usb after disconnecting the iPod  
Hi Gilles,

Yes, exactly. It really makes sense that all removal IDs reported by enum-usb are about the connected iPod interfaces, 
thank you very much.

Regards,
Chris