Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2657159rdb; Mon, 12 Feb 2024 11:48:35 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUyDbSNmFAHhAUe80KDhYfKmjrSXPzwfEx90oyI06X8i491/2bwUXVZ7hwLAY4/Un9DNXM7FLKdVpVz3bAqdfpfreemUvZlt9zzK9WveQ== X-Google-Smtp-Source: AGHT+IEo7xw8GOULg6WnCTldpsCaEOY6hmg+H6LtHSyBuM9R/NxC2Ay1ENYX6uQjRSEPYexMT6kL X-Received: by 2002:ac8:7d42:0:b0:42c:3a04:58ca with SMTP id h2-20020ac87d42000000b0042c3a0458camr891991qtb.11.1707767315198; Mon, 12 Feb 2024 11:48:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707767315; cv=pass; d=google.com; s=arc-20160816; b=nlH4YWi66/i/ODs0rlOpeCJWNBOgWoqCIpU+DSNUeQkgVNw56GcDnEsS7ATw5zMqAc K9Z/O0qFcug4/AbtHoBm1QHmfu7LW8I5Y6o+ycNIBSDr22Ch6QvHqOmb2zqUDKfBa5LH EA8gcp9uooFtFerB7pYiVlpGXULcHXK/h0CKUTH6WXB3Bqb5GXxOL0EbwSZsC1VcT3zT FUt/He+l5oEBa8beP0ooVBQNzrYgNOqrMaU5Z0AUTvPGeeyHw2K8DBEiIsw2mV8hnDGv mxjWHUZ6k1tsw0nXkAC5uj6pt1lWhobMU8gLQsou5NG8Jf5AG+Shjwd3d9735wJ9tdk/ 6LlQ== 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=fVTHkRWd/tAUl4w7Ho74/SJnoO1GvKi18/DDs+kPOJQ=; fh=8Ll0B/LfbKMT9LrF6FseHhUzouA0XuHh7vpv6CbqXrc=; b=Orr9fIcwXyLhRHBnkMlL7uKmIUG7S+Tbw0GLwsIbHtoqdNIDhdVqMqzzzMQ9+CMGYT /FWDVKFLTJg5bM7NvXZf4oecQwvJpNbUwsYpPJiF/VgMhNnQ/dkRnSWpLsgX+/9mfWZk hEoWWofMC5RL6OQSCRVfpNb5PCJuKCgiDDlyMezlDeDqHrhx2ju3ITZP+NH4qg3Rmwzr xIUwhnlm3xR37K5JnxeH2Qpa2eN1W0rOsuml5ECw8jbsjsTgW+8YX8R/j3prbzXOruaY OeZoi2R8A32byO5jGCuiFJlTQQkOtHApgEHObU/NwNNf2xmFC6btFVqLbhqEt4lLH/JY 42EQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="UsWPT/Zm"; 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-62290-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62290-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; AJvYcCXdlkLxqxIQQ4mCBo6er0tTa7jX2iTL77oHZqkkIZItn4Vvqf9MV9DYeiYw+422aXUlXB4+Io2Coj/titrwJ6dS4+/pImZm6XSS47gL3Q== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id l26-20020ac84a9a000000b0042c3ed94d8csi1035948qtq.392.2024.02.12.11.48.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 11:48:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-62290-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="UsWPT/Zm"; 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-62290-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62290-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id EE3831C21E1C for ; Mon, 12 Feb 2024 19:48:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6068447A7E; Mon, 12 Feb 2024 19:48:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="UsWPT/Zm" 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 9586247773; Mon, 12 Feb 2024 19:48:22 +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=1707767304; cv=none; b=lP6llfSYBOYnQotVZOifgChRZOrUwQZojoC1Gg2T0Gb02j/D+8XjOpBtlve90Tkzik2eGoigZBOQAyn2vm6c+5Z3zeQnFw2zAkEEiNAjcDja91cVwBFBYF43nAG7IVyF+fu0pSp64aKUusl/ZnUhzBkNS5/S8NfX6gccU1Nldok= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707767304; c=relaxed/simple; bh=0ft2MpYjrV64jvQOY3huDzIg33+d3RYVhImM7BX3V5s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nyV3tsD4SCI3byCNqQEBb/yhX/vfL2awTxxJT/ZfM61V6iRoezzoWH+2lTUdLP0FAMTxxDXV6DvIn2ExRftT4l0w4zyARfOox1ZY5V62+dHbrM8+vaTeoKlXk4zosrdB7q9rC770g73yBYv/4Aot0+ljJhJLC0eWOFovVVAYEAw= 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=UsWPT/Zm; 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=fVTHkRWd/tAUl4w7Ho74/SJnoO1GvKi18/DDs+kPOJQ=; b=UsWPT/Zmyw6Uk9UYdkA4FQJsi0 CP4i0Pi2t44a3Xy+SjFAbhLzA7w68xNircdiTCODBXYvNC7obCnDevGXTSCztIeVLgpK2Y1+mhw2H mcSIPYPZhKPhExmAHpNH3Ic7AY+lADuGyzO/VcosFlx2CsZWb/g7SwG19liGTW2tgl9I=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rZcHo-007bYQ-Ma; Mon, 12 Feb 2024 20:48:16 +0100 Date: Mon, 12 Feb 2024 20:48:16 +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: <7c5dd47c-26b9-4a12-af93-6139ae85e864@lunn.ch> 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: On Mon, Feb 12, 2024 at 07:09:04PM +0100, Robert Marko wrote: > On Mon, 12 Feb 2024 at 15:51, Andrew Lunn wrote: > > > > 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? > > Yes, that is the idea, all of the individual PHY-s in the package > should be indicating > the same PHY interface mode. > > > > > 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? > > I just went to retest SFP support and it works as intended, as soon as the SFP > is inserted, PHY will get reconfigured to "combo" mode so that fifth PHY can > support both fiber (100Base-FX or 1000Base-X) or regular copper connections. > > So, the check will not interfere with SFP support. So for the port with the SFP you also have phy-mode of PSGMII or QSGMII? That then gets changed when the SFP is hot plugged? Andrew