From patchwork Sat Oct 22 07:22:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7371 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1096041wrr; Sat, 22 Oct 2022 01:04:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7LUfOeOElY7DINg1OB/kM3T4Yg6wVnE3ci/bCGr3Wt5DGlxzRlvt/mt9cJvqlrZLN/pRzW X-Received: by 2002:a17:90b:1d8c:b0:212:e08d:7390 with SMTP id pf12-20020a17090b1d8c00b00212e08d7390mr2743862pjb.168.1666425839189; Sat, 22 Oct 2022 01:03:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666425839; cv=none; d=google.com; s=arc-20160816; b=H/1YryRIOoSPzW4sIadMpCcNrdVkkNXKRVBzBn7/EcXomXAAaeJPjSE7IOnN0ip2P8 fQXDrfPs28quBJeYyWikgDhNTU72vbthHCMvfMr/cchl+Du8OeTHqygxRxPtNcsxJKwR bIZPUdIezjgd8qOr9o5QMyuPeiDKgJ1zuUGa+YwrSvLXioe+fk9hwZSKz8m3WigrxN9l 8IPJDzjplyvnXUkRY8ixdc4s7PAqQnnekojxey+iozCzFOrPs9wA0cbC+3nMt7a8dm04 21PoDE9iD7w3x+G6z1pXsPL/8C/CcNTj+0Jh63x1hurhtrSghKL8pcAq8jCq1P8LEHXr /R1w== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/jEnyGqp+5UM9rxW0zL6ebiol0WSNs70t1/LnQqcBzE=; b=FQQMeOpzPiwJsdBdCdg8Mt9zlzvobwuh7ojDMA+K5qbzJ2x7B7qPaIiIzwYtzUt4uD 4hHGSBQsb3Nc4nicFWAsVqYyUBk8IAVvofQ+WnftaHD0LZ+1fq6leny80Y6ZJ/X4TxOD 8c8M8UkKuS1CffBnXCovZjmWnC3GiBq7+lwV+GRQYMtuzV1OP6YeUCnJHdy22Df+QlpC HA+ZIHtOiS8tlu+oUc3R66enk7eraJ7pB3jFgJS+UHK+Gt6VSv2rCxXYjMPLR7SS3D5f VIk1G/hNN0bgS8RtY///vjlVOsIFhJlsgTeGxhJwko/kyFFgTOa/KLlVb2oi3oO/FRHU xUHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Q6Uoie7n; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t187-20020a632dc4000000b0045ec918ad38si28838029pgt.548.2022.10.22.01.03.46; Sat, 22 Oct 2022 01:03:59 -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=pass header.i=@linuxfoundation.org header.s=korg header.b=Q6Uoie7n; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232511AbiJVID0 (ORCPT + 99 others); Sat, 22 Oct 2022 04:03:26 -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 X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747374140935865928?= X-GMAIL-MSGID: =?utf-8?q?1747374140935865928?= From: Raju Lakkaraju [ Upstream commit cb4b12071a4b68df323c339f60805834246b3e9e ] Remove PTP_PF_EXTTS support for non-PCI11x1x devices since they do not support the PTP-IO Input event triggered timestamping mechanisms added Fixes: 60942c397af6 ("net: lan743x: Add support for PTP-IO Event Input External 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/ethernet/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 ptp_clock_info *ptp, enum ptp_pin_function func, unsigned int chan) { + struct lan743x_ptp *lan_ptp = + container_of(ptp, struct lan743x_ptp, ptp_clock_info); + struct lan743x_adapter *adapter = + container_of(lan_ptp, struct lan743x_adapter, ptp); int result = 0; /* Confirm the requested function is supported. Parameter @@ -1057,7 +1061,10 @@ static int lan743x_ptpci_verify_pin_config(struct ptp_clock_info *ptp, switch (func) { case PTP_PF_NONE: case PTP_PF_PEROUT: + break; case PTP_PF_EXTTS: + if (!adapter->is_pci11x1x) + result = -1; break; case PTP_PF_PHYSYNC: default: