Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp970909rdf; Wed, 22 Nov 2023 01:52:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IH1Q15crvdi2xWuav9lhKHd+735ZG9Gxp3NL5+VI1dY9bbF/DfN6mPI1JeI7CgixpHfSWQ0 X-Received: by 2002:aca:f17:0:b0:3a7:1d15:28fe with SMTP id 23-20020aca0f17000000b003a71d1528femr1659042oip.56.1700646736493; Wed, 22 Nov 2023 01:52:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700646736; cv=none; d=google.com; s=arc-20160816; b=kvdswrJsJthSMINw3sNXvei5AptxKeSMgia4seIurwcAWsuhuGD4xoHqB7htvoBR8U BA8Cp2zjOk5VGqk23vQgLq3yfeY3cxmtQ2DlBMUewiqtTe31f+lxnchSNkxnt5Dn0c2x zxNwhoYCcYvCF6WKg3F4e/f1V4TSlU7lbO7TZ0ZvQcF0xUggRuR3OuGwfVPLMBfAopqH fqL7/E5zDVJwKxh1GIqMs5osdx0fAkOAUkMF3efnGFFKs/MbXTsS4Sb682aaktI1YyUQ uOk7voR6l8hB+ANXEi7tgAa0wKj1+ejbkOv9/sCfjlT0WmIaoF3vH7u/veYahg58YtOl pzeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=GRgHo7CblFRhdZL+iscWzW4xo4ZgkEaDaZr/ia7aoqM=; fh=1ndqQu9TN2NeubMezyPfztUO1hBQ/5jm/0fERnoIcQA=; b=KNVdXXk1IjdYEvEo89V2o32OAj1X0AgVKoj8cPCt+9D+b8qXu77hPz2uUK++f5Y6j7 RktfByZUiCn0l3ZJrCPv9VrRnoUdA80XdQsJWX77+GdRlVNBSY6KIslsTGfU5lpxRbgp GUX+edzh7eZjz1Pce+rUglOEfiI+CS/npUSxR4VBlsgITrhbPEyPEKNjUeZ/qSZNBNKN pQclIwcOMb+aUQhZAnkpt2egOolZF462FT41T9aHlOq4MQ9Dj4bg3tjVO/3UvWT32W5f IDExTzwoboTE8vYPxk//xQru9viXKgQf1h/cx71cZtAqVDpnk9grF9kRIgCY9Q3I2ZxI Sp+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=o2r1HKah; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id a70-20020a639049000000b00565360714f0si11868327pge.902.2023.11.22.01.52.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 01:52:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=o2r1HKah; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 94AE48075B16; Wed, 22 Nov 2023 01:52:04 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343766AbjKVJuX (ORCPT + 99 others); Wed, 22 Nov 2023 04:50:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235332AbjKVJty (ORCPT ); Wed, 22 Nov 2023 04:49:54 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B634212A for ; Wed, 22 Nov 2023 01:48:37 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60B70C433C9; Wed, 22 Nov 2023 09:48:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700646516; bh=VC9h/SiN8Zx5aGSBZR6crUirZJCFXIk5eN7BP4+P6I8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=o2r1HKahm9VWVd8qhtRV5/TA0RzVd6l+Ek0VSBN3s1RHZ4h7noyswlQcQ/YYLC0bk S8X2LCkTa9Cn0lqoVsO7YeEWzqDDF9S00dbajvfkp/V/Nkf6RbrOv60lm2Tu2jKhzH hJHZR8n8AoXCmbsVVJ4HS9/AW6Dt7b2D46VblcZMz174wt5kA9wh4fSSKIjgNyL93o Vh0BPCbwpKejYEmFtM3PBxYReBmcH7yZKTkqkAthHqusQZrsvy/TIyXYFaJRwJzhJL E5WBfi2inJ1LBiPwSpwzZkes9BfR8RHQ7hzLdlH71Y2L2f9A6BHxmwdiPcB7qM765H 4tEAIETsNmApQ== Received: from johan by xi.lan with local (Exim 4.96.2) (envelope-from ) id 1r5jqk-0008B5-1g; Wed, 22 Nov 2023 10:48:50 +0100 Date: Wed, 22 Nov 2023 10:48:50 +0100 From: Johan Hovold To: Bjorn Andersson Cc: Bjorn Andersson , Konrad Dybcio , Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Wesley Cheng , Thinh Nguyen , Felipe Balbi , Philipp Zabel , linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krishna Kurapati PSSNV Subject: Re: [PATCH 00/12] usb: dwc3: qcom: Flatten dwc3 structure Message-ID: References: <20231016-dwc3-refactor-v1-0-ab4a84165470@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231016-dwc3-refactor-v1-0-ab4a84165470@quicinc.com> X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 22 Nov 2023 01:52:04 -0800 (PST) On Mon, Oct 16, 2023 at 08:11:08PM -0700, Bjorn Andersson wrote: > The USB IP-block found in most Qualcomm platforms is modelled in the > Linux kernel as 3 different independent device drivers, but as shown by > the already existing layering violations in the Qualcomm glue driver > they can not be operated independently. > > With the current implementation, the glue driver registers the core and > has no way to know when this is done. As a result, e.g. the suspend > callbacks needs to guard against NULL pointer dereferences when trying > to peek into the struct dwc3 found in the drvdata of the child. > > Missing from the upstream Qualcomm USB support is handling of role > switching, in which the glue needs to be notified upon DRD mode changes. > Several attempts has been made through the years to register callbacks > etc, but they always fall short when it comes to handling of the core's > probe deferral on resources etc. Nice to see this finally being worked on. It's not clear why mode-change notifications would be a problem though, as if you get such a notification, you know that core has been probed. > Furhtermore, the DeviceTree binding is a direct representation of the > Linux driver model, and doesn't necessarily describe "the USB IP-block". True. Johan