From nobody Fri Dec 19 22:03:24 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35B5AC04A95 for ; Sat, 22 Oct 2022 08:03:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232519AbiJVID1 (ORCPT ); Sat, 22 Oct 2022 04:03:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232440AbiJVHy7 (ORCPT ); Sat, 22 Oct 2022 03:54:59 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DE6D2CA7E8; Sat, 22 Oct 2022 00:47:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8BFF5B82DF6; Sat, 22 Oct 2022 07:47:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07D6EC433D6; Sat, 22 Oct 2022 07:46:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424819; bh=XGkmMzPTDEeMhMngRVduxRnock1hXej9ySL7e00w6T0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q6Uoie7nRMhsn181Q8m/3TqZCpalbg4BrsAroshjsmSyppy6Sno3lsRIAZriY4buO AaY3nuyyEvBKh1tCzt4vbkbMa8mIUovxI7cYm9edGsn4ng4ilRwJh7XU/p2S6n/T9O jMuKzqDw+466V0aXKfIYcWPL81AZeyIm2rD3bEjQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Raju Lakkaraju , Horatiu Vultur , "David S. Miller" , Sasha Levin Subject: [PATCH 5.19 288/717] eth: lan743x: reject extts for non-pci11x1x devices Date: Sat, 22 Oct 2022 09:22:47 +0200 Message-Id: <20221022072504.477747120@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Raju Lakkaraju [ Upstream commit cb4b12071a4b68df323c339f60805834246b3e9e ] Remove PTP_PF_EXTTS support for non-PCI11x1x devices since they do not supp= ort the PTP-IO Input event triggered timestamping mechanisms added Fixes: 60942c397af6 ("net: lan743x: Add support for PTP-IO Event Input Exte= rnal Timestamp (extts)") Signed-off-by: Raju Lakkaraju Reviewed-by: Horatiu Vultur Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/microchip/lan743x_ptp.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/ethernet/microchip/lan743x_ptp.c b/drivers/net/eth= ernet/microchip/lan743x_ptp.c index 6a11e2ceb013..da3ea905adbb 100644 --- a/drivers/net/ethernet/microchip/lan743x_ptp.c +++ b/drivers/net/ethernet/microchip/lan743x_ptp.c @@ -1049,6 +1049,10 @@ static int lan743x_ptpci_verify_pin_config(struct pt= p_clock_info *ptp, enum ptp_pin_function func, unsigned int chan) { + struct lan743x_ptp *lan_ptp =3D + container_of(ptp, struct lan743x_ptp, ptp_clock_info); + struct lan743x_adapter *adapter =3D + container_of(lan_ptp, struct lan743x_adapter, ptp); int result =3D 0; =20 /* Confirm the requested function is supported. Parameter @@ -1057,7 +1061,10 @@ static int lan743x_ptpci_verify_pin_config(struct pt= p_clock_info *ptp, switch (func) { case PTP_PF_NONE: case PTP_PF_PEROUT: + break; case PTP_PF_EXTTS: + if (!adapter->is_pci11x1x) + result =3D -1; break; case PTP_PF_PHYSYNC: default: --=20 2.35.1