From patchwork Wed May 10 20:53:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rahul Rameshbabu X-Patchwork-Id: 13237260 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0025C171BA for ; Wed, 10 May 2023 20:58:53 +0000 (UTC) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2070.outbound.protection.outlook.com [40.107.244.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF4837DB9 for ; Wed, 10 May 2023 13:58:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YjkRzGsr3YxzkXli55gX+TO7YAz1h4srrTbfDAblttrZeSO5nTM4pLbEz2rwdCtxAtzani7EFNiEis1gLOz+pEl6mMmEjtlVhoZMvmBKly9Nl1mr8QD+Ql6JnGwNkWjxCvkDphlSK96oTVOJ8Na+P4gp5Kv9UjgdcCj9S7+sNFcsUXw2ind0U4cibY232tPpOu1bosRAQhet32lsquCQ0N1gjH7PomOzL9l6tFtYDN/Sjwv7mfANwtCcBWJXRQOle0GIQOuwWb15UNbtolZqEd5tytfs9KLhPKotduRofen8KOK+VD+rXepn6pyqHlGKn+CyxrljSAXYB5e7i2isVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yFDnnQ4asilKB368ly68+XirCAEeJV59SUVtuMjeg74=; b=fscA0Zmf+T9XRfuymJISqtUQ1mXV672iMxh81tTDy4EYbvgzCl1VYHGBKrwLDTzeecq4ubmB7pXOY5yMfar/bi9LufgFpMLvIFfzl6FrFJqecrA/nnNPKzy7J7ksJ9WqeE+ZkYnZuqV3JrmofklN8TZUatrnlHMWRi7h1afC31K+XdyX1Ox2UHvvun8HJuAd2dlRkCtJsX6+Rc2AYXokm1lFbi/kb3x+jvK6hnM9mv7AsvtPfMRgVMfU6ccUBC4NV2myBdI3fXfL05ba15v2b6rIBD3g4pCUyW7iTVZ7C/AUvXL6ebwPOJwec5c2OCJtdx9wCOqEVZ4xBo2Q3QAf7Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yFDnnQ4asilKB368ly68+XirCAEeJV59SUVtuMjeg74=; b=YG3l+aQnhyUF4yY0NwrCQucK1PM2eiD8J8CEBwW6cKdPJTVYm0Mh8sqsVB2E/URVL+mnrY3pwzTMTSuj4wOLVg2egEZ6rfIjmSviCl0FkTKOKJJ2O5y32ESNcvnSAhOOiU8UDrTSCKuhkrCQ+TqMOSiZCmnvc0rrPmF+HM/0II0QEgMxNija0rvBN1s9BjbeSh2c7/ik09WZRp6JePNPQ68T83B2mEajtjcha5toldmDrKUh5UXLKa+yGcqFl0avkb+wZTY11oaxfEx/sNbGJhqlaQ3+TTuAb9RU5t7W3VyXEINRmrV+npJmcx7J3jzELwwhcdn77t4GOzOUo+eeRg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from BYAPR12MB2743.namprd12.prod.outlook.com (2603:10b6:a03:61::28) by MW5PR12MB5624.namprd12.prod.outlook.com (2603:10b6:303:19d::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.18; Wed, 10 May 2023 20:54:15 +0000 Received: from BYAPR12MB2743.namprd12.prod.outlook.com ([fe80::de5a:9000:2d2f:a861]) by BYAPR12MB2743.namprd12.prod.outlook.com ([fe80::de5a:9000:2d2f:a861%7]) with mapi id 15.20.6363.033; Wed, 10 May 2023 20:54:15 +0000 From: Rahul Rameshbabu To: netdev@vger.kernel.org Cc: Saeed Mahameed , Gal Pressman , Tariq Toukan , "David S. Miller" , Jakub Kicinski , Richard Cochran , Jacob Keller Subject: [PATCH net-next 9/9] ptp: ocp: Add .getmaxphase ptp_clock_info callback Date: Wed, 10 May 2023 13:53:06 -0700 Message-Id: <20230510205306.136766-10-rrameshbabu@nvidia.com> X-Mailer: git-send-email 2.38.4 In-Reply-To: <20230510205306.136766-1-rrameshbabu@nvidia.com> References: <20230510205306.136766-1-rrameshbabu@nvidia.com> X-ClientProxiedBy: BYAPR02CA0067.namprd02.prod.outlook.com (2603:10b6:a03:54::44) To BYAPR12MB2743.namprd12.prod.outlook.com (2603:10b6:a03:61::28) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR12MB2743:EE_|MW5PR12MB5624:EE_ X-MS-Office365-Filtering-Correlation-Id: e87162e3-3603-4a90-aa5a-08db5198b6e5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7LmH91RtnjZ3nT3tJvpeRZT5JSBltCINwRHFlA9E2mLD6O6gLrWCKCKc1vfHdJTucAtF+cy1rEDfeAhaTQeCW42GA7GXsFfj3pgc09n0L/QW7mkvHMfO5FbuBcuTP+hpnQi3N0wVtDHIsFlH5e2rW6MQhWZbb/Wp1PtQLnBiprWv0EofRWLp7z8bUkoHLHVmbCkIx0bgoseKR0zDhuiwC6zdmlMh5sJX3JXm7FTDKrdrjWsP7ybivRQIgl8WKj7y7PoDioFf8EePFJAFIFKbM8Q4i8C6wPnicJPL2nk1cAieSkVinyEVuLv5Rfte7V4mrY+y+cnX2hFpYzENWx5PT8xcCon/0hhKh/VvYHnRDO70Ua+uQKLwqXhe7Bmz7LqNvv5JqNbYTPwaUZcyDgaFy1vLG1988tpov3ywkuP0KRA4yn1bUQkqciNk2p0Gj3QqTdqtPDq+yXO+UZEZpCBk4bBAZl2PrXkuHOfq4xqDqMXXdvsXrerywFqGMFGEuQzoGuDOtE8jsFa4CngQIjFB64m9lR+gq13cTdLIrei2gq4SNJMzq1yXgheu3YTua2bJzDKJGwMctQjLwWqEy7LUDBo3X/SawWTl7/5N8MruVpxXhK/I5jVw/AsLKj0lWsq0 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR12MB2743.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(346002)(136003)(39860400002)(366004)(396003)(376002)(451199021)(86362001)(5660300002)(41300700001)(4326008)(6666004)(38100700002)(316002)(6486002)(6506007)(6512007)(26005)(1076003)(478600001)(54906003)(36756003)(2906002)(8936002)(8676002)(186003)(83380400001)(66946007)(6916009)(66476007)(66556008)(2616005)(142923001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: PvTtxtVUBKGa6dVOCuTEQCPuBltUKoK29p0z3bwbI04CfhaGS2/q5SKvRYusislviQI23bR+dUCiNWOb2E/ZbZR2cLwK3CU9wgwc7XiZ0oAXVTejUk7ypRNO/dwoi7QIz2aVnW5h5g/DgOv4qFR/SSt/S/suOLerQqo9FXrEfd4j6443AJIS3VkVywjKw99iYTxTFr7lyUlj2td9mTYffwE9lTDPIdC2GJ8Hu08YaB/kREzPmarYPHv+BPEREJQXJvqZ3SVjxYFKle9ne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K0y5RaVx4l3x5QhYRYt1SKAZLqFK46JD7DtTLamdCOp7BBnp0eswK0q1rfg8AiJUZX8scMBhzxvXky3YXL7Xnu70S2dXgj8C57ly8B9tFPhHWosBnL/zyrxoTifQkXV6cV8Xsp953nIO66CCIA+MaJgzc84iQdyFfZ+rNMDm72ud4bO87JEOK+FlO7SbUFgm2+3PI2gbMvaMdszqwsdm3vgsASezS2ehAl5CZ2HmsBEA8p5xlsgWfYrolQNY41D6qcaYURG5VPZYp23Wg== X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: e87162e3-3603-4a90-aa5a-08db5198b6e5 X-MS-Exchange-CrossTenant-AuthSource: BYAPR12MB2743.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2023 20:54:15.0252 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: lp+Yoyua4h7UNJ/FEtR4WBbT1UGYxRM9glMECh4jKim7wstVzgPlMLJ2e7+XfaCrN00LMeAquUcMlSQiVydr3Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW5PR12MB5624 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org Add a function that advertises a maximum offset of zero supported by ptp_clock_info .adjphase in the OCP null ptp implementation. Cc: Richard Cochran Cc: Jonathan Lemon Signed-off-by: Rahul Rameshbabu Acked-by: Vadim Fedorenko --- drivers/ptp/ptp_ocp.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c index ab8cab4d1560..20a974ced8d6 100644 --- a/drivers/ptp/ptp_ocp.c +++ b/drivers/ptp/ptp_ocp.c @@ -1124,6 +1124,12 @@ ptp_ocp_null_adjfine(struct ptp_clock_info *ptp_info, long scaled_ppm) return -EOPNOTSUPP; } +static s32 +ptp_ocp_null_getmaxphase(struct ptp_clock_info *ptp_info) +{ + return 0; +} + static int ptp_ocp_null_adjphase(struct ptp_clock_info *ptp_info, s32 phase_ns) { @@ -1239,6 +1245,7 @@ static const struct ptp_clock_info ptp_ocp_clock_info = { .adjtime = ptp_ocp_adjtime, .adjfine = ptp_ocp_null_adjfine, .adjphase = ptp_ocp_null_adjphase, + .getmaxphase = ptp_ocp_null_getmaxphase, .enable = ptp_ocp_enable, .verify = ptp_ocp_verify, .pps = true,