Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp438101rwd; Thu, 8 Jun 2023 02:59:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7CNeQ8mJJrULt3MdlQIXbW+MP4fsBSmH3vGpXRPHltI2qqdQ0iYIzeyf/5wg6Ea3I2utsl X-Received: by 2002:ac8:5b8e:0:b0:3f8:365:7aa3 with SMTP id a14-20020ac85b8e000000b003f803657aa3mr6887396qta.3.1686218365589; Thu, 08 Jun 2023 02:59:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686218365; cv=none; d=google.com; s=arc-20160816; b=a7Jf0bQ/tsHwdxJ15IlUW8t4DQfLlYwvDYuml33mHCgCYusaniT5epkIzeZu/R5X1Q rdz7HakwHjv7LHwfZ2v6ra8qft3iBnjIGVha2SaaQvOQMaMY1SM48I1VVkif6x15hEHA 6IhzNZvS10PF/oOGECivrgXvqrNf2C2o8TnuC+vEuh5XV/Q+VkKD2JzArJ+5m3LwmwSD rrlLa26yhMLsLj1C7+fYsaO3Wh5o9fDEu+O9GD+em1FdYhG2tlz9uM86qSZA4WUU81Qy FtM5o2+ingm/9biuz+hx9iE6euIujKz537FYg/LSmOti23UlEGYc4V/G2tRv2zO4SnH9 BPHw== 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=OY063qhSeI554IeLdboJfL6wSInbYjpki7Tlh9+e/Cc=; b=Njisq73j0MgyAp2Z3BRdgHEOOGUbj4Hvck4oWo+8zE72vdkjnskn8UJ89C0tf14LWc +LlIul0veDHKefTC/kiH6SF1YQOcikFHN5HPIdru84g0ZgllNL146XC78keSjDwFBUF4 TbfVpjZbNH8fjO+xj4Q8V/nwHP0tl87nu1BXoW2yrj1+CAihLMldgfwA6jZg+lr4Y+OR uuO/Mo9ztrCDr02KySwfQhNjfO1TX+cc4fEoRkHW5DNE2OOO8wzsnN4ZLuoU75sZJTq2 DlE9SKXAaeQxWzoIQb6BGNfubzQ8/2SSc27bbf+f4f8DwBL/oUr3HlwSwx3tR3ssHg6x gRNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="lBH/Tmj3"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z11-20020a6552cb000000b00543fd615d2fsi716227pgp.879.2023.06.08.02.59.13; Thu, 08 Jun 2023 02:59:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="lBH/Tmj3"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233746AbjFHJo2 (ORCPT + 99 others); Thu, 8 Jun 2023 05:44:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236040AbjFHJoS (ORCPT ); Thu, 8 Jun 2023 05:44:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AD8526AD; Thu, 8 Jun 2023 02:44:17 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2680E64B77; Thu, 8 Jun 2023 09:44:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 62952C433A0; Thu, 8 Jun 2023 09:44:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686217456; bh=W7NMjnc+dhnyCpFKHFIFOZFZb+gFDdZ2hqitOzaHHOk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lBH/Tmj3yorBORdNglBBZ/bMCSZSK5Fiizq28MFW46kQkRnV7aFFhLC7dr4NO4qmy WteUZnAwJ+d0dBDMKxrgMHwkn2LbKqZoK/xxmTTmmgubNbaTPmGP8bV4Bbb43ijNwv +bcUBa3mjoZwJCZj0I3o9phmkYDziB1geI7hx4Mvk3+8P3X8Ew7l1srMOSVSaxfPU+ 9M1M+M0Lq3zCOi7lf4ELj7dmHjdz8wznwzNLpUw9pW2anlA/SOTxueAxGUPVYwpS+p TD3JJYqsAgXoWlhEqGNsYqzvlf/qVoZ8WggQmOetbn1gdhDMfbHhUR4nOYcCUcKUMi dXppHBOqJebfQ== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1q7CC9-0004Ad-Fq; Thu, 08 Jun 2023 11:44:41 +0200 Date: Thu, 8 Jun 2023 11:44:41 +0200 From: Johan Hovold To: Krishna Kurapati PSSNV Cc: Bjorn Andersson , Thinh Nguyen , Greg Kroah-Hartman , Philipp Zabel , Andy Gross , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Felipe Balbi , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, quic_pkondeti@quicinc.com, quic_ppratap@quicinc.com, quic_wcheng@quicinc.com, quic_jackp@quicinc.com, quic_harshq@quicinc.com, ahalaney@redhat.com Subject: Re: [PATCH v8 6/9] usb: dwc3: qcom: Add multiport controller support for qcom wrapper Message-ID: References: <20230514054917.21318-1-quic_kriskura@quicinc.com> <20230514054917.21318-7-quic_kriskura@quicinc.com> <20230515222730.7snn2i33gkg6ctd2@ripper> <20230526025554.ni527gsr2bqxadl3@ripper> <37fd026e-ecb1-3584-19f3-f8c1e5a9d20a@quicinc.com> <3010d855-86b0-f87a-5eb7-85204be9b4b0@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3010d855-86b0-f87a-5eb7-85204be9b4b0@quicinc.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 08, 2023 at 01:25:25AM +0530, Krishna Kurapati PSSNV wrote: > On 6/7/2023 5:14 PM, Johan Hovold wrote: > > On Fri, May 26, 2023 at 08:55:22PM +0530, Krishna Kurapati PSSNV wrote: > >> On 5/26/2023 8:25 AM, Bjorn Andersson wrote: > > > >>> We need to fix the dwc3 glue design, so that the glue and the core can > >>> cooperate - and we have a few other use cases where this is needed (e.g. > >>> usb_role_switch propagation to the glue code). > > > >> Thanks for the comments on this patch. I had some suggestions come in > >> from the team internally: > >> > >> 1. To use the notifier call available in drivers/usb/core/notify.c and > >> make sure that host mode is enabled. That way we can access dwc or xhci > >> without any issue. > > > > I don't think this is a good idea and instead the callbacks should be > > dedicated for the xhci and dwc3 drivers. A struct with callbacks can be > > passed down to the child devices, which call back into the drivers of > > their parents for notifications and when they need services from them > > (e.g. during suspend or on role changes). > While I agree with you that these notifications are to be used during > role switch or suspend/resume, there is no restriction on using them for > checking whether we are in host mode or not. IMO, it would be cleaner as > we won't be dereferencing dwc driver data at all to check if we are in > host mode or not. I'm not sure I understand what you're saying here. Could you try to rephrase it? Johan