Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752255AbdHJJDQ (ORCPT ); Thu, 10 Aug 2017 05:03:16 -0400 Received: from mga11.intel.com ([192.55.52.93]:5316 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750868AbdHJJDP (ORCPT ); Thu, 10 Aug 2017 05:03:15 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,352,1498546800"; d="asc'?scan'208";a="137886539" From: Felipe Balbi To: Variksla Cc: bjorn@mork.no, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, jikos@kernel.org, linux-usb@vger.kernel.org, Pavel Machek , balbi@ti.com, eu@felipetonello.com, k.opasiak@samsung.com Subject: Re: f_hid.c conversion to the new function interface and crash due to race In-Reply-To: References: <87a8399i9b.fsf@linux.intel.com> Date: Thu, 10 Aug 2017 12:02:20 +0300 Message-ID: <87378zaj8j.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2481 Lines: 79 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, (please break your lines at 80 columns) Variksla writes: >> On Aug 9, 2017, at 2:56 AM, Felipe Balbi = wrote: > > Thanks for replying. >>=20 >>=20 >> Hi, >>=20 >> noman pouigt writes: >>> Hello, >>>=20 >>> I am currently using 3.18 linux kernel and getting below >>=20 >> return -EKERNELTOOOLD; >>=20 >> Sorry, you're on your own. You should ask for support from whoever >> forces you to use 3.18 kernel. > > I have updated f_hid.c file to latest kernel though as I knew it would > be too much to ask to get support for old code. it's not really enough. In fact, it's even worse as the two codebases don't really match. > I am just not sure about how to instantiate the function driver as > earlier f_fs was instantiating the hid driver. However, after hid got > converted to new function driver who is responsible for calling setup, > bind and unbind functions in f_hid.c ? > > Below is the glue code in android.c. there's no android.c upstream. > drivers/usb/gadget/android.c > static struct android_usb_function hid_function =3D { > .name =3D "hid", > .init =3D hid_function_init, > .cleanup =3D hid_function_cleanup, > .bind_config =3D hid_function_bind_config, > .attributes =3D hid_function_attributes, > }; > > Is there something similar in new function driver in upstream kernel? you can check for yourself ;-) =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEElLzh7wn96CXwjh2IzL64meEamQYFAlmMIRwACgkQzL64meEa mQbxZA/8CS+6I4SXuk0NFYHgfchZNi6jGS1dCI0U7MBoyz57zwnhvfNKhdX2iG0L iv2nQzRgd3/qJAOfurMUpMBPJLJxbV4M3fvUcUgHOqPgA6MfuqVIEzQ25o8qOrbi Vzpkjj6r+tF8iYocVNq5ftGhSOBgrPbdp4/jaAZg978rxxLaROpttsj9spSQ6j2o waXBu2nn+FVK/6kPSIzjpNoSRJFsvXCwKueUepOnSSfINfE3Q9U1atXeZLLVV86U psLLlI5rm9EPqKsIHMQfLLuM6YKPt59/BUa2H59WySKHcpV+mpeNJa+oszhfm9n0 QjXHElSMmKrIYcQCxBd82P9t0hjBqjA6wdK92GWxq9sCqJa33+BGhDUh9RjJTVDi UZDGBA4camAlOkeIUOXc4bqt1NDOtBrPh+bCpKElZHA2rLtHadBzpf7EX/0pIdIt rHYJwkeEtYTMj5O3TQbjbJSThUj7taXxF1GnqXEPGbdDUZnsH+BrZAU7WMv/pvbC 3a8fKaiC+i0VkTIGcF8ICeHLcdyvIvLv7rCCDIk0b/i/99SpaaBhDP8h1xuUzVD9 tWHVJ1LsgSViRJKtSapuzwB6mDmZi9+LtRhQxDE1jsE0MqZXHUHnSfr0FO/F8cXQ jsm6uGrixLb5QcRMZnehWSfcw/ca7FY9V4dqQ63dEeh1JF3zKp8= =0KzF -----END PGP SIGNATURE----- --=-=-=--