From nobody Fri Oct 17 13:27:05 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 BA57EC433FE for ; Wed, 19 Oct 2022 09:15:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233039AbiJSJPv (ORCPT ); Wed, 19 Oct 2022 05:15:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232845AbiJSJLc (ORCPT ); Wed, 19 Oct 2022 05:11:32 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F0EF8E0E8; Wed, 19 Oct 2022 02:02:59 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 2E0386181B; Wed, 19 Oct 2022 08:53:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D6EDC433D6; Wed, 19 Oct 2022 08:53:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169624; bh=XGkmMzPTDEeMhMngRVduxRnock1hXej9ySL7e00w6T0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1qsw4TpI/Vi+CzMiexYPTqPD+5y1LEVEipUdO92Z7k2WOmyytADd98FRJ7eumFAhr MA+EVqnM+A6XQaQg/Ah/ITFE5Zc9/xskttdbF/8sa3B7seps45fcw8dfDiuB6IG3FK E2CF/Gi+GkQbecx8h2+Za941O4RMmvv1JRIyoVJo= 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 6.0 339/862] eth: lan743x: reject extts for non-pci11x1x devices Date: Wed, 19 Oct 2022 10:27:06 +0200 Message-Id: <20221019083305.047086672@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@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