From patchwork Tue Mar 10 12:38:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 229782 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=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, 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 2A696C10F27 for ; Tue, 10 Mar 2020 12:44:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0054724693 for ; Tue, 10 Mar 2020 12:44:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583844247; bh=ZS8/nYq1P3iQZ/7cVhbUQlgUQa9jZTe4mt8nxCgCiuM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=c4jxWxs10RCy6DCMJllwvQIlChYyvcywSGNaNLm9g2fSSoA6XbrFzshZnfJrlBT0Q e2drI9mr9FQaKQDYmEZlTJ9ju+wIDc9ktk9hSge0NnkmNAyOn6jM0+pMBPzs8owEGX 3l0mhhDG4hgywcAhk+qRSxWlI5z+kvd7OFPRUBwM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727686AbgCJMoE (ORCPT ); Tue, 10 Mar 2020 08:44:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:44838 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727683AbgCJMoD (ORCPT ); Tue, 10 Mar 2020 08:44:03 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F35E2246D4; Tue, 10 Mar 2020 12:44:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583844243; bh=ZS8/nYq1P3iQZ/7cVhbUQlgUQa9jZTe4mt8nxCgCiuM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FU2/T1PKzLuBGwe3okIWwQGLIyB30mMY6cZnSBj7+qWJYyr4OnpOGXimM3+LJXMUB 8XmeBikCzTf/en0tMDFuvJ7dMfozqLiMLQttou6rOZq3Nrxh60eB2/0Xwid/orRJtU TNM716SxihW4opZWmCn6LDwNdao2k4sZwiU5wtx4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ezequiel Lara Gomez , Arthur Kiyanovski , "David S. Miller" , Sasha Levin Subject: [PATCH 4.9 11/88] net: ena: add missing ethtool TX timestamping indication Date: Tue, 10 Mar 2020 13:38:19 +0100 Message-Id: <20200310123609.166067110@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200310123606.543939933@linuxfoundation.org> References: <20200310123606.543939933@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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 06fd061a20e9a..d85fe0de28dba 100644 --- a/drivers/net/ethernet/amazon/ena/ena_ethtool.c +++ b/drivers/net/ethernet/amazon/ena/ena_ethtool.c @@ -819,6 +819,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)