-------- Original Message --------
Subject:        Re: Problem: hiddev stops sending events after some error
recoveries
Date:   Thu, 31 Jan 2008 14:55:16 -0200
From:   Salvador Eduardo Tropea <[EMAIL PROTECTED]>
To:     Alan Stern <[EMAIL PROTECTED]>
References:
<[EMAIL PROTECTED]>



On 31/01/08 14:50, Alan Stern wrote:
> On Thu, 31 Jan 2008, Salvador Eduardo Tropea wrote:
>
>   
>> On 30/01/08 14:05, Alan Stern wrote:
>>     
>>> It's a bug for Set-Interface to fail.
>>>       
>> Yes and not.
>>
>>     
>>>  Following a reset, the device has no reason to fail such a request.
>>>   
>>>       
>> The device doesn't, but you can lose a packet (i.e. CRC error).
>>     
>
> That's why the reset code includes several retries.
>   

I see only one logged in syslog.

Jan 29 11:51:51 kotori kernel: usb 3-2: reset low speed USB device using
uhci_hcd and address 105
Jan 29 11:51:52 kotori kernel: usb 3-2: failed to restore interface 0
altsetting 0 (error=-71)
Jan 29 11:51:52 kotori kernel: usb 3-2: USB disconnect, address 105
Jan 29 11:51:52 kotori kernel: usb 3-2: new low speed USB device using
uhci_hcd and address 106
Jan 29 11:51:52 kotori kernel: usb 3-2: configuration #1 chosen from 1
choice


>> In this
>> case the kernel should properly recover. In this case the kernel is
>> recovering, but the hiddev becomes useless because the device changed
>> its address. I think the kernel should make this device invalid and
>> inform a read error as soon as the user space tries to read from it. I
>> think the application gets notified only if reading in blocking mode.
>>     
>
>   
>> It currently informs an error if the device is unplugged. IMHO that's
>> the right thing to do, the user space application can then close the
>> file handle and try to open it again, if it fails the application can
>> then try to interact with the user asking to replug the device.
>>     
>
> When a reset fails, the kernel should do exactly the same thing as if 
> the device was unplugged.  Are you saying that it doesn't?
>   

Nope. My user space program continues reading from the hiddev device, of
course it never gets events ;-)
Important: I'm polling using a NONBLOCKing file handler.

Regards, SET

-- 
_______________________________________________________________
Ing. Salvador Eduardo Tropea          http://utic.inti.gov.ar/
INTI-Electrónica e Informática        Tel: (+54 11) 4724 6315
Colectora de Av. General Paz 5445     San Martín - B1650KNA
Casilla de Correo 157                 FAX: (+54 11) 4754 5194
Buenos Aires * Argentina              http://www.inti.gov.ar/




-
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to