Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp193715rdb; Thu, 21 Dec 2023 06:46:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IFBeE/O475/dAEuqX9G5dorvxmkIuaTC2ZP2ThQQli/J+l0SIQdWVowb8jGg8SU4gHXTHOY X-Received: by 2002:a17:906:5d:b0:a23:463c:16ba with SMTP id 29-20020a170906005d00b00a23463c16bamr2539140ejg.167.1703169977835; Thu, 21 Dec 2023 06:46:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703169977; cv=none; d=google.com; s=arc-20160816; b=M4mkJCvMFp4EyqxVOZmt72AqgiZ8Claf+hdqcC99NJpajEbjtnlk0/9XQ5Xqtqs9cZ vc57QD2jId0s5cm0k2qKTIXBGiARX1S9GtRFWb0NqPl+5rHnIPunXDwOtJ4ljjUKPIxb /0OSY77tIKsJrKgRJ5DXgCZZvxFK92aNHqAh2Wz8/XMWMnUBKbWgzXsHsOF/zTaETeFb U62BHtzKquwa4yt/OI5Wtxci5ROUXTE+RFnHfmK+ZxluPVM16pjPQ5kscr1xkUx6TYUL xwlARNe/8B+T/2xAuJb7yvhiYzLY2t/j0a/X1pj4jy3oYzniI3iWJWM/SsAQS2Nf2YSc gkdA== ARC-Message-Signature: i=1; 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=rrwv3J31Qk9UonkvLPYM6smDy/xDXM7xflFYKfVBtBA=; fh=t2Yyx+t1DS6Ai8ZJJT0PhzxxuyU7AHdmAcVU0VLwGSg=; b=XZHUvKyRjFQsH5D9qaEQhYFzvvI6goJ8PlZMcNsi/V/QnRev7V8b934epFXGOUy68W ZegNZ4ucqdGEuHsTSnvmWnk5c536YJMfjtYm/BRLAQupGxJUNin4k8GBiefTEsnfaZ/G zI/S2/crbeDeIpoNwXrf8T8i/gagqqK7a/cjW9DrlBI7Mb2vsh1YaEKXO6Q3Puk0jpQs 9+wtFakjIywq2OC+4kUi2HMPCrYkGvLWrAu/rQdJvteXrUikH9pn2n6s7P3266Sopth5 hxg7+AchKvTOzUdO01bA0NRcW3CW9Lj7kQSCGgaBl793oHPVe9ZFVv+Jp3xaS7znw1vS GXiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mVLeW797; spf=pass (google.com: domain of linux-kernel+bounces-8586-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8586-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id g19-20020a1709067c5300b00a1ce98016c7si917680ejp.533.2023.12.21.06.46.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 06:46:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8586-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=@gmail.com header.s=20230601 header.b=mVLeW797; spf=pass (google.com: domain of linux-kernel+bounces-8586-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8586-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 D97B61F225FE for ; Thu, 21 Dec 2023 14:45:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC7BC3609A; Thu, 21 Dec 2023 14:45:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mVLeW797" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC71A1D6BD; Thu, 21 Dec 2023 14:45:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-a22f59c6ae6so104881166b.1; Thu, 21 Dec 2023 06:45:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703169945; x=1703774745; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=rrwv3J31Qk9UonkvLPYM6smDy/xDXM7xflFYKfVBtBA=; b=mVLeW7977tPTu1qck7qfNaYi6fNZNtr0adCbkZ2hYn6ek4L6ya5+EjE1bNkWDBbZWN +Lp9S/3yqPHUb/RvG5o2WSDricYZa44TpLQWf/UbX0i3SkFM0rh9zg9f+6FORBGg4Uu9 jBZKjikbj2Mp4/47s47zZSu84CFrclrZbntDPn4eKRCOhbD1grrVnA0Vxi41Edvd/q2o V+S6V5w0HpuZqqErNa7zfABo6+aiHmPTm5NniKfD1e4oP+TdPRVI4f+Yehuqy2zUc5xj qs3U3kSOw7VVSWh+32tmxjglch45j0eTjLp8bvAnbdMvwIH4MCYnRJzzChU/xldIMY+Z vZpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703169945; x=1703774745; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=rrwv3J31Qk9UonkvLPYM6smDy/xDXM7xflFYKfVBtBA=; b=AwbUWe7Y1YdUJA0EDIp2JlBS360V8GDetx431vHFP6x/rqmmoeG0TI3qDgCYeepfNu xxlnACtMtnm5pI9tfPk2En9N+3c/SIc1AdzVcFh0YKtZ0Ws/qsLhSMeL17ELE77zj8us 8TzF5BXECYc33Ru/0q0unH6lWUw4kNSURThdwI+yBVM+Wl2RCg9sxlMkNXMNZwDy3O5v 29DUcsc80q5q5HXonoXV3yeKHSh1NTdJazm0KeayO701EXplj8hwoY72D/pKVUxgdjmV IM7f2AD7teSKcYXqtjZEsfoy9eoOx9bQHrCxJD1VXkR6QAUZWGGInmuJAZ66t2HozIK4 MJvQ== X-Gm-Message-State: AOJu0YzjIHShNGjDZtWqmEfOXsiQbRzZ0LoExGZI4k5JxwbPhKaiazIA gyVTXNJHohqMTjMkJHTQMMM= X-Received: by 2002:a17:906:221a:b0:a22:dca3:4190 with SMTP id s26-20020a170906221a00b00a22dca34190mr3882533ejs.109.1703169944887; Thu, 21 Dec 2023 06:45:44 -0800 (PST) Received: from debian ([93.184.186.109]) by smtp.gmail.com with ESMTPSA id h15-20020a17090791cf00b00a1db76f99c8sm1030441ejz.93.2023.12.21.06.45.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 06:45:44 -0800 (PST) Date: Thu, 21 Dec 2023 15:45:42 +0100 From: Dimitri Fedrau To: Andrew Lunn Cc: Stefan Eichenberger , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 4/4] net: phy: marvell-88q2xxx: add driver for the Marvell 88Q2220 PHY Message-ID: <20231221144542.GA122328@debian> References: <20231219093554.GA6393@debian> <20231221072853.107678-1-dima.fedrau@gmail.com> <20231221072853.107678-5-dima.fedrau@gmail.com> <20231221141636.GA122124@debian> <59fed161-6c08-4537-b02d-19e67e342dd8@lunn.ch> 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: <59fed161-6c08-4537-b02d-19e67e342dd8@lunn.ch> Am Thu, Dec 21, 2023 at 03:25:56PM +0100 schrieb Andrew Lunn: > > Without setting the master-slave option it didn't work. I think its > > mandatory. > > I don't think it is. The PHY should have a default setting for > master-slave. Often its based on the typical use case. If its > typically inside a switch, then it should default to prefer-master. If > its typically in an end system, then it should be prefer-slave. > That would be the case if you use a forced configuration. I think this is already implemented by reading out the MDIO_PMA_PMD_BT1_CTRL in genphy_c45_pma_baset1_read_master_slave. Probably the problem arises with following lines which prevents an inital read of the configuration: static int mv88q2xxx_config_init(struct phy_device *phydev) { int ret; /* The 88Q2XXX PHYs do have the extended ability register available, but * register MDIO_PMA_EXTABLE where they should signalize it does not * work according to specification. Therefore, we force it here. */ phydev->pma_extable = MDIO_PMA_EXTABLE_BT1; if (phydev->drv->phy_id == MARVELL_PHY_ID_88Q2220) return 0; /* Read the current PHY configuration */ ret = genphy_c45_read_pma(phydev); if (ret) return ret; return mv88q2xxx_config_aneg(phydev); } If I type in "ethtool -s eth0 autoneg on" I don't have to set the master-slave option. Is the assumption here that we always start with a forced configuration ? If yes, then I have to fix it. > Andrew Dimitri