Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3399223rwb; Fri, 30 Sep 2022 03:04:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4gVSZnmW0+rXtlIIxTksvQpOpb8FxI4PaOI1j6ibxA42/2riMTdvYFWf79tUU8R7nftGH/ X-Received: by 2002:a17:906:8251:b0:781:8016:2dc9 with SMTP id f17-20020a170906825100b0078180162dc9mr6049952ejx.488.1664532267997; Fri, 30 Sep 2022 03:04:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664532267; cv=none; d=google.com; s=arc-20160816; b=IqmEnTWHglrUypOBBsludvimkaNhZtcWrDDetNYMJntagKP/tjXx4+njJAoL27EEaT PTRiKbi3F8apnhIKz9vtCn0K2Y2K36963uv5J9Km9ltqH3omwGFhr1QvpscuJbdvuvRY /axn3F7zoTz1TY5VNo+zk8IlPYpm2DWrxEYOoIU4SaxqQhkdEgT+uJPszWFFi6J6SuGh ChwhB+DZ9l7fcy68KtgkTRQDsnP++8HDaphoetvyEm5bhcJ3RkV/OALwr3M1WlcFmvMo 8rI+vujUrtqj5Ep8aZYb+3e0tNVVRgyG9dy+hf31KfhN6vVtW5MuCBK42wi4vB+hjab7 78pw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=/AEWGUC9Kp7r7jktjSUBtANz4xrBk4xlW3tZ0Mg2lds=; b=j+UPJcDilgRulIBFAaurl417xCdZBYoZDA7iri6UKGgFlnZDijEObgHKhtjAOYyvYl GZCAk3AEaE3U6riuTl79KHmNnFKQ1J1ljaPEHBfaTVDyoRyLu6eR21cbvrhUsjcQdioF 2A3QAcbw6UfuyNVWeZ3LOgseZI6tQatm4TBeUffaO9CTFTNNrrYC14XnA4TFrjKhEVVn 11SeqQmPcjNgf3xhZkdk/sVut2mXvPEeN3d53xCXqYb0VL5kZcOY5p+LfeAZ6b2gqAZi H0ZjNciBILfY3pT8AdQqtVYtfz4LKLR+u4GHbuGZ0IiB1aV5/N3/jwBx0tsdQX3Q1yyy ng8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=sRdr9eXX; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b96-20020a509f69000000b00450f56cd37bsi1625123edf.175.2022.09.30.03.03.59; Fri, 30 Sep 2022 03:04:27 -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=@microchip.com header.s=mchp header.b=sRdr9eXX; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231177AbiI3J2B (ORCPT + 99 others); Fri, 30 Sep 2022 05:28:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229981AbiI3J17 (ORCPT ); Fri, 30 Sep 2022 05:27:59 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0A96201931; Fri, 30 Sep 2022 02:27:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1664530078; x=1696066078; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=06Xbmv620CsGGAsAg6PM90IvXhrNtfGqmlVvRMXVv2c=; b=sRdr9eXX7RAhNq27/NqW5vUFRQ+Z9CppVs2AYyY4yPbp8DR01Kwk1MmA Sc2j8R2/T9hItSbdPCkvXVKskEyECFgm6XeDBe3VGgTpsqLBk2AEan1P9 ph2Ri01XF4OFTc/0IC4kMQBj+H0lnY4+r6p8f71C0VxfXGS4sSvhLmacb ASX/x4ooTbKMCy51ssuQ6p0BbGYIUTubt069TauLgP01UptOG9nOQES6r hgMPT6fDV1tJgNU4RiBkU676Jvv2A/fazD5uX7rhbXL/wUOU7FegPd0xr PFXFQlR5eE3FQ5EpLwhj2BN3V8WFHnpIo15269tf+sbJK7Wo7gn6Mk3Td w==; X-IronPort-AV: E=Sophos;i="5.93,358,1654585200"; d="scan'208";a="182660408" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 30 Sep 2022 02:27:56 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Fri, 30 Sep 2022 02:27:56 -0700 Received: from localhost.localdomain (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Fri, 30 Sep 2022 02:27:53 -0700 From: Raju Lakkaraju To: CC: , , , , , , Subject: [PATCH net V5] eth: lan743x: reject extts for non-pci11x1x devices Date: Fri, 30 Sep 2022 14:57:40 +0530 Message-ID: <20220930092740.130924-1-Raju.Lakkaraju@microchip.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,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 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 --- Changes: ======== V4 -> V5: - Remove the Reviewed-by tag added by me - Correct the Fixes tag subject line V3 -> V4: - Fix the Fixes tag line split V2 -> V3: - Correct the Fixes tag V1 -> V2: - Repost against net with a Fixes tag 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.25.1