Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp779631pxb; Tue, 5 Apr 2022 23:00:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGiPzUk8khvoOFbjYHY7nsR64Ix4n7S+eAdDk+m6lLce1qjurkhIc+FQwtT8iA54R2+uaj X-Received: by 2002:a63:7f15:0:b0:398:5224:9b52 with SMTP id a21-20020a637f15000000b0039852249b52mr5779814pgd.249.1649224856602; Tue, 05 Apr 2022 23:00:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649224856; cv=none; d=google.com; s=arc-20160816; b=Qj35sHXjySB5pa8IeyKFLnMOMAE3d0ApV7CM5A8PoF3znS9hqumK/vLuMKRqLrDXC2 1sBxyR7731sYvN/FW0mm86xFkjIhEhtSdQcaMOgxAbWmE3VPTlyx59Cl1mxWeJ13OIFO ScZOrjKn7vzwaQZdpUedD1AWv+MkDg9fTfCXPjSyAfI0mVpYxBAaayhfX+ZnE9nRYytf OCgrZaxWw2EI4MrVhqSFIEucdiR6yvvRE5MXs5zndkhOs4mpikj2q5hyPcI2uvlSKMLe HsTLTkPdcUY8oeQXS6NMCLPQjDAOFg1aSzkmZsl2k9/Btvg3ttdzcHhsTeUnFf4bVvEn vPKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=2m8drydlZfY0TEFrmoY9dyK9tzLAG1kycS2mCSsc7Kg=; b=RUwV6hOAZJkEt11A4MaKJreem5bKeW1MWm6ahmv0/YIQNVF10fwDbgLSMXes7GKJBr id8eNsI3Z8eNejDBjMoMjXVRMPh/vaztQvXCD5am3+GsVsZPaPW2cGSMjOXkVLYyYUAw x4uPYIQPiAThFpVU+tYxb6vzwj4Z5lkx+1/02gibWgwkMyub2izjN15ushrrQYrObCa8 r81nj8GeAn+CzSh1OHDumUtKKKkiwkYzb9IFrfZve/+Xx5Vz7Ct87H/p4Kg/5qOHLayC O7oItVeIkcbIgA0MGUA4FtEbWJeYnJta4BOUldPgQD81NdmQiZ/32qgcKi0C/vNbOlTX d/MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@metrotek.ru header.s=mail header.b=f1KXC0gb; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id a1-20020a655c81000000b003816043ef4csi14901514pgt.321.2022.04.05.23.00.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 23:00:56 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=fail header.i=@metrotek.ru header.s=mail header.b=f1KXC0gb; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 C096E3A4F8F; Tue, 5 Apr 2022 22:44:01 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344638AbiDFBfz (ORCPT + 99 others); Tue, 5 Apr 2022 21:35:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1454559AbiDEP6j (ORCPT ); Tue, 5 Apr 2022 11:58:39 -0400 Received: from mail.pr-group.ru (mail.pr-group.ru [178.18.215.3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86916443EB for ; Tue, 5 Apr 2022 08:04:52 -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-transfer-encoding; bh=2mjX0OzZBY3rlbKbLExUJUebHgkF1v+WvCOVbppC/gU=; b=f1KXC0gbAa1Sl5wYmkACVrUj+W0Pyz2+qiG45PzK/KYG3AzFM/qjbCmrkozTnZFFrdWyCiODBitvp XwQ2l9EGHebaSkK13kVX6jVbPN3cw3Cz9be7wSYeyTUMJr7XIO2Eay1TDGzzNlHrHo4EkfiFeMHVZz SGBUoZLoZ591yvW5rqDKbwdsVuOHI0qN5BzsOmGEQe+4ZRODUNGF8BD41Umpom96LGx189Ywd50LBK hWnfnsLnCQ4I4g+aNX9peK02YPEfGsoRQs3Uv/4GnK8LXVyPljetSy6BoWtsQitpGXUG4JyiYe25PT zWjua6QcyjzI5eUMFPn3uRVU9l50nQw== X-Kerio-Anti-Spam: Build: [Engines: 2.16.2.1410, Stamp: 3], Multi: [Enabled, t: (0.000008,0.005307)], BW: [Enabled, t: (0.000013,0.000001)], RTDA: [Enabled, t: (0.070428), Hit: No, Details: v2.33.0; Id: 15.52k5sq.1fvt4228p.1g3j; 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)); Tue, 5 Apr 2022 18:03:59 +0300 From: Ivan Bornyakov Cc: andrew@lunn.ch, 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, Ivan Bornyakov Subject: [PATCH net] net: phy: marvell-88x2222: set proper phydev->port Date: Tue, 5 Apr 2022 18:03:05 +0300 Message-Id: <20220405150305.151573-1-i.bornyakov@metrotek.ru> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org phydev->port was not set and always reported as PORT_TP. Set phydev->port according to inserted SFP module. Signed-off-by: Ivan Bornyakov --- drivers/net/phy/marvell-88x2222.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/phy/marvell-88x2222.c b/drivers/net/phy/marvell-88x2222.c index ec4f1407a78c..9f971b37ec35 100644 --- a/drivers/net/phy/marvell-88x2222.c +++ b/drivers/net/phy/marvell-88x2222.c @@ -603,6 +603,7 @@ static int mv2222_sfp_insert(void *upstream, const struct sfp_eeprom_id *id) dev = &phydev->mdio.dev; sfp_parse_support(phydev->sfp_bus, id, sfp_supported); + phydev->port = sfp_parse_port(phydev->sfp_bus, id, sfp_supported); sfp_interface = sfp_select_interface(phydev->sfp_bus, sfp_supported); dev_info(dev, "%s SFP module inserted\n", phy_modes(sfp_interface)); @@ -639,6 +640,7 @@ static void mv2222_sfp_remove(void *upstream) priv->line_interface = PHY_INTERFACE_MODE_NA; linkmode_zero(priv->supported); + phydev->port = PORT_OTHER; } static void mv2222_sfp_link_up(void *upstream) -- 2.25.1