Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2496523rdb; Mon, 12 Feb 2024 06:52:54 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUoBemG7x3A+a8kmxiLKrR35METcDqo3sbrug6psfvC1+5uwk57grJazo+iVZ2aTtxtohHBeDN02Gwg3kPbP6vl8l6gF0Xys1u5MiIlhA== X-Google-Smtp-Source: AGHT+IEQlgfBUx/JFXwxpKjMunV9yYUUeA9cqBdPfz63DCGSHx0RgRSSmRpPbcom+BG2RrMuknY2 X-Received: by 2002:a17:906:cf9b:b0:a3b:a4af:9ec3 with SMTP id um27-20020a170906cf9b00b00a3ba4af9ec3mr3452865ejb.77.1707749573817; Mon, 12 Feb 2024 06:52:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707749573; cv=pass; d=google.com; s=arc-20160816; b=KnQcmpRWx7aak7MC41OtmYT3rnFA4e7yLrQrL9Yrn3Mpo9puJbF1Aw1ALH6xjZrTyS 6ZnA1yBoZ17YhGFz+4L2jNCmv/iRGJA874ubKBarPiopFuSQqFcuOerURzpTSSqYPAc+ TAbfZuqww89CCeJiUIWfdyZDObLa/8Jb9WEtlRLvcaARo0ZMgpnUNE+DItOBN4fae0SL 1t9Hm+2yimfEKfe2hYwSIm2FIxf7IuGadis39Svq1yZJS+Kn6XgcHpybILAbM+lNmsIe Sk/BLS6YOYrg3UF4OxFxrc3SVrbOmD3nd3j57C3pX65KZwqqg+gU22eVwc2OdqgXLpah SPDQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=8V/n6mYnmYAVnrBX94RlW3GjICZYM1XfZBGebC4iOsg=; fh=coNfWUqvKz/eIjU7wE8tgAZ3iP574hGq2MLBMh8zP/8=; b=QLHgFZJ1GNTRhcGw4ZpZGO1TDaMitTIiYoLjG83qOYDGoqK+ThXtWOvMgiYNdT/Wct wSwqUJj24iEcp8Gwb8ay4k2HW4oDEtPokC4tC+pWlA6wO82IKBjfxL3QzmDLwoqW8nWi hs+9MduG8f4MneDPR0VnkuVGD0JTCr4PuTocACyFA2DvLuJxlxXgxZpEbUngjDdwZusm KhLR4OA+UROIIsKRWyheROtqndnS0hsYC2jM2J/H0VRJMIc7yC0alfrFjKlpI6paVxX+ hbwmxp9pUIcNitKtdosY1tRLUgMiHjE6c5Vitg0ncTzMTiz+1VbkD6V9Ng5NAwF0M/hq YlVw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="HhoKQms/"; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-61845-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61845-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch X-Forwarded-Encrypted: i=2; AJvYcCV0rsfhnyFfwKY/Y4OGg5Hez95dPn7lJWBPBD2O43qeGmuRBwL9MDxqJrRffONsDvzfiyKjv2oOWZ9tkJ98XYEXND7wSSjWVyktHLrm8g== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id qf19-20020a1709077f1300b00a3c9f6c7903si268430ejc.585.2024.02.12.06.52.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 06:52:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61845-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="HhoKQms/"; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-61845-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61845-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6DD641F229DC for ; Mon, 12 Feb 2024 14:52:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C79413C06A; Mon, 12 Feb 2024 14:52:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="HhoKQms/" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD0AB3BB34; Mon, 12 Feb 2024 14:52:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707749522; cv=none; b=Ha+TiAyJeRDnb8aNrc1nSaJewFkqgxumKbSp6yujTu68fvgg4fgWRDXdhZmOHKOxsbxrycfpfpTPI3KIH3Sf9apeC2cqpB0tYo1zzAi0Q2sPHDh0DhC5guahpY+16EaYD/Wa4YmqT4LP9hGHD0ERwJyNlAQRcms84GWjzFB2QlM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707749522; c=relaxed/simple; bh=CvO5h22bIICO9OVAqHSfrziFGOjtF4BmJIiYlm8gKqk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Ix4wViamBw69YY+MbFyZMsNxD8rNArWxueM2Q1gM7+Veb6FMYGnKxXskZ07ufJXkWptDHJailcOs3iP9etSQBWXhIKbLOnHRMGxxUC4PeaL9sAJgp+XKpWPanZ0wpSB2GHJserMiccK9GQ+0lGANsgw+ACQOfcj2i3/NWimtIDo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=HhoKQms/; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=8V/n6mYnmYAVnrBX94RlW3GjICZYM1XfZBGebC4iOsg=; b=HhoKQms/prSYZqTTcb2AcWxa8q PExcu4ZShC/u3ut6nS1RttBsqvdv34EBXZ0FXqlQ5R4GmhpAgZXlRIO7nGWijaM59K/7cghvtcT+o 2KVPJO+4zqCLhXhBl0nUmcMAmNFiIo3wcxg164WHrTey7BzQoK6QcvKYzJWcwnigk0d4=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rZXf4-007aEq-Tx; Mon, 12 Feb 2024 15:51:58 +0100 Date: Mon, 12 Feb 2024 15:51:58 +0100 From: Andrew Lunn To: Robert Marko Cc: andersson@kernel.org, konrad.dybcio@linaro.org, hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, ansuelsmth@gmail.com, linux-arm-msm@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] net: phy: qca807x: move interface mode check to .config_init_once Message-ID: References: <20240212115043.1725918-1-robimarko@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240212115043.1725918-1-robimarko@gmail.com> On Mon, Feb 12, 2024 at 12:49:34PM +0100, Robert Marko wrote: > Currently, we are checking whether the PHY package mode matches the > individual PHY interface modes at PHY package probe time, but at that time > we only know the PHY package mode and not the individual PHY interface > modes as of_get_phy_mode() that populates it will only get called once the > netdev to which PHY-s are attached to is being probed and thus this check > will always fail and return -EINVAL. > > So, lets move this check to .config_init_once as at that point individual > PHY interface modes should be populated. Just for my own understanding, not directly about this patch... priv->package_mode is about PSGMII vs QSGMII for one of the SERDES interfaces? We expect the individual PHYs sharing that interface to also indicate PSGMII or QSGMII? But what about the other SERDES, which can be connected to an SFP cage. You would normally set that to SGMII, or 1000BaseX. When an SFP module is inserted, the correct interface mode is then determined from the contests of the EEPROM and the PCS needs to be reconfigured. So i'm just wondering how this check works in this situation? Andrew