Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1098735pxb; Wed, 6 Apr 2022 08:41:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEKjvOfMnTKyBhQCvudoZqoRroxH4v71HwdSN0ZvjzW/P0lbqvjgLtzKVi3SHpjoIR9Njv X-Received: by 2002:a17:90b:4a01:b0:1c9:a552:f487 with SMTP id kk1-20020a17090b4a0100b001c9a552f487mr10854926pjb.68.1649259665716; Wed, 06 Apr 2022 08:41:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649259665; cv=none; d=google.com; s=arc-20160816; b=WKCLAanukfRzGS24inKRpQQyQiAA6PTW0CNz0pXpXSdfFGNiVnXRF+3PuyjDV0T62P Wyqxfr9+KMQbilDtTPyDPoVcMQBN2VKNtm5QFOXFwJDhBixyp6UPsA2nNX0xYhN2a247 3mJYtcs7+BBF0NNzh5p6fB217nsv1lP1ieUqvk92o2s7iPQfDcysnCHM3njUNSllo4Yy xrwiu2n8p3zA4gUg51rcVROS7Xx3ncCakpVjQBcuyb0oqvMdCif7W12GLU6aaKWQsLtj jf/RCfgzbdVofWlRqY1oYvyY6kvftv0fMKo1KPY3f8CXVLqBuvb4XOnuvlLaxTtMLLHS j8ag== 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=naIyrSn6hWaZQgGms4yXbwaTNt4D9TYJa4DrQ+U9ZMk=; b=C2HMWGEeJ+Iv9UUyzRBAixbggJ2gLJj5Xyh3lZv/5j0Qui/kpn7vL6muV2eayc8eRV Zfdl26nT+QNzuSNbsuclTnqumcJ//YhStsiauYpxnWjS2IUp3mDvlz26nIb2GlX74/kA eEcnfvlTkP345Y2ZIzJNvRz2tsNAIi0dY3yd+a9aiR1fAW7XcLnFV5poSfISvWRSsmZL rRhRMwM+8va/nqcfo6kzUhEBDIvscl+7JhhDiCyt6FahTGzFYFK+osFiOcYXdhyZrym+ xSm4658jnvoF2cq/DS1W+IntQSog4H2YV8b6OnYx3vE5fl6aFEIxC8k9rfRJQsyJy0WH lkCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@metrotek.ru header.s=mail header.b=VpHybvzS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id bj19-20020a056a02019300b003993e756396si6947956pgb.807.2022.04.06.08.41.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 08:41:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=fail header.i=@metrotek.ru header.s=mail header.b=VpHybvzS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B0B6197B83; Wed, 6 Apr 2022 06:57:16 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233918AbiDFN7H (ORCPT + 99 others); Wed, 6 Apr 2022 09:59:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233907AbiDFN5V (ORCPT ); Wed, 6 Apr 2022 09:57:21 -0400 Received: from mail.pr-group.ru (mail.pr-group.ru [178.18.215.3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 348F7362FDE; Wed, 6 Apr 2022 02:09:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=metrotek.ru; s=mail; h=from:subject:date:message-id:to:cc:mime-version:content-type:in-reply-to: references; bh=2bYtZaY82UR+toaii6rgTQB2neDCnsVr9ZEMwIx3gBE=; b=VpHybvzSO3sJrDCGfrS+4p8/OyKo7WnJ2YQdpUZRiHkbC0oIohsCKP7QH5dGR4DN+EJlNyIrvEbDg krZnJ1dMl/x8NGrpj9o6sA1ej/VIF8QkOn6QGNEtqk3ed/Ww0BtutQnJ0rbi4zwpLuUUolkZxnUfrz TcvgjoqOtHB5FLpappca3IS3vM6iJQuA1YDAfCygfJ4gWFJxWklEkpsDFiqaPdybsfiooWRfzjD9op wD/jsNI9K+2/TNjhDgNqOWTwC8xt3svZMbHYzNvA1nelokFE8gEGcza8Xg50hHyWbWFdHVhGZeH0ZG 4hSAi5Q2mpyK2GieI7mE6zNF2YAa4Pw== X-Kerio-Anti-Spam: Build: [Engines: 2.16.2.1410, Stamp: 3], Multi: [Enabled, t: (0.000008,0.004499)], BW: [Enabled, t: (0.000016,0.000001)], RTDA: [Enabled, t: (0.065283), Hit: No, Details: v2.33.0; Id: 15.52k7j2.1fvv2599b.8gs; mclb], total: 0(700) X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: X-Footer: bWV0cm90ZWsucnU= Received: from h-e2.ddg ([85.143.252.66]) (authenticated user i.bornyakov@metrotek.ru) by mail.pr-group.ru with ESMTPSA (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256 bits)); Wed, 6 Apr 2022 12:09:15 +0300 Date: Wed, 6 Apr 2022 12:09:08 +0300 From: Ivan Bornyakov To: Andrew Lunn Cc: hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, system@metrotek.ru Subject: Re: [PATCH net] net: phy: marvell-88x2222: set proper phydev->port Message-ID: <20220406090908.mkpvndnsby5f3473@h-e2.ddg> References: <20220405150305.151573-1-i.bornyakov@metrotek.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Tue, Apr 05, 2022 at 06:14:11PM +0200, Andrew Lunn wrote: > On Tue, Apr 05, 2022 at 06:03:05PM +0300, Ivan Bornyakov wrote: > > phydev->port was not set and always reported as PORT_TP. > > Set phydev->port according to inserted SFP module. > > This is definitely something for Russell to review. > > But i'm wondering if this is the correct place to do this? What about > at803x and marvell10g? I guess them need this too, but I only have HW with Marvell 88X2222. > It seems like this should be done once in the > core somewhere, not in each driver. > > Andrew Apart from sfp_parse_port(), sfp_parse_support() and sfp_select_interface() are also present in all sfp_upstream_ops->module_insert PHY callbacks.