From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EFDF0C169C4 for ; Mon, 11 Feb 2019 13:41:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BD4A721B68 for ; Mon, 11 Feb 2019 13:41:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549892465; bh=JJVnoprIiy9eZDD1nzOwag7sPxsJSdFlV6CLF7g6zIw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=DRl59177P5f0bF9ffGQm0rgvRIpoFQhNBiiFK16aM8MvY65/iORAjg29Xrxb9W9Zr Ja7cmfE6sh77xFmU/O8UxomNBLGCAOIoAwMZUk1qMoFXDc30TMbax83eTS4vHITBlO +F9/RNGBwmEdrzyqWYfotf8vj0xhuiSPvLhUwbWE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727383AbfBKNlF (ORCPT ); Mon, 11 Feb 2019 08:41:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:39814 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727106AbfBKNlF (ORCPT ); Mon, 11 Feb 2019 08:41:05 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B658721B24; Mon, 11 Feb 2019 13:41:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549892464; bh=JJVnoprIiy9eZDD1nzOwag7sPxsJSdFlV6CLF7g6zIw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=khg5PPIilsici660iUTa9KAIchyr4w799Y4X+qMipyuDQKWrWl3sCuu9Hrd479KQi ZKuXFxHMh1WoPMR9mmHRDbQPncnVpclF3yXweCNAX+PBXSxnvFrQgW2PBfF/p6xsvi 2vJY5DHN+aD2LPUlw98h4iyLjZjO3e1qOqNJraIA= Date: Mon, 11 Feb 2019 14:41:01 +0100 From: Greg KH To: Evan Green Cc: "He, Bo" , Felipe Balbi , "stable@vger.kernel.org" , Alan Stern , Sam Protsenko , Doug Anderson , Stephen Boyd , Matthias Kaehlcke Subject: Re: Backporting dwc3 gadget fixes Message-ID: <20190211134101.GE17709@kroah.com> References: <8736pjkhp6.fsf@linux.intel.com> <20190129102210.GA12232@kroah.com> <20190204091156.GD2015@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Mon, Feb 04, 2019 at 01:13:53PM -0800, Evan Green wrote: > On Mon, Feb 4, 2019 at 1:12 AM Greg KH wrote: > > > > On Tue, Jan 29, 2019 at 11:15:50AM -0800, Evan Green wrote: > > > On Tue, Jan 29, 2019 at 2:22 AM Greg KH wrote: > > > > > > > > On Wed, Jan 23, 2019 at 10:46:52AM -0800, Evan Green wrote: > > > > > Hi Felipe, > > > > > Well, I've only tried on the one device that has a dwc3 controller. > > > > > Given that the bug was "scheduling while atomic", the stack trace > > > > > always had dwc3_gadget_ep_dequeue doing the sleeping, and it only > > > > > happened when I had a gadget plugged in, I felt pretty solid that this > > > > > was the same bug. > > > > > > > > > > Also, Matthias pointed out I was looking at an older series when I was > > > > > figuring out which patches went together. Check my work, but the > > > > > series seems to be here: > > > > > https://patchwork.kernel.org/project/linux-usb/list/?series=42875 > > > > > > > > > > The first 3 patches are already backported. Then there were a couple > > > > > extra I had missed before. So the complete set would look like: > > > > > > > > > > d53701067f04 usb: dwc3: gadget: check if dep->frame_number is still valid > > > > > 3451f6affaef usb: dwc3: gadget: remove unnecessary dev_info() > > > > > 1517265228b4 usb: dwc3: trace: log ep commands in hex > > > > > 25abad6a0584 usb: dwc3: gadget: return errors from __dwc3_gadget_start_isoc() > > > > > fec9095bdef4e usb: dwc3: gadget: remove wait_end_transfer > > > > > d4f1afe5e896c usb: dwc3: gadget: move requests to cancelled_list > > > > > d5443bbf5fc8f usb: dwc3: gadget: introduce cancelled_list > > > > > 7746a8dfb3f9c usb: dwc3: gadget: extract dwc3_gadget_ep_skip_trbs() > > > > > c3acd59014148 usb: dwc3: gadget: use num_trbs when skipping TRBs on ->dequeue() > > > > > 09fe1f8d7e2f4 usb: dwc3: gadget: track number of TRBs per request > > > > > 1a22ec6435806 usb: dwc3: gadget: combine unaligned and zero flags > > > > > > > > > > Though perhaps only the stuff up through "move requests to > > > > > cancelled_list" is the important stuff... Felipe might be able to say > > > > > better. > > > > > > > > Can someone send me a correct list of exactly what patches to commit, to > > > > what kernel tree(s), and in what order? Ideally you would have also > > > > tested them yourself... > > > > > > > > As it is, this "random list of commits" doesn't make me feel good about > > > > backporting. > > > > > > Ok here's my recommendation, in short form: cherry-pick > > > 1dbcd8d42c02..fec9095bdef4 to 4.19. > > > > > > Long form rationale below: > > > The series these fixes came from is this: > > > https://patchwork.kernel.org/project/linux-usb/list/?series=42875 > > > > > > The first three are already in stable. I recommend picking the below > > > commits, which I've listed in git log order, so the apply order would > > > be bottom-up: > > > fec9095bdef4e usb: dwc3: gadget: remove wait_end_transfer > > > d4f1afe5e896c usb: dwc3: gadget: move requests to cancelled_list > > > d5443bbf5fc8f usb: dwc3: gadget: introduce cancelled_list > > > 7746a8dfb3f9c usb: dwc3: gadget: extract dwc3_gadget_ep_skip_trbs() > > > c3acd59014148 usb: dwc3: gadget: use num_trbs when skipping TRBs on ->dequeue() > > > 09fe1f8d7e2f4 usb: dwc3: gadget: track number of TRBs per request > > > 1a22ec6435806 usb: dwc3: gadget: combine unaligned and zero flags > > > > This first patch here, breaks the build on 4.20 and 4.19 :( > > > > So I don't know how you tested this. > > > > Can you provide me a full patch series, properly backported, that > > applies to 4.20.y and 4.19.y, so that I can get this in a tested format > > that can be applied properly? > > Darn it. This worked 6 days ago. This commit came in and wrecked me: > > commit 25ad17d692ad54c3c33b2a31e5ce2a82e38de14e > Author: Jack Pham > AuthorDate: Thu Jan 10 12:39:55 2019 -0800 > Commit: Greg Kroah-Hartman > CommitDate: Thu Jan 31 08:14:42 2019 +0100 > > usb: dwc3: gadget: Clear req->needs_extra_trb flag on cleanup > > commit bd6742249b9ca918565e4e3abaa06665e587f4b5 upstream. > > So then the directions for 4.19 would be: > 1) revert 25ad17d692ad > 2) cherry-pick d92021f66063..fec9095bdef4 > 3) cherry-pick bd6742249b9c (which was the reverted commit, that now > applies without modification from upstream). > > For 4.20, this would be revert 5eaf9833f5be, then cherry-pick same as > above. I've got trees where I've done this below: > > https://chromium.googlesource.com/chromiumos/third_party/kernel/+log/refs/sandbox/evgreen/stable-4.19.y-dwc3-gadget > https://chromium.googlesource.com/chromiumos/third_party/kernel/+log/refs/sandbox/evgreen/stable-4.20.y-dwc3-gadget > > The testing I've done on these trees is to do make allmodconfig and > ensure that they build cleanly. I was also able to test merging the > 4.19 one into the ChromeOS tree and reboot while a gadget was > connected (which fixes the problem I was seeing before). > > If you'd prefer I email out patches that do the same, I'm happy to do that too. Please just email out the patches, that way I know they have been tested properly for the specific tree. thanks, greg k-h