From patchwork Sat Mar 7 01:04:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Nelson X-Patchwork-Id: 222893 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.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 60873C10DCE for ; Sat, 7 Mar 2020 01:04:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 39E9E206E2 for ; Sat, 7 Mar 2020 01:04:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=pensando.io header.i=@pensando.io header.b="z6OsC8Dl" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726874AbgCGBEV (ORCPT ); Fri, 6 Mar 2020 20:04:21 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:41472 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726733AbgCGBEU (ORCPT ); Fri, 6 Mar 2020 20:04:20 -0500 Received: by mail-pl1-f195.google.com with SMTP id t14so1554147plr.8 for ; Fri, 06 Mar 2020 17:04:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=rc6jNvp/c23UvoUnFO2kVN5wxgcAoTsXXqLWvToQMSg=; b=z6OsC8DlGcudmcvIswv3rlDogtgOLKf/DfPmofT2dWMIsk96LxDcfrLnfC/8Lm3tNt Pf3dMYtK6ub4m/XDPdP9rTsULBaScQMjOujXdh9ohOhEVm5Ix4x/3JHtjvOhFLRRWLJz xVzpKe1aE5m07zjRJeyzibsBj7p07+K/ccklRcizy2Q/MXqgvCFY60jHgFBjIvQlSSoe +6KRRse5YC3yM1dkANT4awCFQQ7GKpz2Y7u7zTQHcsxdyxBxyAVAYKEZB85fF3wwvd9x IUE7Lu4DHpm3Mw08IXT3wJQ0A69l2nRqJWTyBNc2XI71ZekXeRzahVGKn2Iu0Xh29+ai fozQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=rc6jNvp/c23UvoUnFO2kVN5wxgcAoTsXXqLWvToQMSg=; b=J+PN55hwOb+P2EDoePef9hZDUubO8QEvOAsv5DbXiJRcFzzmKZjVOMSmi0d2HyOMci 74w+rCcCP6wcIYS/rPSMi7tHUHl8YhxNnZD4VpZSzzBz4v1sYAO1SASAU9SMSXuW+nmQ HfXegy8tPJEFMEOkR+TBX7U1mV81FBrrnUJxYzglosgkJOm9KIe6RwgMOIKc5OMy3QSq H1y7W2QoQLtZP54ZaWRbguFIEco7PyvIUPlT3D3IYo+7QvNmpstHMN94ZjBrwifM6fNT dByPs4XljXMoZXH+SqfGS7snBT6+u7TtvoZOalENwcakZsTvIyBv6mHf7ZNVseeKGPv5 84wA== X-Gm-Message-State: ANhLgQ1PRqzUdPT7J1VJWnjuIEJSoBr/8vi5wgtknqM0J9Sl4AkQNVNY NiC48fd0Efk2RBB7tyUAzNe92pBAQhg= X-Google-Smtp-Source: ADFU+vsawjtSJSGdEE6k6J2PVuKXoRcJXM25kGAVq6xRDnWH2kLx8XMWm6LnRSjdar7IIvy4n+DR/A== X-Received: by 2002:a17:90a:b10d:: with SMTP id z13mr6553809pjq.132.1583543059191; Fri, 06 Mar 2020 17:04:19 -0800 (PST) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id o66sm23224949pfb.93.2020.03.06.17.04.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Mar 2020 17:04:18 -0800 (PST) From: Shannon Nelson To: netdev@vger.kernel.org, davem@davemloft.net Cc: Shannon Nelson Subject: [PATCH v4 net-next 2/8] ionic: remove pragma packed Date: Fri, 6 Mar 2020 17:04:02 -0800 Message-Id: <20200307010408.65704-3-snelson@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200307010408.65704-1-snelson@pensando.io> References: <20200307010408.65704-1-snelson@pensando.io> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Replace the misguided "#pragma packed" with tags on each struct/union definition that actually needs it. This is safer and more efficient on the various compilers and architectures. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_if.h | 38 +++++++++---------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_if.h b/drivers/net/ethernet/pensando/ionic/ionic_if.h index ce07c2931a72..e5e98067fba4 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_if.h +++ b/drivers/net/ethernet/pensando/ionic/ionic_if.h @@ -4,8 +4,6 @@ #ifndef _IONIC_IF_H_ #define _IONIC_IF_H_ -#pragma pack(push, 1) - #define IONIC_DEV_INFO_SIGNATURE 0x44455649 /* 'DEVI' */ #define IONIC_DEV_INFO_VERSION 1 #define IONIC_IFNAMSIZ 16 @@ -366,7 +364,7 @@ union ionic_lif_config { u8 rsvd2[2]; __le64 features; __le32 queue_count[IONIC_QTYPE_MAX]; - }; + } __packed; __le32 words[64]; }; @@ -417,7 +415,7 @@ union ionic_lif_identity { __le32 max_frame_size; u8 rsvd2[106]; union ionic_lif_config config; - } eth; + } __packed eth; struct { u8 version; @@ -439,8 +437,8 @@ union ionic_lif_identity { struct ionic_lif_logical_qtype rq_qtype; struct ionic_lif_logical_qtype cq_qtype; struct ionic_lif_logical_qtype eq_qtype; - } rdma; - }; + } __packed rdma; + } __packed; __le32 words[512]; }; @@ -526,7 +524,7 @@ struct ionic_q_init_cmd { __le64 sg_ring_base; __le32 eq_index; u8 rsvd2[16]; -}; +} __packed; /** * struct ionic_q_init_comp - Queue init command completion @@ -1095,7 +1093,7 @@ struct ionic_port_status { u8 status; u8 rsvd[51]; struct ionic_xcvr_status xcvr; -}; +} __packed; /** * struct ionic_port_identify_cmd - Port identify command @@ -1251,7 +1249,7 @@ struct ionic_port_getattr_comp { u8 pause_type; u8 loopback_mode; u8 rsvd2[11]; - }; + } __packed; u8 color; }; @@ -1319,7 +1317,7 @@ struct ionic_dev_setattr_cmd { char name[IONIC_IFNAMSIZ]; __le64 features; u8 rsvd2[60]; - }; + } __packed; }; /** @@ -1334,7 +1332,7 @@ struct ionic_dev_setattr_comp { union { __le64 features; u8 rsvd2[11]; - }; + } __packed; u8 color; }; @@ -1361,7 +1359,7 @@ struct ionic_dev_getattr_comp { union { __le64 features; u8 rsvd2[11]; - }; + } __packed; u8 color; }; @@ -1426,7 +1424,7 @@ struct ionic_lif_setattr_cmd { } rss; u8 stats_ctl; u8 rsvd[60]; - }; + } __packed; }; /** @@ -1444,7 +1442,7 @@ struct ionic_lif_setattr_comp { union { __le64 features; u8 rsvd2[11]; - }; + } __packed; u8 color; }; @@ -1483,7 +1481,7 @@ struct ionic_lif_getattr_comp { u8 mac[6]; __le64 features; u8 rsvd2[11]; - }; + } __packed; u8 color; }; @@ -1688,7 +1686,7 @@ struct ionic_vf_setattr_cmd { u8 linkstate; __le64 stats_pa; u8 pad[60]; - }; + } __packed; }; struct ionic_vf_setattr_comp { @@ -1726,7 +1724,7 @@ struct ionic_vf_getattr_comp { u8 linkstate; __le64 stats_pa; u8 pad[11]; - }; + } __packed; u8 color; }; @@ -2471,7 +2469,7 @@ union ionic_dev_cmd_regs { union ionic_dev_cmd_comp comp; u8 rsvd[48]; u32 data[478]; - }; + } __packed; u32 words[512]; }; @@ -2484,7 +2482,7 @@ union ionic_dev_regs { struct { union ionic_dev_info_regs info; union ionic_dev_cmd_regs devcmd; - }; + } __packed; __le32 words[1024]; }; @@ -2574,6 +2572,4 @@ struct ionic_identity { union ionic_qos_identity qos; }; -#pragma pack(pop) - #endif /* _IONIC_IF_H_ */ From patchwork Sat Mar 7 01:04:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Nelson X-Patchwork-Id: 222892 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.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 57C73C10F25 for ; Sat, 7 Mar 2020 01:04:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2DB8A206E2 for ; Sat, 7 Mar 2020 01:04:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=pensando.io header.i=@pensando.io header.b="b3+6z306" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726970AbgCGBEZ (ORCPT ); Fri, 6 Mar 2020 20:04:25 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:39965 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726875AbgCGBEX (ORCPT ); Fri, 6 Mar 2020 20:04:23 -0500 Received: by mail-pl1-f194.google.com with SMTP id y1so1554834plp.7 for ; Fri, 06 Mar 2020 17:04:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7Fanemj7lqCOtUtHai5n5mSddCSmoi8i8DsjH04odmA=; b=b3+6z306dqR2rco0JJYn80xwDnbZABycVmqvwPs9AaMVMsVmHUw552qpH+eyMJsyvW rBrqylGAPwLfXbfFft5ZwPnntH0hNThJ4l/MGLRWJ2HTiZ1Oq2RMIfJwr34ZHLvsBCPY qcqZFnywiIy44T8bkDicAjDDITCuoR7cM9CgdhGYlJS5s0UC+n3DNwxJmHy0X9bIaXz/ wa8vGJV5XN7wtC/tZFwdcGW8MfOqyaFx8KsOVSrHa3c+hF2cxhHbn9G7C65nErplUCjx RlMJbbjHqUkEkAb1XpnT26r6g6NK4Ls1/yVrqjGpfXW4ccSuhfskafEH6ydt6k9/OPhr aAYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=7Fanemj7lqCOtUtHai5n5mSddCSmoi8i8DsjH04odmA=; b=i2rYhViubhzPR4z7stdwvz85uKCRa9VWIB58XDiT01A34hmB2+Hr0XVBSGxBOBhR78 /+jTyRSg3GWNNsmgyMOa2Gqadz3U7lcoWm2Cib/Hn1rFV4Lo8dB5y1P8A/QVEH9TztNf IzoOT/OIAMREyhljSQJtzfxxGVBO+sUFnLMKPp7ZSx81iVBw/65UIoc19l6BcBOSKs+k yy1h2VhWVukzXfavtSlOABZIypzB47SZzNQTbvZG541VQiQXxPbvNlEK6jsxb2Vg5uQh wagZh8QtPJQtMn9bhUA1Ms34j5jrFibF0mUIRqDWA7jZE5XZKBRz3y2USdcUCelvXBTF /qbg== X-Gm-Message-State: ANhLgQ1vbl/FNFsGVu0I3eXEUzf/eaG+XkUIDvbKUKvH0dJQv5P/jDIv +8yFcVgTZK5PPP8dSbHJxS1ZCw7XO4c= X-Google-Smtp-Source: ADFU+vuB+irirofDDDkfk0cUhWQ8jmiEwBkKCkvOuxJAVT3W6zXcFRg1A5OMpNzSuQx81cbRxaJXOw== X-Received: by 2002:a17:902:9889:: with SMTP id s9mr5173619plp.252.1583543061839; Fri, 06 Mar 2020 17:04:21 -0800 (PST) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id o66sm23224949pfb.93.2020.03.06.17.04.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Mar 2020 17:04:21 -0800 (PST) From: Shannon Nelson To: netdev@vger.kernel.org, davem@davemloft.net Cc: Shannon Nelson Subject: [PATCH v4 net-next 5/8] ionic: support ethtool rxhash disable Date: Fri, 6 Mar 2020 17:04:05 -0800 Message-Id: <20200307010408.65704-6-snelson@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200307010408.65704-1-snelson@pensando.io> References: <20200307010408.65704-1-snelson@pensando.io> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org We can disable rxhashing by setting rss_types to 0. The user can toggle this with "ethtool -K rxhash off|on", which calls into the .ndo_set_features callback with the NETIF_F_RXHASH feature bit set or cleared. This patch adds a check for that bit and updates the FW if necessary. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c index d1567e477b1f..4b953f9e9084 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c @@ -1094,6 +1094,7 @@ static int ionic_set_nic_features(struct ionic_lif *lif, u64 vlan_flags = IONIC_ETH_HW_VLAN_TX_TAG | IONIC_ETH_HW_VLAN_RX_STRIP | IONIC_ETH_HW_VLAN_RX_FILTER; + u64 old_hw_features; int err; ctx.cmd.lif_setattr.features = ionic_netdev_features_to_nic(features); @@ -1101,9 +1102,13 @@ static int ionic_set_nic_features(struct ionic_lif *lif, if (err) return err; + old_hw_features = lif->hw_features; lif->hw_features = le64_to_cpu(ctx.cmd.lif_setattr.features & ctx.comp.lif_setattr.features); + if ((old_hw_features ^ lif->hw_features) & IONIC_ETH_HW_RX_HASH) + ionic_lif_rss_config(lif, lif->rss_types, NULL, NULL); + if ((vlan_flags & features) && !(vlan_flags & le64_to_cpu(ctx.comp.lif_setattr.features))) dev_info_once(lif->ionic->dev, "NIC is not supporting vlan offload, likely in SmartNIC mode\n"); @@ -1357,13 +1362,15 @@ int ionic_lif_rss_config(struct ionic_lif *lif, const u16 types, .cmd.lif_setattr = { .opcode = IONIC_CMD_LIF_SETATTR, .attr = IONIC_LIF_ATTR_RSS, - .rss.types = cpu_to_le16(types), .rss.addr = cpu_to_le64(lif->rss_ind_tbl_pa), }, }; unsigned int i, tbl_sz; - lif->rss_types = types; + if (lif->hw_features & IONIC_ETH_HW_RX_HASH) { + lif->rss_types = types; + ctx.cmd.lif_setattr.rss.types = cpu_to_le16(types); + } if (key) memcpy(lif->rss_hash_key, key, IONIC_RSS_HASH_KEY_SIZE); From patchwork Sat Mar 7 01:04:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Nelson X-Patchwork-Id: 222890 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.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, 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 1FCC5C10DCE for ; Sat, 7 Mar 2020 01:04:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DDEEE206E2 for ; Sat, 7 Mar 2020 01:04:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=pensando.io header.i=@pensando.io header.b="rExHgF1F" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727018AbgCGBEb (ORCPT ); Fri, 6 Mar 2020 20:04:31 -0500 Received: from mail-pj1-f67.google.com ([209.85.216.67]:52587 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726892AbgCGBEX (ORCPT ); Fri, 6 Mar 2020 20:04:23 -0500 Received: by mail-pj1-f67.google.com with SMTP id lt1so1764334pjb.2 for ; Fri, 06 Mar 2020 17:04:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UDCCqqbOFCeRU+4k7aYMxmRsVqZz8gcsCbapPm06bfg=; b=rExHgF1Fsy3f3msf/8kHmwtwAdHDui+PcRSGBTU3Dyp2TqaopQXHGoEM8yZuXtdfF3 LQbuJlYRwWBqh9OqsQq2/rwUDJ4VtkvaeZmoGV4EnDjHCm7875IpSAKj4W3K2Laea5kj WLzYKPjzjTss1YKt4VrAX1E8P9JavOq4wWH7KNtibOBaU4uAQbrH7zRewCEvdTlWltVC 3R5xyymxzds8+fTTX8TPS/QgXw3UOYZ5BmzQRjmcB0SqukCPgFbDV5sxZGAPNSA6nQxw vFe0r8paxNHKDX8B9NYzJZRmMHjFxlypi2TPSdDcDZvUe9UubfSPgNqXC609MeXOYTVC i2lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=UDCCqqbOFCeRU+4k7aYMxmRsVqZz8gcsCbapPm06bfg=; b=MkQIdnNN+UIXvOn0zS9+Du5/XhmqM+TgWa4gKr78hRDxRg6U/BQAr+r4sGscXaSwiw laMwepocdrOtmfhIg4JtIgRokrqXKMUv1zr+q2gUolEapqxH7fAzRGPTXLIuK/XzKaQG aV1EjCbij321jxD/S86L6jkOzCxgxZbC1oo3tPdXGFdstrsvMW+tXDoUL4/7myv7EGK5 xQH9ewALcMYTT2S9RENvFxgfju4Xbn3kieA27x0uyAxmxU3Naqb4xxMXMH3DzPqEC6/W El6eyMbn7eq2SrZrQ7jjH4oy8nsveQUjQXW6gzczveSB82ygZLMkNX6ohLb+Y4gZADfw fMHw== X-Gm-Message-State: ANhLgQ32Glx+S4mvBL+FUZrf/2S8ddNWe8UUiUb2WAOacvcfcgQrmYea XdJdkHt4vSW3CK+stup0o73o0nqikRo= X-Google-Smtp-Source: ADFU+vtx2DLpWIXNrvvPwqjaEnkOfT9xamcrGF2QL0PrLArHA1lA8Zamcwv7t1eJJEbmj0bs9sm/rA== X-Received: by 2002:a17:90a:2308:: with SMTP id f8mr6521931pje.108.1583543062799; Fri, 06 Mar 2020 17:04:22 -0800 (PST) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id o66sm23224949pfb.93.2020.03.06.17.04.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Mar 2020 17:04:22 -0800 (PST) From: Shannon Nelson To: netdev@vger.kernel.org, davem@davemloft.net Cc: Shannon Nelson Subject: [PATCH v4 net-next 6/8] ionic: print pci bus lane info Date: Fri, 6 Mar 2020 17:04:06 -0800 Message-Id: <20200307010408.65704-7-snelson@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200307010408.65704-1-snelson@pensando.io> References: <20200307010408.65704-1-snelson@pensando.io> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Print the PCI bus lane information so people can keep an eye out for poor configurations that might not support the advertised speed. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c index 0ac6acbc5f31..2924cde440aa 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c @@ -248,6 +248,7 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) } pci_set_master(pdev); + pcie_print_link_status(pdev); err = ionic_map_bars(ionic); if (err) From patchwork Sat Mar 7 01:04:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Nelson X-Patchwork-Id: 222891 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.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 D20D2C10DCE for ; Sat, 7 Mar 2020 01:04:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AA9BE206E6 for ; Sat, 7 Mar 2020 01:04:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=pensando.io header.i=@pensando.io header.b="f+zpwgTb" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726269AbgCGBE2 (ORCPT ); Fri, 6 Mar 2020 20:04:28 -0500 Received: from mail-pj1-f65.google.com ([209.85.216.65]:34105 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726973AbgCGBE0 (ORCPT ); Fri, 6 Mar 2020 20:04:26 -0500 Received: by mail-pj1-f65.google.com with SMTP id gc16so2168047pjb.1 for ; Fri, 06 Mar 2020 17:04:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bPVg89V57/nOcUKwqCSha9bVmOVxG6rigL/iaVANxr8=; b=f+zpwgTbdsqLwOF4UMXIcIOt7OeFkyKeUl9yO47rHpEJyoKsJaG5rvKY1+HqSjt/05 1PcyAfRA2ULycWmMEXVFNvnRqnOQd5CX2D0PrvgdfzJ5DvSOMzEq0fXyNUdlffKjsOeK kuJa9RvpIzampT5As8qfNbban5BagAYlX2cqpSJPnPAIDKK6DUjFRu5GTvgj/Az0f7Xr tbS7TsoUwR/a4LwV9F8oxBmXen9sIQoorrI8FgVWTZCXV4jVCUgYOO8AHwL695yfs27Z Xlf2ne2Vw3Cz5974chIRQfZovFyxoddAKpE1eBcKepf6sSRj6Bh5vy86WepStHCZfRZN au7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bPVg89V57/nOcUKwqCSha9bVmOVxG6rigL/iaVANxr8=; b=IlbOUZsbLSCs7cRQgwZx+AJhLTH2mCRyhW16feLC7SiFY9MpwKWt2IVYOn9mGXcYpC gs5uWOFGRKao6Dz2SkpCKmFLy9JCI+1IcwEajZXaw9ZNF0TyM8kx00JluAL4Fa5yahrV lXOBp0dJjwsw72pywfkxa6x2xD6dA8N19H2ekoUuj10B9kQfJcuW4haHuDEtW+JAD99q pA7lc+zoggDzi6hcNZuhZAsH41veTKPYu3OOBtVLMa0GnZQ8fFTkKXj43XlYaE2eUpjr q9JuILVu9RubWvv0Qxd4gbaZ7MNQwAokvlAvXajq++c2895qYFzDdinHDrnoKXp++fGa gk0w== X-Gm-Message-State: ANhLgQ0Ixa2Fn9g7yaMOBUbjI43nU+f84FgLfronbH2EkL5nyKqw8utK ajbLqqTZjRiyrp0vc4jWyPx8cww7/TA= X-Google-Smtp-Source: ADFU+vt8LKUhAgEoLEXoVFQMv4CbHYLcSmrlCXmY5rfusZbNJGZ7i+DKiFJmZGadjAekyEb1IAkzqw== X-Received: by 2002:a17:90a:4487:: with SMTP id t7mr6277973pjg.104.1583543064563; Fri, 06 Mar 2020 17:04:24 -0800 (PST) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id o66sm23224949pfb.93.2020.03.06.17.04.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Mar 2020 17:04:24 -0800 (PST) From: Shannon Nelson To: netdev@vger.kernel.org, davem@davemloft.net Cc: Shannon Nelson , Leon Romanovsky Subject: [PATCH v4 net-next 8/8] ionic: drop ethtool driver version Date: Fri, 6 Mar 2020 17:04:08 -0800 Message-Id: <20200307010408.65704-9-snelson@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200307010408.65704-1-snelson@pensando.io> References: <20200307010408.65704-1-snelson@pensando.io> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Use the default kernel version in ethtool drv_info output and drop the module version. Cc: Leon Romanovsky Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic.h | 1 - drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | 1 - drivers/net/ethernet/pensando/ionic/ionic_main.c | 6 ++---- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic.h b/drivers/net/ethernet/pensando/ionic/ionic.h index 59f8385d591f..23ccc0da2341 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic.h +++ b/drivers/net/ethernet/pensando/ionic/ionic.h @@ -12,7 +12,6 @@ struct ionic_lif; #define IONIC_DRV_NAME "ionic" #define IONIC_DRV_DESCRIPTION "Pensando Ethernet NIC Driver" -#define IONIC_DRV_VERSION "0.20.0-k" #define PCI_VENDOR_ID_PENSANDO 0x1dd8 diff --git a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c index acd53e27d1ec..bea9b78e0189 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c @@ -86,7 +86,6 @@ static void ionic_get_drvinfo(struct net_device *netdev, struct ionic *ionic = lif->ionic; strlcpy(drvinfo->driver, IONIC_DRV_NAME, sizeof(drvinfo->driver)); - strlcpy(drvinfo->version, IONIC_DRV_VERSION, sizeof(drvinfo->version)); strlcpy(drvinfo->fw_version, ionic->idev.dev_info.fw_version, sizeof(drvinfo->fw_version)); strlcpy(drvinfo->bus_info, ionic_bus_info(ionic), diff --git a/drivers/net/ethernet/pensando/ionic/ionic_main.c b/drivers/net/ethernet/pensando/ionic/ionic_main.c index a8e3fb73b465..e4a76e66f542 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_main.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_main.c @@ -6,6 +6,7 @@ #include #include #include +#include #include "ionic.h" #include "ionic_bus.h" @@ -15,7 +16,6 @@ MODULE_DESCRIPTION(IONIC_DRV_DESCRIPTION); MODULE_AUTHOR("Pensando Systems, Inc"); MODULE_LICENSE("GPL"); -MODULE_VERSION(IONIC_DRV_VERSION); static const char *ionic_error_to_str(enum ionic_status_code code) { @@ -414,7 +414,7 @@ int ionic_identify(struct ionic *ionic) memset(ident, 0, sizeof(*ident)); ident->drv.os_type = cpu_to_le32(IONIC_OS_TYPE_LINUX); - strncpy(ident->drv.driver_ver_str, IONIC_DRV_VERSION, + strncpy(ident->drv.driver_ver_str, UTS_RELEASE, sizeof(ident->drv.driver_ver_str) - 1); mutex_lock(&ionic->dev_cmd_lock); @@ -558,8 +558,6 @@ int ionic_port_reset(struct ionic *ionic) static int __init ionic_init_module(void) { - pr_info("%s %s, ver %s\n", - IONIC_DRV_NAME, IONIC_DRV_DESCRIPTION, IONIC_DRV_VERSION); ionic_debugfs_create(); return ionic_bus_register_driver(); }