Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp53231lqp; Wed, 20 Mar 2024 13:27:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXZclUvvmi4KShnlAfbFrPBhpyQS5OWUX5JC3ItEQLehjYha4P8StNCtiQxp5TGkw+tHB6+5/nmDxv/M9eVOTosRkjXmiJaD1Qt+On9Pg== X-Google-Smtp-Source: AGHT+IF4yegtNhGwD8Ic4XR/gytll00aMh8zdHZWbLnX2GaqxYNwB2u7MOmyCpxGGSeFPImu+OE1 X-Received: by 2002:a50:f682:0:b0:565:9e16:60da with SMTP id d2-20020a50f682000000b005659e1660damr27970edn.30.1710966439393; Wed, 20 Mar 2024 13:27:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710966439; cv=pass; d=google.com; s=arc-20160816; b=IGb4BgS+wbPgzN6T6AQfLp6qW0SpWHfW9M3YxbVKo2jersx14EZXk9yA1VOKlaejaJ MOa89gtZbWEYcAjKzYuvWtsA+7jBig66NA5hpNhX/CdpyIYFvFR/LVoFcijtiIFucpWE bJhZMbSR037Moh6raYSB5xb24B9v2CAxmIyJSD2zUNBmGIB0EPc7hj1v2X+lcoKduKCT +O6B7IgyCTUjyAJxxNBSRH4q3xIDZAUo0oiS5v/mkUgWlbeiEmZT7BaTCkpi02IS941e WI6yae7l8l6S0O8IOkx/vxIAujLNBAV6Ubd5h2YuOSuBpW93rT7wROHO73X9oNioINib RJYg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=sW9PW9x2tpq78PgTkORMNKTzi6wA1fKqdpwgJEf8NNs=; fh=zlFnTBmEjcKjHkYJJqT31OjWQ01UVDFyonLbUfDhG7M=; b=xKNWIepZQm146JvdbbRuEu8pYQ4H0RteneJB4AWP+5cPMHV//xbxBTyPGlTtCadREJ +C19e8+C0xcwFFy2RclO4gPeLP3w82rSugvNH6EO+d1840eGQhy09DS8JjmOAUNbpc7S EG08QJaDp+zuEsWKbRSleqiEtyJsoLWyauvpCk1gFtMjTuZC1KyKWtWTgOfJqg8k1Y9w +Ry5/STo374fBnYj6a3ecwYOOpb60UbDTO9j3pMie8JfReOksv0G6jR3snAYZ0IeezIT sLUakSSZi0oMYiCUNlNsZEnAMtO6AArmo/KVlduLHm1feVr8+cT3IxfCb0b9+LsaVtlq V1lQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=GV68HtCk; arc=pass (i=1 dkim=pass dkdomain=marvell.com dmarc=pass fromdomain=marvell.com); spf=pass (google.com: domain of linux-kernel+bounces-109229-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109229-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id t2-20020a508d42000000b00568a4212e04si6618990edt.274.2024.03.20.13.27.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 13:27:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-109229-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=GV68HtCk; arc=pass (i=1 dkim=pass dkdomain=marvell.com dmarc=pass fromdomain=marvell.com); spf=pass (google.com: domain of linux-kernel+bounces-109229-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109229-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.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 C432B1F26444 for ; Wed, 20 Mar 2024 17:22:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC1E26F09B; Wed, 20 Mar 2024 17:20:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="GV68HtCk" Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) (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 A5FBB6CDD7; Wed, 20 Mar 2024 17:20:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.156.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710955249; cv=none; b=mk+LAyhBbedRRAUW7EjrX6R8AdMLcCX8jU4UALn7NyGSHpCmKRTQOHHHfeNdiN/WBRv0d83D3rXBOXIMHU3mfdFdXoj5lwf4i3ic2DR8474z+jK8AS4kj92jd5fEn37pjIfU05bDM0tIDRXthPk5XFmUOD5ds4New/AT1mJu27c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710955249; c=relaxed/simple; bh=q3Eoe3HwZcr+BKmfzkyBcxUaWH/JJnCtsp+8KtLyrc0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=D1Gymk5JxmAoDFNs9x30vdABCz8Ip+HmXp4WocOT4UKfcwkJK9+CSUfqR5uedL4UjlWR+XJpZLKhLXl3US5GnbJtzy2Px6HgKgfzu2EBxkC1yme1G8AentxuCHCgaE3IWAw2Z07ACC9lHQMZLQ+qGt4OyH6F+1Hy4qowdqNoN4g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=marvell.com; spf=none smtp.helo=mx0b-0016f401.pphosted.com; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b=GV68HtCk; arc=none smtp.client-ip=67.231.156.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=marvell.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.helo=mx0b-0016f401.pphosted.com Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 42KFCX8S003415; Wed, 20 Mar 2024 10:20:34 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s= pfpt0220; bh=sW9PW9x2tpq78PgTkORMNKTzi6wA1fKqdpwgJEf8NNs=; b=GV6 8HtCknu3vaB3j4kcCo1TPQlIrcR8YimvTDeNwPXZhlxWEtO1Ipi1yT1Eidnth6PH Abj1ZyIUahSHcWZGt0peJgtNGCptYtZBLvUdqiB5X0eM0RrHgcmeiIB6QnuZoCtw 2j8xAO76ouAcEjAwICnWTvu0+ce5/BDDO3vBjVhKGWcm2pNtLnEycIyhrAhf3tuk HwFy2XDHFBfXyZ1azcuyVx8FbiNrCootfr+t4UQiI/aTKBf7R1uoopwazLxjbK3P 7d+ymrkUSHjo8EmEOBKFOTl6BCRfxPF7CbfwMCrFxH8D0AvyKYF1jgm8cLRnQHPR hw/rO37KVjLXkhIZlcQ== Received: from dc6wp-exch02.marvell.com ([4.21.29.225]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3wxka52e43-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Mar 2024 10:20:34 -0700 (PDT) Received: from DC6WP-EXCH02.marvell.com (10.76.176.209) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.32; Wed, 20 Mar 2024 10:20:33 -0700 Received: from maili.marvell.com (10.69.176.80) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server id 15.2.1258.32 via Frontend Transport; Wed, 20 Mar 2024 10:20:33 -0700 Received: from dc3lp-swdev041.marvell.com (dc3lp-swdev041.marvell.com [10.6.60.191]) by maili.marvell.com (Postfix) with ESMTP id D86A65B692A; Wed, 20 Mar 2024 10:20:29 -0700 (PDT) From: Elad Nachman To: , , , , , , , , , , , , CC: Subject: [PATCH v2 5/5] net: marvell: prestera: unbind sfp port on exit Date: Wed, 20 Mar 2024 19:20:08 +0200 Message-ID: <20240320172008.2989693-6-enachman@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240320172008.2989693-1-enachman@marvell.com> References: <20240320172008.2989693-1-enachman@marvell.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="UTF-8" Content-Transfer-Encoding: 8bit X-Proofpoint-GUID: wApieGSGS-BxHIsYjFagktKnev62dGE5 X-Proofpoint-ORIG-GUID: wApieGSGS-BxHIsYjFagktKnev62dGE5 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-20_10,2024-03-18_03,2023-05-22_02 From: Elad Nachman Call unbinding of the sfp port when ports are released, This will call phylink_destroy() to cleanup and destroy the phylink instance, needed to unregister SFP and free used memory, which will otherwise leak. Reported-by: Köry Maincent Closes: https://lore.kernel.org/lkml/20240312164526.4a0e242a@kmaincent-XPS-13-7390/ Fixes: 501ef3066c89 ("net: marvell: prestera: Add driver for Prestera family ASIC devices") Signed-off-by: Elad Nachman --- drivers/net/ethernet/marvell/prestera/prestera_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/marvell/prestera/prestera_main.c b/drivers/net/ethernet/marvell/prestera/prestera_main.c index 87d8fc4162b3..20c0ebb52af8 100644 --- a/drivers/net/ethernet/marvell/prestera/prestera_main.c +++ b/drivers/net/ethernet/marvell/prestera/prestera_main.c @@ -756,6 +756,7 @@ static void prestera_port_destroy(struct prestera_port *port) cancel_delayed_work_sync(&port->cached_hw_stats.caching_dw); unregister_netdev(dev); prestera_port_list_del(port); + prestera_port_sfp_unbind(port); prestera_devlink_port_unregister(port); free_netdev(dev); } -- 2.25.1