From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mario Limonciello Date: Wed, 29 Jul 2009 16:30:47 +0000 Subject: Re: [PATCH 1/2] hid2hci: iterate libusb devices twice Message-Id: <4A707937.3090905@dell.com> MIME-Version: 1 Content-Type: multipart/mixed; boundary="------------enigB38C13CAEAD0A7FF83D49FCD" List-Id: References: <4A6E19FD.7040908@dell.com> In-Reply-To: <4A6E19FD.7040908@dell.com> To: linux-hotplug@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigB38C13CAEAD0A7FF83D49FCD Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Kay: Kay Sievers wrote: > On Mon, Jul 27, 2009 at 23:32, Marcel Holtmann wro= te: > =20 > > 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+=3D instructions. > > =20 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= ' --=20 Mario Limonciello *Dell | Linux Engineering* mario_limonciello@dell.com --------------enigB38C13CAEAD0A7FF83D49FCD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkpweTgACgkQ2CrZjkA73Yuf+gCfVSjlv5ZprfR2FVgBbjQHijVP HDUAniiBdVByfOuOZv8i9YLF0d496Pt8 =nhPz -----END PGP SIGNATURE----- --------------enigB38C13CAEAD0A7FF83D49FCD--