From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757462AbbBEMjF (ORCPT ); Thu, 5 Feb 2015 07:39:05 -0500 Received: from mail-wg0-f42.google.com ([74.125.82.42]:61331 "EHLO mail-wg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752314AbbBEMjD (ORCPT ); Thu, 5 Feb 2015 07:39:03 -0500 From: Pali =?utf-8?q?Roh=C3=A1r?= To: balbi@ti.com Subject: Re: [PATCH 1/3] usb: gadget: function: phonet: balance usb_ep_disable calls Date: Thu, 5 Feb 2015 13:38:58 +0100 User-Agent: KMail/1.13.7 (Linux/3.13.0-45-generic; KDE/4.14.2; x86_64; ; ) Cc: Linux USB Mailing List , Pavel Machek , Aaro Koskinen , Sebastian Reichel , linux-kernel@vger.kernel.org References: <1422918921-5472-1-git-send-email-balbi@ti.com> <20150203193525.GC6508@saruman.tx.rr.com> <201502032057.11166@pali> In-Reply-To: <201502032057.11166@pali> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart35583747.darLTfAarQ"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201502051338.59040@pali> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --nextPart35583747.darLTfAarQ Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Tuesday 03 February 2015 20:57:11 Pali Roh=C3=A1r wrote: > On Tuesday 03 February 2015 20:35:25 Felipe Balbi wrote: > > On Tue, Feb 03, 2015 at 08:27:52PM +0100, Pali Roh=C3=A1r wrote: > > > On Tuesday 03 February 2015 20:18:59 Felipe Balbi wrote: > > > > On Tue, Feb 03, 2015 at 05:17:28PM +0100, Pali Roh=C3=A1r=20 wrote: > > > > > On Tuesday 03 February 2015 16:43:45 Felipe Balbi=20 wrote: > > > > > > Hi, > > > > > >=20 > > > > > > On Tue, Feb 03, 2015 at 04:31:51PM +0100, Pali Roh=C3=A1r >=20 > wrote: > > > > > > > On Tuesday 03 February 2015 00:15:19 Felipe Balbi >=20 > wrote: > > > > > > > > f_phonet's ->set_alt() method will call > > > > > > > > usb_ep_disable() potentially on an endpoint > > > > > > > > which is already disabled. That's something the > > > > > > > > gadget/function driver must guarantee that it's > > > > > > > > always balanced. > > > > > > > >=20 > > > > > > > > In order to balance the calls, just make sure > > > > > > > > the endpoint was enabled before by means of > > > > > > > > checking the validity of driver_data. > > > > > > > >=20 > > > > > > > > Reported-by: Pali Roh=C3=A1r > > > > > > > > Signed-off-by: Felipe Balbi > > > > > > > > --- > > > > > > >=20 > > > > > > > Your patches cause that kernel does not print any > > > > > > > error message to n900 screen anymore and reboot > > > > > > > device in 10 seconds. I did not loaded any > > > > > > > external modules. > > > > > >=20 > > > > > > > In qemu I see this crash in early boot: > > > > > > alright, so n900's working fine. I'll wait until you > > > > > > debug qemu a little more, thank you > > > > >=20 > > > > > NO! It does not working, see ^^^^. It break n900 > > > > > totally! > > > >=20 > > > > settle down a bit more. I don't have the HW you have and > > > > things are working fine on boards I _do_ have, there's > > > > not much more I can do to help without you doing your > > > > homework. Debug a bit more and bring more information > > > > as to what's going on, until then you're on your own. > > >=20 > > > And what more do you need? It crash on my n900 and also in > > > qemu. I sent you kernel crash dump from qemu which > > > introduced *your* patches. Before applying your patches > > > there was no crash in early boot stage. > > >=20 > > > In current state I review all 3 patches as: > > >=20 > > > Rejected-by: Pali Roh=C3=A1r > > > [It breaks booting Nokia N900 device] > >=20 > > next step, figure why it's broken. Working just fine here on > > AM335x which has the same musb IP. >=20 > Why is broken? That is easy. You send 3 patches which broke > it. Actually when I reverted only that patch which adds line: pm_runtime_irq_safe(musb->controller) then early boot crash disappeared. But other two patches did not fixed support for external .ko=20 gadget modules. State is same -- crash after modprobe. =2D-=20 Pali Roh=C3=A1r pali.rohar@gmail.com --nextPart35583747.darLTfAarQ Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEABECAAYFAlTTZGMACgkQi/DJPQPkQ1KJ/gCeOI+W/NPrljzPv2fCqpM2/vCi edMAn2XmzC04o5Tvsgao/feaTLMBGOa3 =8pu2 -----END PGP SIGNATURE----- --nextPart35583747.darLTfAarQ--