Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp258535rwb; Wed, 28 Sep 2022 02:12:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM555/6T5HRjkBTT9L+D7zn0R+x5Jfkn1i3YpGU5m0cY3Y6ZGdq/z5eb5zB2ac93CxvBW6m2 X-Received: by 2002:a05:6402:1394:b0:456:97cd:e9d4 with SMTP id b20-20020a056402139400b0045697cde9d4mr27216140edv.174.1664356375532; Wed, 28 Sep 2022 02:12:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664356375; cv=none; d=google.com; s=arc-20160816; b=PIfRi0RT1PaEguyDnpYGSDFtHmw8aFe2YzA1rRzaS8KUdgTZJfTOccXX+PukSFIhFw cpVUoLbQyFoD6wtqJeQH/VmgtZpeDf5GReV9WIV+wlN3VCKgQxtffpakSovFBF5Xj+uK lwcFXwKrjqyRBKVsE2OLt/itpR6arFzkpgabS6OG98Wxh2i103iXS9jOnGq/1aKrcXWT ypLHq7nA6ZwxA6GmpeND9tXbmzVEwgMOtXj7AiqP0zTi6Lb8uAffJJ93+ieYL11eB0+M dHAzgf6RuyLPKZG5/0ybBQQOwNbLkUMxh+1S9G1UTLEMUrIsIQXA8v4e/07s4boZGrCX tarw== 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=NBUW3bgEidt/b3eQgxZ7q69t9JUT8J29MYdEvFOYGVM=; b=pg37QM1FBjs/eQw51NxPzZ3UfbnKBONQ3Ye0rG4Lb/TteHPdttBZJL8fHc7NyP19/F xTZD/JIa4Tew0VjsmhF/yKb+measlckHiCnA9sNjibilCInyvEPpjCv5Qy5bNuc51d6d zdWxcAcWST2MHqE6zDKgAReSkZURCEeev4Zwr9zPe8cINPz7n5Iy5E3njv+KeMNYQ4IF 14Herm067AQXr+AvY+fAjDmJlgUjiSOUilQEjNn0fMSIrjcA22XfjbrGHDa4tlfrccQm BhxSwMf4NWf7uaASYbdB0po2emj6c+HPMTQbX2sHJrbQMK3uSn2eiiISxvZPl7mZufT3 oDzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=G0UWz0qa; 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 xj8-20020a170906db0800b00731010c202dsi4498533ejb.764.2022.09.28.02.12.29; Wed, 28 Sep 2022 02:12:55 -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=G0UWz0qa; 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 S233082AbiI1JDz (ORCPT + 99 others); Wed, 28 Sep 2022 05:03:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232524AbiI1JD1 (ORCPT ); Wed, 28 Sep 2022 05:03:27 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CCC8DF6BC; Wed, 28 Sep 2022 02:03:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1664355807; x=1695891807; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Mul5fKbvrZirdXc2DPavwIBXeg0wFX60axpkVvIhWvw=; b=G0UWz0qa0Ikj5qwlsTRDHfZjogHW9Mfk1pvjTRyXgETgPAPBJX78dN0I JdjZtvM/iHmPwbnu2jnh3VeSO+jwIpE9T+PA3KFR5YE+N4xWjjiGPf+hq xOHUdinVk04AwrBKjfrpNZB7k5MBVHhA3YvvUXKRogt8gVvvqIiXtP1TX fYyP7V3UNws+TlU5y6i+jhzTymnzslWog32BZ9qznKbSiYLDRaV0V8jN4 e8HBurQ2uiHNMb1+lld258tkAZNF1vDYUl3mkLzKOvH+HyNja0PLt//vf cetf6L0WBY3/rASyrbS6hmYf+m8AL8MpUVHi+4lBwuYKIdBYToY0Zg/DQ w==; X-IronPort-AV: E=Sophos;i="5.93,351,1654585200"; d="scan'208";a="182292739" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 28 Sep 2022 02:03:27 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) 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; Wed, 28 Sep 2022 02:03:25 -0700 Received: from localhost.localdomain (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Wed, 28 Sep 2022 02:03:22 -0700 From: Raju Lakkaraju To: CC: , , , , , , , Subject: [PATCH net V4] eth: lan743x: reject extts for non-pci11x1x devices Date: Wed, 28 Sep 2022 14:33:11 +0530 Message-ID: <20220928090311.93361-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 ("Add support for PTP-IO Event Input External Timestamp (extts)") Reviewed-by: Jakub Kicinski Signed-off-by: Raju Lakkaraju --- Changes: ======== 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