From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033633AbdAELVl (ORCPT ); Thu, 5 Jan 2017 06:21:41 -0500 Received: from mga07.intel.com ([134.134.136.100]:29671 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752178AbdAELVc (ORCPT ); Thu, 5 Jan 2017 06:21:32 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,321,1477983600"; d="asc'?scan'208";a="26487694" From: Felipe Balbi To: Baolin Wang Cc: Janusz Dziedzic , Greg KH , USB , LKML , Linaro Kernel Mailman List , Mark Brown Subject: Re: [PATCH] usb: dwc3: gadget: Avoid race between dwc3 interrupt handler and irq thread handler In-Reply-To: References: <0d79eb1f34e409749a136173b68f365b545c4789.1482738764.git.baolin.wang@linaro.org> <87wpel1vac.fsf@linux.intel.com> <8737h0z5kc.fsf@linux.intel.com> <878tqpx3fz.fsf@linux.intel.com> Date: Thu, 05 Jan 2017 13:19:39 +0200 Message-ID: <8760ltwy7o.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-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, Baolin Wang writes: [...] >>>> and you have triggered this with mailine? How? We don't write to GEVNT* >>>> registers from PM code and we only allow runtime_suspend with cable >>>> dettached. >>> >>> Sorry for late reply since I am busy on other things. I just agreed >>> with the possible races pointed by Janusz. I need to look at if these >>> are happened on my platform and also I found some out of tree code >>> which will clean the GEVNTCOUNT register when stop the gadget. I will >>> check the mainline kernel and resend new patch if I make this problem >>> clearly. Anyway thanks for your help and suggestion. >> >> IOW, you sent me a patch to be integrated in the tree which everybody in >> the whole world uses and you didn't even test anything in that very >> tree? How am I supposed to trust you're sending me tested patches from >> now on? >> >> Clearly you have no empathy for those working countless hours to keep >> this stable and working. If you're ready to send me a completely >> untested patch and claim that it's fixing a race condition you have >> never seen for yourself, it becomes difficult to trust any patches >> you're sending me. > > I am sure I send you every patch was tested on my vendor platform and > I saw the problem on my platform. But like my said I missed something > that we have masked all interrupts in the dwc3 interrupt handler, so > the real reason maybe caused by some out of tree code on my vendor > platform which will clean the GEVNTCOUNT register when stop the > gadget. Moreover I did not only do this one thing, and some other and this is the very problem I'm referring to. If you have changes on DWC3 on your "vendor tree" you're testing *mainline* DWC3. Which kernel is your tree even based on?=20 > problem I also need time to test and investigate. So I think I need > some time to make things clear, then I can send you one better patch > with the correct explanation, am I wrong here? you're wrong to assume your vendor tree *with changes on DWC3 driver* is equivalent to testing *mainline*. That just doesn't add up. If you were adding just platform init code (something under your mach-* directory, some DTS, etc) that's fine. But you have changes on the USB peripheral controller driver. This makes me rather uneasy about your patches. I mean, if you have changes to DWC3, what other changes do you have there? Also, if your changes are in PM code, which we have support in upstream, this suggests that you're using older kernel from the time when we didn't have PM support upstream. This means you're using something pre-v4.8. Which kernel are you using? cheers =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEElLzh7wn96CXwjh2IzL64meEamQYFAlhuK8sACgkQzL64meEa mQYX4g//QUsZUzFGjtFcKuSK/LIsSHz2dgCL3O1Iwf7t58BFZVCE66mOHD81Yo2e 0MSWDiImRqzyCNs9fcT9GxCn5cUr1eXmg+eoR/RDWKz7E2FNqrVHP+H8hv+kNWW9 yV1r7H8JrJOnJ7lOQjZdsBKtmFooXCXvMvVNsGXDQ/bX4XnjKXC2PZy5cuEnfLzd RzzDapmx0zTZjPeeHMol8IBHQ5EGEa2FY8oZjbE3KPKwpHQzuETfdK3hpg+yiWTa FE5y7hKKg4kNCLY2bZYvXmubM6J0Ah1XkdLFYMmw9sfur3U+01tLG/WlF6wtzbZW osGMcndLnC8Bb6IG7kSOQG/+tI0pYAKu4UcKGSSNHug5aknKOOLHLbVyapnw03X6 szKaa3InE1+Xqw0mkciHFth2m77wShyfbsYqsbjV3KgHjw/TtqZ/+JY+oN/7Ssd8 ptCm7JUYWhRThm1ePlGIOwRxFlbCBrXJMS8/qih9QB5UIVb6snKPRQwUN0JWJmpo UDdPl3KKlFoSryKRGWcITXpKmIREEHpF8ZHIP2e/nC6ylzZDTkIUPDwbjCQwRJ3m eIxDypOvLwZhS9KjilF+sa8Zn/yh0AVUrExztrrEKMqFWlOuFBmYLXuXV8TfaR5M f/sjGi2mPCwXFnAaGq50r2ZsNYiDkgjtiWjgTvyL7BKGO5JrqYs= =ZNeB -----END PGP SIGNATURE----- --=-=-=--