From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 032A7D6DDF9 for ; Fri, 15 Nov 2024 12:51:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id A184040540; Fri, 15 Nov 2024 12:51:20 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 6YXWF6d8RL49; Fri, 15 Nov 2024 12:51:19 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 92E3140564 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1731675079; bh=5irCvuuzppk9pUgtyLu4aNXPznq1MhFOgVczSfkRE7o=; h=Date:From:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=am5wgyLf6qwBaF4rKAtR7bhBSqmCfc3GakoONn6rLhuqbegHb6qPVneW2OVPui/Tq t65noXaqmHGEnLUfsIEwgwlqmC7prQO2UIIfkyAq3p2VpuaiUJJ3z9w+v/hHVcF7qX 5azWTkyO+cmG2v2a6nYfVtzeA1686UepeUUH6y+s8iiQ0CM4ApytjmmHI7vxxBKsXy Q8jnH7nmg50sAaUu3uyyh4BiVvn+wm7HhF2acjHCa1DdjLJ0S7XYfNYMhjIu0t2DHD v14upphLmWlZOzBZdZtfioSwmQhuY2umNns9UxwdwEFVluZTyTr3v/mKNMgveyoGt3 c4I4+6WrISNmQ== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id 92E3140564; Fri, 15 Nov 2024 12:51:19 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists1.osuosl.org (Postfix) with ESMTP id 39C701EB8 for ; Fri, 15 Nov 2024 12:51:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 22B1E40132 for ; Fri, 15 Nov 2024 12:51:18 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id BQDJGHToXLtu for ; Fri, 15 Nov 2024 12:51:17 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=139.178.84.217; helo=dfw.source.kernel.org; envelope-from=horms@kernel.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 35F10400FB DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 35F10400FB Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by smtp2.osuosl.org (Postfix) with ESMTPS id 35F10400FB for ; Fri, 15 Nov 2024 12:51:17 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id AE6865C62AA; Fri, 15 Nov 2024 12:50:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52428C4CECF; Fri, 15 Nov 2024 12:51:14 +0000 (UTC) Date: Fri, 15 Nov 2024 12:51:12 +0000 From: Simon Horman To: Milena Olech Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com, Alexander Lobakin Message-ID: <20241115125112.GP1062410@kernel.org> References: <20241113154616.2493297-1-milena.olech@intel.com> <20241113154616.2493297-5-milena.olech@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241113154616.2493297-5-milena.olech@intel.com> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1731675075; bh=lSEI3t4D6CYF1nVrPsQ4X7kyHzEljSoE58GvXffqcug=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HLp2kVBuO2Z41k26kjMddkl/mEbunJV7ryEjzkB89zt3px+i3oSYIgsJ6GvqvO4S9 /njaEOf0SggN4Bnt4xhgK3cuZ+VvFu3COoyJFtNPaGNil/YOi1zkWTjMpbHmSnfcWG HvnMCNaeA9L5tV6fUokJCyHHMpvfVuYrm/U3WC/EjLIuiUvLBElaSNJ1o3hsy8Ayc7 qjnmrQ56IDDBtoVOMs+OuVRxy5nWISoktRkfnE3ZDfq2Re9Ga97BcLzZTIawdLh/Ih rM27vaoVEv1xsIp5jQDEtyEI1yQmK6Z2/DIrR8ztP2IlhuwZVb4yMS83GlR2/I71zF e3PrVT3lELPMQ== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=HLp2kVBu Subject: Re: [Intel-wired-lan] [PATCH iwl-net 04/10] idpf: negotiate PTP capabilies and get PTP clock X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Wed, Nov 13, 2024 at 04:46:14PM +0100, Milena Olech wrote: > PTP capabilities are negotiated using virtchnl command. Add get > capabilities function, direct access to read the PTP clock time and > direct access to read the cross timestamp - system time and PTP clock > time. Set initial PTP capabilities exposed to the stack. > > Reviewed-by: Alexander Lobakin > Signed-off-by: Milena Olech ... > diff --git a/drivers/net/ethernet/intel/idpf/idpf_ptp.h b/drivers/net/ethernet/intel/idpf/idpf_ptp.h ... > /** > * struct idpf_ptp - PTP parameters > * @info: structure defining PTP hardware capabilities > * @clock: pointer to registered PTP clock device > * @adapter: back pointer to the adapter > + * @cmd: HW specific command masks > + * @dev_clk_regs: the set of registers to access the device clock > + * @caps: PTP capabilities negotiated with the Control Plane > + * @get_dev_clk_time_access: access type for getting the device clock time > + * @get_cross_tstamp_access: access type for the cross timestamping > */ > struct idpf_ptp { > struct ptp_clock_info info; > struct ptp_clock *clock; > struct idpf_adapter *adapter; > + struct idpf_ptp_cmd cmd; > + struct idpf_ptp_dev_clk_regs dev_clk_regs; > + u32 caps; > + enum idpf_ptp_access get_dev_clk_time_access:16; > + enum idpf_ptp_access get_cross_tstamp_access:16; > }; > > +/** > + * idpf_ptp_info_to_adapter - get driver adapter struct from ptp_clock_info > + * @info: pointer to ptp_clock_info struct Please in include a "Return:" section, as you have done elsewhere, to document the return value of this function. Flagged by ./scripts/kernel-doc -none -Wall > + */ > +static inline struct idpf_adapter * > +idpf_ptp_info_to_adapter(const struct ptp_clock_info *info) > +{ > + const struct idpf_ptp *ptp = container_of_const(info, struct idpf_ptp, > + info); > + return ptp->adapter; > +} > + > #if IS_ENABLED(CONFIG_PTP_1588_CLOCK) > int idpf_ptp_init(struct idpf_adapter *adapter); > void idpf_ptp_release(struct idpf_adapter *adapter); > +int idpf_ptp_get_caps(struct idpf_adapter *adapter); > +void idpf_ptp_get_features_access(const struct idpf_adapter *adapter); > #else /* CONFIG_PTP_1588_CLOCK */ > static inline int idpf_ptp_init(struct idpf_adapter *adpater) > { ...