From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mario Limonciello Date: Tue, 28 Jul 2009 18:12:42 +0000 Subject: Re: [PATCH 1/2] hid2hci: iterate libusb devices twice Message-Id: <4A6F3F9A.5040405@dell.com> MIME-Version: 1 Content-Type: multipart/mixed; boundary="------------enig8546896B62827F8B99D028DF" 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) --------------enig8546896B62827F8B99D028DF 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 I'm not sure what's going on here, but I think i'll just go down that road of pulling the necessary code out of libusb's find_devices to just craft a usb_device object with the information we already have so there is no necessary scanning in the first place. There will still be a dependency on libusb to be able to send a usb_control_msg, claim, etc, but at least the time consuming, unnecessary scan will be gone. > > Well, libusb might be ok for stuff that just searches things which are > always there, it's definitely not suitable to be used in conjunction > with udev. The entire coldplug with 500 devices takes ~0.5 seconds > here, while a single call to libusb takes ~0.15 just to find the > device we already have. That alone is not acceptable, and now we > should call the useless scan twice? Tsss ... :) > =20 Yeah I understand. I'll follow up after I get something else together. --=20 Mario Limonciello *Dell | Linux Engineering* mario_limonciello@dell.com --------------enig8546896B62827F8B99D028DF 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 iEYEARECAAYFAkpvP5oACgkQ2CrZjkA73YsLzQCfdWSTYNOLetjnG2UGUzTNYPDJ d+4Anju+MonIrxcOg+eeSC2NFyJNf5Yj =FUBb -----END PGP SIGNATURE----- --------------enig8546896B62827F8B99D028DF--