Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2022129rdf; Mon, 6 Nov 2023 02:17:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IHpHiG1GTtz95Fyb830H14B+bIx65+q0ynvXhSM3HqtWibBu2Cef0IK5ANSsotiq6/40d4N X-Received: by 2002:a17:902:c951:b0:1cc:70dd:62e7 with SMTP id i17-20020a170902c95100b001cc70dd62e7mr15231127pla.32.1699265870497; Mon, 06 Nov 2023 02:17:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699265870; cv=none; d=google.com; s=arc-20160816; b=MqNnjZIR2tvvPmzZBYjbhZsQRwKtIy2MWdLS3yOjHZyH25hkFluJNdm31If+flYSle Xem+a5iI5a0DvgX7LuSeTELkCA4Q7gBEdu7rFuMwlDlrILSd/0SqB8NrU/KyJ8emeIuS vA6ilFDf+pSQngwuf7+zMn2NgFmmFYwvcdBeDSj08TjfSVI5Ht3gWKCDGIYL3gxWS1Me EUyeaBZnarTD+W/34/H2PZ/IEHk/aqCrIwCK3/m0PD1lYwj0GWD1qTp02jT7XhLLx2YC Ha30sx+VjUnsJdxDjmOrAPq9/O+5MDGynaCLytqdVl2UYonXO4JgiHoWyTGdBHFRwY7I FeFw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=5nnYgERm3ibUNfQVf60QI4u3LZhhDb13kuIuLlxIg+A=; fh=8LiuKVPvFhh/3q8a1uy7AO1GSC6mw9mlMTt8x+4S0cc=; b=DvEBghij9vPcA5XOGVdVY3zlVGFYkRmB+hH3f0zSgTHPhFVlbzSDYY9PxCtpUwSjVU RnCKlwXIIilUaT0KrFlPYJYJIFsfHBSjZNhd1UEfTGhaHWo7E2sCFhksrdqqwBJ3/SMx h0dqMHcZT/AvlSFrRvE04bSznpAJt5MSj2lojJDqP21cqn5PQSIhei1XWN7Y9DhOu78P Y6WrUZlfAJW/kM5VgtiyTEKB4RP1RNt7EKPX1bRyjU3RfgWGIzJuXCb9N4Rv6AZwvf3z 8dzAW03Bwu69nBhjOXFtk1mOR4B8I4n8fUgz9O5h9D7IpYKxsNoczRDP98P1RWp4GjTI caLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HvFQJqqX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id lo13-20020a170903434d00b001ca01fd8942si7791965plb.120.2023.11.06.02.17.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 02:17:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HvFQJqqX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 5568C80615EF; Mon, 6 Nov 2023 02:17:49 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230299AbjKFKRs (ORCPT + 99 others); Mon, 6 Nov 2023 05:17:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229715AbjKFKRr (ORCPT ); Mon, 6 Nov 2023 05:17:47 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FCA993; Mon, 6 Nov 2023 02:17:45 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D1DD0C433C7; Mon, 6 Nov 2023 10:17:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699265864; bh=56DOiJvzIsi7Obpg+U9KIIzKzZZh+cCT26ywVwVbTOY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HvFQJqqXXbFNiDd5C6P5JCFywSMtm6Pj46+T/tXynkOwiEqTvTQEjXAZIYOUSOZe+ oD0NK50DCUi3tMjfBBBtYdBX0x/ijO1nfz7HSyrY2NPZziVBApDa7m+b327GVtcTZw bSlXACgKr/DY6cld1ssbNpk8NufZ1JK1K5vvmGZ20jGOtt2OWfTc0x8wiG/bnandTY yO4N+9WoaxutrHwe4WfIx83bVygi7EzYWM6VRwXP22qVwhc86W3tjziCnVDzzso6Vk DKtBzq3CrklsTsuoP7d7qqOCITux1ETWuARc3tOP4HyYGZfp6iUDaf2qpEGYy/7RlF 0hsJh3TPmt0fQ== Received: from johan by xi.lan with local (Exim 4.96) (envelope-from ) id 1qzwgg-0007WT-0W; Mon, 06 Nov 2023 11:18:30 +0100 Date: Mon, 6 Nov 2023 11:18:30 +0100 From: Johan Hovold To: Stanley =?utf-8?B?Q2hhbmdb5piM6IKy5b63XQ==?= Cc: Stefan Eichenberger , Johan Hovold , Mathias Nyman , Greg Kroah-Hartman , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" , Maxime Ripard Subject: Re: [PATCH] USB: xhci-plat: fix legacy PHY double inity Message-ID: References: <20231103164323.14294-1-johan+linaro@kernel.org> <5a493e6fedb449bc93f83f31a682e5b9@realtek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 06 Nov 2023 02:17:49 -0800 (PST) On Mon, Nov 06, 2023 at 10:08:24AM +0000, Stanley Chang[昌育德] wrote: > > On Mon, Nov 06, 2023 at 06:53:23AM +0000, Stanley Chang[昌育德] wrote: > > > I test the Realtek phy driver at drivers/phy/Realtek/phy-rtk-usb2.c again. > > > But I can't get the phy in xhci. > > > > > It is a dwc3 generic phy driver, and it is also a usb phy driver. > > > > That sounds broken (i.e. to be relying on both frameworks), but indeed that > > seems to be the current state of the generic and legacy USB PHY > > implementations. > > > > What a mess. > > > > Base on you modified, I can't run on callback > > > rtk_phy->phy.notify_port_status = rtk_phy_notify_port_status; > > > > Which dwc3 driver are you using? Unless I'm missing something this would not > > be an issue unless you are doing something crazy like describing the same PHY > > twice in the devicetree (i.e. both as a generic and legacy PHY). > > I use drivers/usb/dwc3/core.c and drivers/usb/dwc3/dwc3-rtk.c > I describe the PHY as generic and legacy PHY in device tree. That's not right. You should just use the generic PHY binding for new platforms. > Our driver needs the API base on a08799cf17c2 ("usb: phy: add usb phy notify port status API"). > But generic PHY driver is not support this. Yes, but you added that interface yourself, and that I think merging that was a mistake. We should not be building functionality on top of the legacy USB PHY implementation which is stuck in some transitional limbo. Apparently, your PHY drivers which were merged for 6.6 are the only users of this interface, and there are no upstream devicetrees that use these PHYs. I think we should revert this mess before we dig ourselves into an even deeper hole. Johan