Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3885490rwi; Sat, 22 Oct 2022 01:32:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7nN3FU8kWB0WF64X8qCSnRhCwXSjLN6xxQSYRtVGPsObzYqdwLw8AOrQzGbqRIsZKZBwno X-Received: by 2002:a17:906:6a09:b0:78d:ed9c:d880 with SMTP id qw9-20020a1709066a0900b0078ded9cd880mr18457258ejc.424.1666427573567; Sat, 22 Oct 2022 01:32:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666427573; cv=none; d=google.com; s=arc-20160816; b=rwAEr2HPOH7AQVTzRN2J8wcuNXivGZ+AKoRxsKCv40VLS3f4GEqLqc5GxZZslfUx5p 1c7W6LoHe3tKps+inbHK5Ric4YklRq1If1g3dQ/HT6dBS7HzKgY33DTI4RXjmZoIPazv 9deoC6KUszeqzZ8intFl3R/T/gJB65iyuH7aw+qmOV702mE5E1qIENJlsl4GmUBiIel/ MaHb00f4BAWCSNGAwNNH1lv8hQ+nO7zBjvL7sFE65WPmIgU832kvzstrdxkG1MzvyJ4Q SWRtgPXoXSDxGnz53wrUxlq7qeFQgaUL7i+g4lv5hzIjchyvH8+uSuBMcT3Z2G4kcjMN HcCQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ho6-20020a1709070e8600b0078d484e0e79si25783722ejc.481.2022.10.22.01.32.28; Sat, 22 Oct 2022 01:32:53 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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: -- 2.35.1