Re: [PATCH 1/2] hid2hci: iterate libusb devices twice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Kay:

Kay Sievers wrote:
> On Mon, Jul 27, 2009 at 23:32, Marcel Holtmann<marcel@xxxxxxxxxxxx> wrote:
>   
>
> Now it's getting funny. We need to call the nonsense two times to make
> it work? We need to fix the real issue here instead of doing guesswork
> and adding hacks like this. Any idea what's going on with the first
> scan? The device node is guaranteed to exist when we call stuff from
> RUN+= instructions.
>
>   
Are you absolutely positive that the device node will exist and be
usable by the time something is called from RUN?  I've been
enabling/adding debugging code around libusb, and finally got down to
the point that when it tries to do an open( ) on the device node, here's
what's happening:

    Jul 29 11:03:25 test-laptop udevd-work[20561]: '/lib/udev/hid2hci'
    (stderr) 'USB error: failed to open /dev/bus/usb/003/061: No such
    file or directory'


This of course causes failures later because of a bad file descriptor:

    Jul 29 11:03:25 test-laptop udevd-work[20561]: '/lib/udev/hid2hci'
    (stderr) 'USB error: could not detach kernel driver from interface
    0: Bad file descriptor'
    Jul 29 11:03:25 test-laptop udevd-work[20561]: '/lib/udev/hid2hci'
    (stderr) 'USB error: could not claim interface 0: Bad file descriptor'


-- 
Mario Limonciello
*Dell | Linux Engineering*
mario_limonciello@xxxxxxxx

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux