Received: by 2002:a05:6a10:5594:0:0:0:0 with SMTP id ee20csp104562pxb; Mon, 25 Apr 2022 06:40:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+JgI4uU7UfiBstZL2lIMXn2ySd+BgYAecskayUK2qliyMxIvtv38Hn69EiEiRivy9gArz X-Received: by 2002:a05:6402:458:b0:418:78a4:ac3f with SMTP id p24-20020a056402045800b0041878a4ac3fmr18840346edw.196.1650894034368; Mon, 25 Apr 2022 06:40:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650894034; cv=none; d=google.com; s=arc-20160816; b=ZCgJtRFTkmas/F918V1jB3JxEN2PSSTTxYQhxtXlMVKa2OfFpHpNNK3iPsrw1+x6kj FwqPVwSnGYVVDeft3BCd6Mo47kjfBLslSIFGqcGITg/TxsmEhzo+o4tKX8q6J4PEoYji 5bC3hBzj+VrBkBCjpmmgf2QzgZsG016O+ocWl/J2r5ONs3niicr8/b4hhVeOFmF3krBU hxH7ugZ3G5ai/1YwaZcP9ZZNmhn2ZnJyQ33wYsU4yEkBxpIP/yhsoqHW/k62GKy08RWy HLc1/UYnmkUYt+pWBPY6D5M3t40Knt9U20UXdA0IkU3d3IVsDfvZnOL+VtZowOiWanxO 8ldQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2m8drydlZfY0TEFrmoY9dyK9tzLAG1kycS2mCSsc7Kg=; b=k6IZb9LVad8+65JQWGVOMVNHF30U/859khcB1Oh4OhGRG0eXizzFcQPYMKvHIvmMpj zBpHKHWVmo1MzByfbs432Fz6vH/RP22b3ly6mYCxKxOL/T1tbLpgmBsN2lONJNduoiJJ /qrkMYgYyg7aQkvZ7ozRQmQirR7CZDVL9ViwqV2Z9Oaz4S5TJQhg9gW7DDEGyVmCkY2i NpL0HvCWNwqJmROCB++8kEZR6IQzi1/sbD/l2SzwS/Jr0gqhe289XkXmOz9eSz1dksbw jv5WKOU4+it8+h/vI1fUcZpSiaaIcWfkLlvEdbxO+//feZWvqSEGtLd/ioe+nGV5OM8E ehLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@metrotek.ru header.s=mail header.b=OygH9PCI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j8-20020a170906430800b006e7111d4ab0si12856339ejm.178.2022.04.25.06.40.05; Mon, 25 Apr 2022 06:40:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@metrotek.ru header.s=mail header.b=OygH9PCI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241062AbiDYEmB (ORCPT + 99 others); Mon, 25 Apr 2022 00:42:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241046AbiDYElu (ORCPT ); Mon, 25 Apr 2022 00:41:50 -0400 Received: from mail.pr-group.ru (mail.pr-group.ru [178.18.215.3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 453111EEE4; Sun, 24 Apr 2022 21:38:42 -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: in-reply-to:references; bh=2mjX0OzZBY3rlbKbLExUJUebHgkF1v+WvCOVbppC/gU=; b=OygH9PCITUQEoEaTSc6Yjj5xDiAx/MxNAz0WU3ze51Pd+3WFd1nADfrLWbJQVkKzUJ9xUsXzXKKXX OiLN1UOdM2+VGz4xoN/V4mhlBoZyL2LWJiW+8L1VH9QntKsJzi22XD22pXuzaXmCE/wHYiA803fVzb hYNowahRmfy/qz4rKSzbdwr9tlE1eSOrjgfop84iDobML9Fxmxl6r2maTiAetwZGTFAUpehPYET+hA 3hMHfWgppyrTaNhfXPZ/Bd9r18kYakr9+q/G1ssyKqpy0cBkhUqYpOTpT65l7ckyACBMsbR3Wxj83v TAVf7mR1iB6Z4eS5YK0R6/QP7Fz1h8Q== X-Kerio-Anti-Spam: Build: [Engines: 2.16.2.1410, Stamp: 3], Multi: [Enabled, t: (0.000014,0.006138)], BW: [Enabled, t: (0.000016,0.000001), skipping (From == To)], RTDA: [Enabled, t: (0.096440), Hit: No, Details: v2.36.0; Id: 15.52k65u.1g1fg6bp9.30mfi; mclb], total: 0(700) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Level: X-Footer: bWV0cm90ZWsucnU= Received: from localhost.localdomain ([178.70.36.174]) (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)); Mon, 25 Apr 2022 07:38:04 +0300 From: Ivan Bornyakov To: i.bornyakov@metrotek.ru Cc: Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, system@metrotek.ru Subject: [PATCH net-next RESEND] net: phy: marvell-88x2222: set proper phydev->port Date: Mon, 25 Apr 2022 07:16:37 +0300 Message-Id: <20220425041637.5946-1-i.bornyakov@metrotek.ru> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405150305.151573-1-i.bornyakov@metrotek.ru> References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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