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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 BB118C4338F for ; Wed, 18 Aug 2021 09:35:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A2E2060551 for ; Wed, 18 Aug 2021 09:35:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233755AbhHRJfh (ORCPT ); Wed, 18 Aug 2021 05:35:37 -0400 Received: from mga14.intel.com ([192.55.52.115]:31697 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233074AbhHRJe1 (ORCPT ); Wed, 18 Aug 2021 05:34:27 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10079"; a="216016983" X-IronPort-AV: E=Sophos;i="5.84,330,1620716400"; d="scan'208";a="216016983" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Aug 2021 02:33:32 -0700 X-IronPort-AV: E=Sophos;i="5.84,330,1620716400"; d="scan'208";a="510788468" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Aug 2021 02:33:29 -0700 Received: from andy by smile with local (Exim 4.94.2) (envelope-from ) id 1mGHwp-00B43I-6B; Wed, 18 Aug 2021 12:33:23 +0300 Date: Wed, 18 Aug 2021 12:33:23 +0300 From: Andy Shevchenko To: Jack Pham Cc: Thinh Nguyen , John Stultz , Amit Pundir , Ray Chi , Ferry Toth , Chunfeng Yun , Marek Szyprowski , Li Jun , Felipe Balbi , Greg Kroah-Hartman , linux-usb@vger.kernel.org, Wesley Cheng Subject: Re: [RFT][PATCH] usb: dwc3: Decouple USB 2.0 L1 & L2 events Message-ID: References: <20210812082635.12924-1-jackp@codeaurora.org> <20210818012859.GB30805@jackp-linux.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210818012859.GB30805@jackp-linux.qualcomm.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Tue, Aug 17, 2021 at 06:28:59PM -0700, Jack Pham wrote: > On Thu, Aug 12, 2021 at 01:26:35AM -0700, Jack Pham wrote: > > On DWC_usb3 revisions 3.00a and newer (including DWC_usb31 and > > DWC_usb32) the GUCTL1 register gained the DEV_DECOUPLE_L1L2_EVT > > field (bit 31) which when enabled allows the controller in device > > mode to treat USB 2.0 L1 LPM & L2 events separately. > > > > After commit d1d90dd27254 ("usb: dwc3: gadget: Enable suspend > > events") the controller will now receive events (and therefore > > interrupts) for every state change when entering/exiting either > > L1 or L2 states. Since L1 is handled entirely by the hardware > > and requires no software intervention, there is no need to even > > enable these events and unnecessarily notify the gadget driver. > > Enable the aforementioned bit to help reduce the overall interrupt > > count for these L1 events that don't need to be handled while > > retaining the events for full L2 suspend/wakeup. > > Hi folks in To: > > I'd like to request if any of you could help test this patch on your > boards to help make sure it doesn't cause any regressions since I know > some of the recent dwc3 patches from Qualcomm have been found to break > other devices :(. So I'm hoping to avoid that even for a patch as > small as this. > > Hoping this could be tried out on boards/SoCs such as db845c, hikey960, > Exynos, the Intel "lakes", etc. Ideally this needs validation with a > high-speed connection to a USB 3.x host, which increases the chances > that USB 2.0 Link Power Management is supported. > > The overall goal of this patch is to eliminate events generated for > L1 entry/exit, so we should see a slight reduction in interrupt counts > when checking `grep dwc3 /proc/interrupts` for comparable traffic. Unfortunately I'm quite busy lately with more important stuff and I dunno if I will be able to test this in reasonable time. So, if Ferry volunteers, then we can cover Intel Merrifield platform as well. -- With Best Regards, Andy Shevchenko