Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp132577ybz; Fri, 24 Apr 2020 13:06:38 -0700 (PDT) X-Google-Smtp-Source: APiQypIkCqa47T0shQOzT4bd8eA6KnNFpmITP7tN5wCpTE6bXxyeHZrfMV4w3dgO1UigUz83kMjj X-Received: by 2002:a17:906:38ca:: with SMTP id r10mr8348533ejd.278.1587758798456; Fri, 24 Apr 2020 13:06:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587758798; cv=none; d=google.com; s=arc-20160816; b=lYYW87P+hyvNDPi4JxMDrJ+ROFBkrlZ21UVK1ealZwCW36gWWHwfWJqM/Ijyf3+hAl FVCsQBnKX8ouY7TdxLGKpW0UTcNKx2kWTa0B0o8rYuD5a9OcQmptiz91adUY6FisRcgt 142UK5X4Lm9B0cIYgTkGA7014BMRB4k2/IY/QcRGjZEO5FbBkEYln4dAq4xjeEyz8NJH RkR2yZpWEGNzLWRTLqlpWOEMzJCVXLnTaA3RiTK4WOkEQy977amjaBgBzxNaLeBCqtxE 1eFIPFWW6/eVp6ktkttmtbSuET9hK/zMT05ta1Q6KgupgZGS0s5AGm3im6VKBi9V0KEO oBJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=8XI1LvypvRpBnnfjlnzQMUzrYBVqCVi4omkZLAUHHT0=; b=NaGiVvTub78oYrCMlvnTbs5wBr8+ZWe4CeXPgM85HQAj1pV/R6veBLf1k7bB47lgHi jN9nukfxmfsKzxxwi4c6CsCIe7jjpOAsDrmCAinUxEkLAk7mQszqVbKm8leZt3mqhQK+ bZrVMoQGIDxknq5IVt104BuXMH/Q8MTO/MkjRMJo17QvjCIay2HV3UD9ODhUh28HCv13 uosaVjhOGWtlFmwqI0gAt+/6HFoCTTc5eN59LmHzgWCSCmM/3cVaktE1JQRKg284lMMM 6SyKuZHL4a0O4GKV0eH3OQ7UnY8Z2TJ0Hj790+tV9BFnJDCUMAAIXCey9vKVXal4m+7j sucg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EPrPgdaM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id me24si4013770ejb.326.2020.04.24.13.06.14; Fri, 24 Apr 2020 13:06:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EPrPgdaM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729461AbgDXUCV (ORCPT + 99 others); Fri, 24 Apr 2020 16:02:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729425AbgDXUBu (ORCPT ); Fri, 24 Apr 2020 16:01:50 -0400 Received: from mail-ot1-x329.google.com (mail-ot1-x329.google.com [IPv6:2607:f8b0:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18225C09B04C for ; Fri, 24 Apr 2020 13:01:49 -0700 (PDT) Received: by mail-ot1-x329.google.com with SMTP id c3so14557578otp.8 for ; Fri, 24 Apr 2020 13:01:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8XI1LvypvRpBnnfjlnzQMUzrYBVqCVi4omkZLAUHHT0=; b=EPrPgdaMmqH/8+NLEje7ykgzlxHHBtmWjq6MpgQXjVqpFTZEpVMrublr+7m3pVkfRI IJU8r7MUaEuZvWjxeqcHm1/e8mGMOyuG0H5uCHADhwtxE5B0dbN9dNaVxjAkMb8MR8oC aca78pdutVnsMDpa18xm5Be7gxdmLqjtxJRP3oYxzKBJ2zbruCqOxMenTS1jIKrb59jq m8uSnQIV/At9jcnk+n0nZZvzP0Hjfs1xepgTW6gKeHoe/D9JN0j5s+Qffuv3yE/CR7bd 8tWn4AhNqjvC1ayhMm9gkNTvKbTv44eX07NDUlVeHYQ1Ez4ILLqf/2W2PqlBRGBLCcyN t4ow== 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=8XI1LvypvRpBnnfjlnzQMUzrYBVqCVi4omkZLAUHHT0=; b=F6GM+OeCg5AkJRFHp4KXT7L9Dj2v80H9xS5grfvRA3iZR6SAJ8JIZH6Gb/B3XWcvUj CZ/8rOUARH6vTw6GBSTN+1nVd2oYiPzPGyrw/mMe9HcBBg/Hd8dKqxEU7rmpZ7/rpis/ ILMS3BDCOfk3L6wBh9Mq29kN1EJ4aDDZNlaMx6A7ZSTD+IK+ehnVqeNsjspdEeEih7bt eTVpZE41PaMI9U17MTPjAqZ8+4KfjjCPGiDTg+jqouiQVLG3xETp6j5Ve1U7gjXIRadx io9R3tqQjEA3rAEZg9Q29NSqSTthG6+xyTzWvf6YqSRJf7HG0lIQw3jLAXMEskcHGRZH 5L0A== X-Gm-Message-State: AGi0PubnDA4okMjhbiqKmYN3bgI30ebkn/nywhrQFDjYvvASeDgma5Sq cXq3v8tzRxHfjWRBBttvAZYk3MfmgoR/GmZi1TniHQ== X-Received: by 2002:a05:6830:1589:: with SMTP id i9mr9792803otr.102.1587758508417; Fri, 24 Apr 2020 13:01:48 -0700 (PDT) MIME-Version: 1.0 References: <877dyfsv00.fsf@kernel.org> <20200424171247.GA20167@jackp-linux.qualcomm.com> In-Reply-To: From: John Stultz Date: Fri, 24 Apr 2020 13:01:35 -0700 Message-ID: Subject: Re: More dwc3 gadget issues with adb To: Jack Pham Cc: Felipe Balbi , Josh Gao , YongQin Liu , Anurag Kumar Vulisha , Yang Fei , Thinh Nguyen , Tejas Joglekar , Andrzej Pietrasiewicz , Todd Kjos , Greg KH , Linux USB List , lkml Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 24, 2020 at 11:36 AM John Stultz wrote: > On Fri, Apr 24, 2020 at 10:12 AM Jack Pham wrote: > > On Tue, Apr 21, 2020 at 10:09:27PM -0700, John Stultz wrote: > > > Does something like this make sense? It's not causing trouble on > > > db845c either so far in my testing. > > > > Ok I'll bite... > > > > I'm now curious why it hasn't been a problem with the Qualcomm HW. Do > > you mind please capturing a similar trace log on the db845c? Would be > > good to see a side-by-side comparison and see if, first of all, whether > > the same S/G path is getting exercised (i.e. 16KiB OUT requests from ADB > > userspace using AIO which then get broken up into 4K chunks by f_fs), > > and what the behaviors of the reclaim_trb and giveback are when the > > transfer is completed. > > > > Preferably if you could get a trace without your patch applied that > > would be great. And maybe also one after your patch just to see if the > > traces are truly identical or not. > > Sure. I've captured logs in the same manner with and without on db845c > (against 5.7-rc2). See attached. > > I suspect the difference is the db845c is using an iommu (I don't > think it will boot without it) where hikey960 isn't, but I'll let you > take a look. And I've added my own printk debugging that I used to track the issue down on HiKey960 and on the db845c we are never hitting the case where the HWO flag is set when we call dwc3_gadget_ep_reclaim_trb_sg() thanks -john