From patchwork Mon Aug 17 12:37:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Breathitt Gray X-Patchwork-Id: 1346196 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BVYVH74Ggz9sTQ; Mon, 17 Aug 2020 22:37:59 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1k7eOi-0006Z6-N2; Mon, 17 Aug 2020 12:37:56 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1k7eOe-0006W8-Q0 for kernel-team@lists.ubuntu.com; Mon, 17 Aug 2020 12:37:52 +0000 Received: from mail-qt1-f198.google.com ([209.85.160.198]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1k7eOe-0000gG-CX for kernel-team@lists.ubuntu.com; Mon, 17 Aug 2020 12:37:52 +0000 Received: by mail-qt1-f198.google.com with SMTP id d2so11925098qtn.8 for ; Mon, 17 Aug 2020 05:37:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VLUJFTwsYJnQOW7/nxhNfnQphnpOhNHhqwJY6TvSQBA=; b=ERdiA+jpTdlO9ta4Ews5mk2GGJcnKY1ETSCM0pGCYNoLojJIVpR/N2U986tmBIVQA6 kq1cAcDIk0QLFsb4+hzCy5rof37oSvEpdkyyfCfC8XaUCywZvJJ9cXq6vPsjL1+5i8kQ 18xLfvHgiSV0u0NuKMOpVcUXjdhCI5U9bu0zfK9A0+uOciVd+VDcCBCtTr90L8/h8E33 aAbJBpfGAciNuLwohsNquJGMexXvflXz4FyWWHoq7dXvdx2KnNA30p7VmHmA2jHW4QdB yIuQX/AgSYyjY+ySDHxu767zlbUsEGTJ2zMX2rfWZJL42C1xYNctHPh0To4nJN3ev+QZ lYBA== X-Gm-Message-State: AOAM531DAaOCD1kYn0Sg3XROshHkqx3olSNItlL4uifqqWj0FNI+u7V4 7HHX3UNDX19HnZUKLTVAAzUflKUHl9vxxtAFH0V95y17wualDlCxAee+HX0hFer0Aln0rNRxXqB FUJVkUkLyv5Aa/CpTytNGPzOIh2xwrw5BJv8Q2U/Y4A== X-Received: by 2002:ac8:152:: with SMTP id f18mr13379548qtg.163.1597667870898; Mon, 17 Aug 2020 05:37:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVqWVpHzDt0oLwznqN5ALWW4y2gKN1SwI4DElFQElmqvwbVzznp9nJ5ALto1pJqSrzsrZGHA== X-Received: by 2002:ac8:152:: with SMTP id f18mr13379530qtg.163.1597667870650; Mon, 17 Aug 2020 05:37:50 -0700 (PDT) Received: from localhost.localdomain (072-189-064-225.res.spectrum.com. [72.189.64.225]) by smtp.gmail.com with ESMTPSA id m15sm20177234qta.6.2020.08.17.05.37.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 05:37:49 -0700 (PDT) From: William Breathitt Gray To: kernel-team@lists.ubuntu.com Subject: [BIONIC/linux-azure-4.15][PATCH 3/3] net/mlx5: Tidy up and fix reverse christmas ordring Date: Mon, 17 Aug 2020 08:37:40 -0400 Message-Id: <20200817123740.6938-7-william.gray@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200817123740.6938-1-william.gray@canonical.com> References: <20200817123740.6938-1-william.gray@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Mark Bloch Use reverse chirstmas tree inside mlx5e_ethtool_get_link_ksettings. Signed-off-by: Mark Bloch Signed-off-by: Saeed Mahameed BugLink: https://bugs.launchpad.net/bugs/1876770 (backported from commit 2f5438ca0ee01a1b3a9c37e3f33d47c8122afe74) [ vilhelmgray: context adjustments ] Signed-off-by: William Breathitt Gray --- drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c index 071a84f64881..1d1d972f8f29 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c @@ -813,17 +813,17 @@ static int mlx5e_get_link_ksettings(struct net_device *netdev, { struct mlx5e_priv *priv = netdev_priv(netdev); struct mlx5_core_dev *mdev = priv->mdev; - u32 out[MLX5_ST_SZ_DW(ptys_reg)] = {0}; + u32 out[MLX5_ST_SZ_DW(ptys_reg)] = {}; + u32 eth_proto_admin; + u8 an_disable_admin; u16 data_rate_oper; + u32 eth_proto_oper; + u32 eth_proto_cap; + u8 connector_type; u32 rx_pause = 0; u32 tx_pause = 0; - u32 eth_proto_cap; - u32 eth_proto_admin; u32 eth_proto_lp; - u32 eth_proto_oper; - u8 an_disable_admin; u8 an_status; - u8 connector_type; int err; err = mlx5_query_port_ptys(mdev, out, sizeof(out), MLX5_PTYS_EN, 1);