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=-8.6 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_PASS,USER_IN_DEF_DKIM_WL 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 70134C282C0 for ; Wed, 23 Jan 2019 18:47:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4422A21855 for ; Wed, 23 Jan 2019 18:47:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="BCMlArCc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725999AbfAWSrc (ORCPT ); Wed, 23 Jan 2019 13:47:32 -0500 Received: from mail-lj1-f175.google.com ([209.85.208.175]:46258 "EHLO mail-lj1-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726038AbfAWSrc (ORCPT ); Wed, 23 Jan 2019 13:47:32 -0500 Received: by mail-lj1-f175.google.com with SMTP id v15-v6so2865250ljh.13 for ; Wed, 23 Jan 2019 10:47:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WzT19ZTMHgxDdhZP127Y6+eybbWRZYyOUfnBus3/qU0=; b=BCMlArCcbyEUjuENg8MfWlI+U60XQTGO4VAYJFNAnyn5O8B5vmY8aWgFjMjhrzTdy9 nVRc33TNYtj/Y+HhHTNM2Os34velkgKwcLB3FwBugZ2bCXk8RbgArzDc1JOmPksb4t3t obBwqBIgTDei4pQxzQ0MIwBCRNIEgYcTMxNmd4FHCvRRx2nMvulYZ7QWw0MMpDK5Iy+v eJCybR6D7tq4H0Wc46SUgH+9+qcPWHlUN6h6cKDpMkMqs9XHdpWYRiIDfQsc3vOfSaDc VlG3H0MZLDbjfXGC2ym4Rf2SsBsRjdAZ8oteeATkTbi4P2ud+6vt2XRR++Udf02cglVO EESg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WzT19ZTMHgxDdhZP127Y6+eybbWRZYyOUfnBus3/qU0=; b=e1nwCcBmNhJGx4l+PjX+ipFL+E0s2NN/b3rU/iheRUnLa7W7GZAfsMGjzVnwEf79vc 2NCSH4dqdmCD91j3FDQqO3E0hNmy/TolGPL6ombfmuDW/RBHxMzhUTaa2PgWoSTwsGcg DElkMgUPUbVmamj6vAIRxpJ6ea991XNtS7mDysDcgloUiTTgkDyto/6udBc79q6mXJeU Sq+K1BtWwdxz33Br742yd7UBiaPQXU6gqi/IRoGsW8PHUVgMk20virFkRrW5h5trx9jZ 8TBQ4CVqMZvI7J3bKNJ16lyT8A/PBZ2VOAQPp245X+qTN534Yf7qzsfmXYagwdvgmRuO 8BYQ== X-Gm-Message-State: AJcUukeSTcleH9bCHRvLjQXCoscQfVzegIIPe4j5Yc/G3o7SQ1GvFibJ a2IskKXdD24vFdt994LLAIwOUq11/NdG4aAMPAVfqw== X-Google-Smtp-Source: ALg8bN6hdUhU+kRh7dmDt6LDEF1ZDgOpoWIJCJxzQqJlu+q0sp9dQORSUf0fbxAe/79oDXXwwcreqOEoqVbUTo8byB0= X-Received: by 2002:a2e:7e04:: with SMTP id z4-v6mr3020005ljc.97.1548269249992; Wed, 23 Jan 2019 10:47:29 -0800 (PST) MIME-Version: 1.0 References: <8736pjkhp6.fsf@linux.intel.com> In-Reply-To: From: Evan Green Date: Wed, 23 Jan 2019 10:46:52 -0800 Message-ID: Subject: Re: Backporting dwc3 gadget fixes To: "He, Bo" Cc: Felipe Balbi , "stable@vger.kernel.org" , Alan Stern , Sam Protsenko , Doug Anderson , Stephen Boyd , Matthias Kaehlcke Content-Type: text/plain; charset="UTF-8" Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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. -Evan