From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-179.mta0.migadu.com (out-179.mta0.migadu.com [91.218.175.179]) (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 EDDD83191BA for ; Thu, 9 Jul 2026 10:45:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783593923; cv=none; b=qCvjn2W7+X4BoEVihIyQVy6IS6f7DHTnLNYHod+yDCJ0V5oCLMgWWveZhwhfgDsfNuRB8TGcwyDqG33HxMtXu/u0C9atWsJwafFHBTVari+izdjikyUj/UYaJCzRA9agP5IGgGw+KUKhwZ2ng7u0wo3ibu7/MWW8s+6anXy5Gno= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783593923; c=relaxed/simple; bh=v11CCaM2SO1sjN3FanFJterfJszpcdVADsPjT6gZ5+I=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=FRnjQHQ7fF7QKd75F6NSKaCqu0cl2eYA8uf9FrLS28LNhDSum2DrbHWVPkTWP8GA6aSlSV++Tj7pmOASN6ueli9f+WW4aUCSCtgsMkRWuLZdwDcDYA+bsHFsW1/EvEaVY2+NL14vtwnkWxnnZsOTXQ0FBTnRZPafMfl+MYN0D5I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=sU+3+KFh; arc=none smtp.client-ip=91.218.175.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="sU+3+KFh" Message-ID: <4a847a6b-7837-4044-8a87-0ddac47725f8@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1783593915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=U1zptSwNIN+3sFSND6E6Pez9u+xDKFIGwqm4Rxh1P9w=; b=sU+3+KFhltGJBoRT0JuwZfDvcZOV2uNhnSWhxO46Qu1fcznF7EaE0UtRnGF8MZHXJW+0Qr xX4xG560Pw/p4dDjnIz1Qd6csX1rxq3csMxLmYs2z7pFcAL8Cj2pvwEqJa16ioCC0BIgGZ kmwtue0SRDHaoHwZuXeXxg0fy2i88Fw= Date: Thu, 9 Jul 2026 11:44:44 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH net-next v7 08/15] net: ethernet: oa_tc6: Support for hardware timestamp To: Selvamani.Rajagopal@onsemi.com, Andrew Lunn , Piergiorgio Beruto , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Parthiban Veerasooran , Richard Cochran , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Simon Horman , Jonathan Corbet , Shuah Khan Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-doc@vger.kernel.org, Jerry Ray References: <20260708-s2500-mac-phy-support-v7-0-478c877aa1a9@onsemi.com> <20260708-s2500-mac-phy-support-v7-8-478c877aa1a9@onsemi.com> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vadim Fedorenko In-Reply-To: <20260708-s2500-mac-phy-support-v7-8-478c877aa1a9@onsemi.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 08/07/2026 18:12, Selvamani Rajagopal via B4 Relay wrote: > From: Selvamani Rajagopal > > PTP register/unregister calls are implemented in oa_tc6_ptp.c. > The APIs that work with the hardware for timestamp is provided > by vendor code as it may be vendor dependent. > > Interface for ndo_hwtstamp_set/get, ioctl, control and status > callback for ethtool are provided to support hardware timestamp > feature. > > Besides ioctl interface, hardware timestamp functions that handles > header and footer data are in oa_tc6.c. Helper functions are in > oa_tc6_tstamp.c. > > Signed-off-by: Selvamani Rajagopal > > --- > changes in v7 > - Fixed the parameter name mismatch in function protoype and > definition > - CONFIG0 is set with 64 bit timestamp support by default. > - Added information about return value for API documentation. > changes in v6 > - Fixed the issue of function parameter in oa_tc6_get_ts_stats > not described in comments section for documentation. > - Avoided typecasting __be32 as u32 > changes in v5 > - As subtracting skb len by FCS size is considered bug, changes > are removed. Will be fixed in stable branch (net repo) > changes in v4 > - Fixed the condition check for subtracting the FCS size > from skb len. > changes in v3 > - Replaced warning printk with ratelimited printk > - Checking the hardware register before enabling hardware > timestamp > changes in v1 > - Added hardware timestamp support to the OA TC6 framework. > --- > MAINTAINERS | 1 + > drivers/net/ethernet/oa_tc6/Makefile | 2 +- > drivers/net/ethernet/oa_tc6/oa_tc6.c | 218 +++++++++++++++++++++++++-- > drivers/net/ethernet/oa_tc6/oa_tc6_ptp.c | 70 +++++++++ > drivers/net/ethernet/oa_tc6/oa_tc6_std_def.h | 34 +++++ > drivers/net/ethernet/oa_tc6/oa_tc6_tstamp.c | 205 +++++++++++++++++++++++++ > include/linux/oa_tc6.h | 12 ++ > 7 files changed, 527 insertions(+), 15 deletions(-) > [...] > +/** > + * oa_tc6_ioctl - generic ioctl interface for MAC-PHY drivers. > + * @tc6: oa_tc6 struct. > + * @rq: request from socket interface > + * @cmd: value to set/get timestamp configuration > + * > + * Return: 0 on success otherwise failed. > + */ > +int oa_tc6_ioctl(struct oa_tc6 *tc6, struct ifreq *rq, int cmd) > +{ > + if (!netif_running(tc6->netdev)) > + return -EINVAL; > + > + if (cmd == SIOCSHWTSTAMP || cmd == SIOCGHWTSTAMP) > + return oa_tc6_tstamp_ioctl(tc6, rq, cmd); ioctl interface for HW timestamp configuration is deprecated, kernel code was recently cleaned up to aviod these ioctl commands in favor of ndo_hwtstamp_get/ndo_hwtstamp_set callbacks. New drivers must not use deprecated ioctl commands. > + else > + return phy_do_ioctl_running(tc6->netdev, rq, cmd); > +} > +EXPORT_SYMBOL_GPL(oa_tc6_ioctl); > +