From patchwork Wed Oct 11 12:15:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sai Krishna Gajula X-Patchwork-Id: 151381 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp494896vqb; Wed, 11 Oct 2023 05:17:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEZ577ARi7U23NwUkulPWfqlW0T/qV1butOXwzx/xQQ4xq7lYai0knCgt9zhtchzDJNwBsN X-Received: by 2002:a05:6359:219:b0:14a:cca4:5601 with SMTP id ej25-20020a056359021900b0014acca45601mr15665848rwb.3.1697026641479; Wed, 11 Oct 2023 05:17:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697026641; cv=none; d=google.com; s=arc-20160816; b=JdvHVLJHduyt+4l/iuH6YEXazqSyWK4dgH0UmvgiVF5SPL5k2Nt0dUICIbo7za8DSr wEgNGVNnAWp34DAROGBrVw+mi44hvPUZ+w4IOuhLnKCJB14yF2Vi7c2IFrMwc8ch8MMx ujFVSaTUkn8JNkAT8KD1YZGnSZa0RGNILlDBAuaZ6t780wCKaWInK/g1BBG3iiyFyL/4 OxnOoplGmjcoP7yrHF01Bh9hpnVIuXatWY7mylurTuNvrqseyeW0ZpXwooF3XkvDReOV sSuftsRGpKXLI/Az38UEtbcOKYEDcSSACiBMKdhdSQ67c/Zt6N3s6pkaJPYWyBbilr7Y +yWg== 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=vvUXkaiiZfknT4SsbXoPsFtLl92LCmBy734wsXL2KWM=; fh=OOfg4bT5sxLM4hQYqk/qWw3CyN88sNXQvu7/QqHGOPg=; b=ltyKRMwi7dqNAbAR0+bhjPuZg5oGQNv55+uSGSs2LUoN2A9sx6J4rlOQ7+nZGS+Hx8 qQysQ5wmktyOi37mTioOC93Ecydle1csUANIuDM2Ofld2TIBlMii/w41zRGKHII7J77t qPd1n4V5TWsDG3uJqggbEg8poiNtCzcRD9OkCIMUAdRy5J/u7VmO9kCv3wAmfAryD2qd PnbbofpoLTmnOBpXmB1SxKcvwuGeHTYcBCjUFEKFdXY8nQf7KZxWs0ZHR6tQLkDaQzAm Fs27lvUukSAansz9RppvRtkjVqU/r8zvOHDR6g3I8OOaV7SYsZZRWPr6ogz6ljXw9Auw wX7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=Jtl8fwFF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id bt23-20020a056a00439700b0068e39cd7acdsi11873628pfb.83.2023.10.11.05.17.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:17:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=Jtl8fwFF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 17BF4810AF71; Wed, 11 Oct 2023 05:17:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234970AbjJKMQ7 (ORCPT + 18 others); Wed, 11 Oct 2023 08:16:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234931AbjJKMQs (ORCPT ); Wed, 11 Oct 2023 08:16:48 -0400 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CC2F10C1; Wed, 11 Oct 2023 05:16:24 -0700 (PDT) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39B6VB5C020008; Wed, 11 Oct 2023 05:16:02 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=vvUXkaiiZfknT4SsbXoPsFtLl92LCmBy734wsXL2KWM=; b=Jtl8fwFFey/ZGSGnBUWc4dCf7NGhsZNC0hNSJYrYbnakFslu6Qj+ysjjqimF8k6pn8Cy 1DbjeAz8sZnjwE2i7JlnyudIMuqGEsrLo3WEYneUIsWmKRPU9F9h6R/BRDHBkIPJUI7E 7DeR9rqQlxmUsS7K3Br8y8XDU+Kb/dRdxD06LEJUVnYcf+aSm6e/r9lxWC17bXX8jRbP 4ez3FtF0df5soDyi8no6hMOq496JpW1HcqLO81nabnGNVKtJtetfroFUTagfmmwy7776 ILESH57ldLmeEyx9RDezVqg9t5acqfgjMq5JABg2lP9r32i6jc+71sbHT4HRcBVPHWCG UQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3tnc2au3um-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 11 Oct 2023 05:16:01 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 11 Oct 2023 05:16:00 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Wed, 11 Oct 2023 05:16:00 -0700 Received: from hyd1425.marvell.com (unknown [10.29.37.83]) by maili.marvell.com (Postfix) with ESMTP id CD2945B6935; Wed, 11 Oct 2023 05:15:54 -0700 (PDT) From: Sai Krishna To: , , , , , , , , , , , , CC: Sai Krishna Subject: [net-next PATCH] octeontx2-af: Enable hardware timestamping for VFs Date: Wed, 11 Oct 2023 17:45:51 +0530 Message-ID: <20231011121551.1205211-1-saikrishnag@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Proofpoint-GUID: 1OSmTFb2k_wQKgjkj6CPTjTwUkITLOPj X-Proofpoint-ORIG-GUID: 1OSmTFb2k_wQKgjkj6CPTjTwUkITLOPj X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-11_09,2023-10-11_01,2023-05-22_02 X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 11 Oct 2023 05:17:17 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778396228121346674 X-GMAIL-MSGID: 1779461407705386136 From: Subbaraya Sundeep Currently for VFs, mailbox returns ENODEV error when hardware timestamping enable is requested. This patch fixes this issue. Modified this patch to return EPERM error for the PF/VFs which are not attached to CGX/RPM. Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: Sai Krishna Reviewed-by: Simon Horman --- drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c index f2b1edf1bb43..15a319684ed3 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c @@ -756,12 +756,11 @@ static int rvu_cgx_ptp_rx_cfg(struct rvu *rvu, u16 pcifunc, bool enable) if (!is_mac_feature_supported(rvu, pf, RVU_LMAC_FEAT_PTP)) return 0; - /* This msg is expected only from PFs that are mapped to CGX LMACs, + /* This msg is expected only from PF/VFs that are mapped to CGX/RPM LMACs, * if received from other PF/VF simply ACK, nothing to do. */ - if ((pcifunc & RVU_PFVF_FUNC_MASK) || - !is_pf_cgxmapped(rvu, pf)) - return -ENODEV; + if (!is_pf_cgxmapped(rvu, pf)) + return -EPERM; rvu_get_cgx_lmac_id(rvu->pf2cgxlmac_map[pf], &cgx_id, &lmac_id); cgxd = rvu_cgx_pdata(cgx_id, rvu);