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 X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD79EC35671 for ; Sun, 23 Feb 2020 02:29:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9935920659 for ; Sun, 23 Feb 2020 02:29:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582424991; bh=8s/VDhbSuYRaoTGEHOdO0eHpgn3QBL6V1BnFX0DcqVk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=rBL3DElygO6fOY+96LruVmImvqobR+C5Si7s4IhDc6CRErhmoRsbOvw2dBjGaY52o dIlJRPSYDePhnaMoXjlx+lE3ghFU1HDbzNqvCr0/9ArhlOw59Z357njjlyiJfDKosl WeB7nfWU5parp6zpH+O0szMNp23vuSdOdGrB2uJY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727815AbgBWC3u (ORCPT ); Sat, 22 Feb 2020 21:29:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:53758 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727267AbgBWCX6 (ORCPT ); Sat, 22 Feb 2020 21:23:58 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5F2AB22464; Sun, 23 Feb 2020 02:23:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582424638; bh=8s/VDhbSuYRaoTGEHOdO0eHpgn3QBL6V1BnFX0DcqVk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mKTZ3aef5PGe8ap2UIVwx/+aE+6Pn0fkP0XAQpuBnXNd+zFegxRun6Cl+Vb7Vp4hH 9R1pjo/KFkwYR74ODni8JEwgIl7I12/6MggmGDeONShXhUmNkGk0FEAcosOYPbsbMt YbXIEzJ5xOXgfIc5HyP5az54r5kQmwNkjuDbZDEQ= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Arthur Kiyanovski , Ezequiel Lara Gomez , "David S . Miller" , Sasha Levin , netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 15/25] net: ena: add missing ethtool TX timestamping indication Date: Sat, 22 Feb 2020 21:23:29 -0500 Message-Id: <20200223022339.1885-15-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200223022339.1885-1-sashal@kernel.org> References: <20200223022339.1885-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arthur Kiyanovski [ Upstream commit cf6d17fde93bdda23c9b02dd5906a12bf8c55209 ] Current implementation of the driver calls skb_tx_timestamp()to add a software tx timestamp to the skb, however the software-transmit capability is not reported in ethtool -T. This commit updates the ethtool structure to report the software-transmit capability in ethtool -T using the standard ethtool_op_get_ts_info(). This function reports all software timestamping capabilities (tx and rx), as well as setting phc_index = -1. phc_index is the index of the PTP hardware clock device that will be used for hardware timestamps. Since we don't have such a device in ENA, using the default -1 value is the correct setting. Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Ezequiel Lara Gomez Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/amazon/ena/ena_ethtool.c b/drivers/net/ethernet/amazon/ena/ena_ethtool.c index eb9e07fa427ee..237fbcac734f5 100644 --- a/drivers/net/ethernet/amazon/ena/ena_ethtool.c +++ b/drivers/net/ethernet/amazon/ena/ena_ethtool.c @@ -817,6 +817,7 @@ static const struct ethtool_ops ena_ethtool_ops = { .get_channels = ena_get_channels, .get_tunable = ena_get_tunable, .set_tunable = ena_set_tunable, + .get_ts_info = ethtool_op_get_ts_info, }; void ena_set_ethtool_ops(struct net_device *netdev) -- 2.20.1