From patchwork Wed Oct 19 08:27:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4782 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp215823wrs; Wed, 19 Oct 2022 02:16:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5jkIxZrObawgVluHWZfooQmZllJxN3Gjyp4Q25mGa5waiTmkdBxf5qRmLZ2bnOEtoYUeW0 X-Received: by 2002:a17:907:31ca:b0:780:2170:e08c with SMTP id xf10-20020a17090731ca00b007802170e08cmr5817371ejb.145.1666171004894; Wed, 19 Oct 2022 02:16:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666171004; cv=none; d=google.com; s=arc-20160816; b=IyQK4VLpOPDh1WNK3hH9dQPbnBoS8a+pon77rWLQ4gfGEcJh9fjeFl3ktEeFzs/Mez ZETOIZxS+r0g6yhv5LbD+XJVnZ2+590lAQZhorHRBR0Ul4gkySjFAyFby9B1Da7HnBlV i/2XEtNfU1WUyfklzaeHuMwFGXDlHJDCEuN+W/nU0wApLiZ22M6tASZW76oXcP86T59V 5qZsLWZYwoj5np8U+eLTacrkPoC0+yuWa9a1rC/2G5/asS4KGeEtlpr2xQWIMftp71f6 q+npO9YXP/nNlrZ73OwuHtxucUO6sAUykcOqtHQMF3wFW54uJJpRDjW6sjq2QwBs0cjR JY/w== 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=ULDryk8H5r4torXkXquoDNQoOxNqpmWTTYvGhl2mZg/5HLA0+bBY8IpuUwirp6oyEB 0M/oZE9W9bOs5R0vDcsB8Dk6ls1av/EUUgPhg6QKGun2n4TjkQzIw4h9kJ669GzFz3de xuQM23QZ2I7j2PZoccRkbRibmchBPYHUzpMFZbJpe2qID5f4T7k3GvaQyo0W9up4rHIP 5pQ62I/x/AMSef7+8zWKjVgw6Mj+Q4cqbP90mryI8My05vBIoe4OFfnue+VhQyQP7zkx OEJjDElhyh/xWWjN/df61TQTBV4Ng3UPi5lKa8Mjp6IDBXlKxNa9+k9MM9QTtsi8nxLw ZrAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1qsw4TpI; 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 j1-20020a508a81000000b004593faf4fccsi12997340edj.110.2022.10.19.02.16.21; Wed, 19 Oct 2022 02:16:44 -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=1qsw4TpI; 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 S232901AbiJSJPv (ORCPT + 99 others); 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 X-Spam-Status: No, score=-7.4 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?1747106927592617591?= X-GMAIL-MSGID: =?utf-8?q?1747106927592617591?= 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: