From patchwork Thu Mar 12 21:50:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Nelson X-Patchwork-Id: 222607 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 0E57BC2BB1D for ; Thu, 12 Mar 2020 21:50:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D185E206FA for ; Thu, 12 Mar 2020 21:50:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=pensando.io header.i=@pensando.io header.b="uYDe71js" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726610AbgCLVua (ORCPT ); Thu, 12 Mar 2020 17:50:30 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:36184 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726481AbgCLVu3 (ORCPT ); Thu, 12 Mar 2020 17:50:29 -0400 Received: by mail-pl1-f196.google.com with SMTP id g2so702654plo.3 for ; Thu, 12 Mar 2020 14:50:28 -0700 (PDT) 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=6lmGBSPUfVIaACv+X8H3ofoFkhY/4KtRsO+aBb8AcPI=; b=uYDe71jscbUKjLsToOiSNloTaA+XUdjzFLxCZeVuaJetmGtN2/RzmwHAeY2sl6Ot7B f5H98DwYP0s0XSPUKh4TU1G/4cDlqg+nD4UHi8/Qyr0lzQXdhBw9kr7KOYCPY37AkAix drvMD5NArUERCE6yG7GwNv9cPOoK7zWNY4UtzZefr5nqNwWmhEjXPxHZf2a2u7OGi899 zlCcZkMa8cC1zPx2lpcGjOXyB+vhi/ExyndZc484Q6SjvdzdaPvM2wjVQnYqjFfn50AJ /5CmL8aOMKaHMQbnZPJUMIU8/+vdG90+WvL4SrmeFSMi+YZfDkgWA4rTKo+Dn+2Wxcm0 J7UQ== 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=6lmGBSPUfVIaACv+X8H3ofoFkhY/4KtRsO+aBb8AcPI=; b=YShYfOdOpz1Ecb/HwWRDEIn7asbMQO2BZOJr8rEDkzcdcE99pdlYtPkGqFjHKUsSzw h2ldSHH/9zyUq9L/VzQzCmPgzcEVeJ4pxfFzZEwWWOOQ5DTQ0EWfvHfdh0Y3g3hqAXti KW/ffwQrrIheD3S03n/8J6qS4SDzfwyOfk4TqZW4pKjdjKcNHK03A1C4pZvPyO/M/uoz H93VsMIcD6gd8JLDl5o4an6B8wO+2Bc1zm7kIeMoJ88Mj/iz3Dss9VjlN79u23LsoWk7 uOitK6WpoBI/15nXwTMOilTPNnY3clzF4s9yT8oURPlsWYIhSmHnoh4IUtZEEvA3Uq7M r0FQ== X-Gm-Message-State: ANhLgQ1kTC/Xh+BqeZ0mQ1IX+0SEs4SCxKHWQ1CJ1CKyIl6lf9hIvQcK 0EGO2S8Dv49mwiN7tsxYOllzeKjkRl0= X-Google-Smtp-Source: ADFU+vufYP0lo/+e07bHWowsp2SY181MOVqPUpGqQ3i3D+IEhJ1S+qnipYowltBItS8VZz8csjwGIQ== X-Received: by 2002:a17:902:14b:: with SMTP id 69mr10120942plb.121.1584049827662; Thu, 12 Mar 2020 14:50:27 -0700 (PDT) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id p2sm38281203pfb.41.2020.03.12.14.50.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Mar 2020 14:50:26 -0700 (PDT) From: Shannon Nelson To: netdev@vger.kernel.org, davem@davemloft.net Cc: Shannon Nelson Subject: [PATCH net-next 1/7] ionic: tx and rx queues state follows link state Date: Thu, 12 Mar 2020 14:50:09 -0700 Message-Id: <20200312215015.69547-2-snelson@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200312215015.69547-1-snelson@pensando.io> References: <20200312215015.69547-1-snelson@pensando.io> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org When link goes down, tear down the Tx and Rx queues. When link comes back up, rebuild the queues. This lets us release memory resources for devices that aren't going to use them, and prepares us for support of fw upgrade. We also add a couple of checks on tear down to watch out for structs already torn down. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_lif.c | 76 +++++++++++++------ .../net/ethernet/pensando/ionic/ionic_main.c | 7 +- 2 files changed, 58 insertions(+), 25 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c index aaf4a40fa98b..682f4b5af704 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c @@ -73,6 +73,11 @@ static void ionic_link_status_check(struct ionic_lif *lif) u16 link_status; bool link_up; + if (lif->ionic->is_mgmt_nic) { + clear_bit(IONIC_LIF_F_LINK_CHECK_REQUESTED, lif->state); + return; + } + link_status = le16_to_cpu(lif->info->status.link_status); link_up = link_status == IONIC_PORT_OPER_STATUS_UP; @@ -81,20 +86,28 @@ static void ionic_link_status_check(struct ionic_lif *lif) goto link_out; if (link_up) { - netdev_info(netdev, "Link up - %d Gbps\n", - le32_to_cpu(lif->info->status.link_speed) / 1000); + u32 link_speed; - if (test_bit(IONIC_LIF_F_UP, lif->state)) { - netif_tx_wake_all_queues(lif->netdev); - netif_carrier_on(netdev); + link_speed = le16_to_cpu(lif->info->status.link_speed); + netdev_info(netdev, "Link up - %d Gbps\n", link_speed / 1000); + + if (!test_bit(IONIC_LIF_F_UP, lif->state) && + netif_running(netdev)) { + rtnl_lock(); + ionic_open(netdev); + rtnl_unlock(); } + + netif_carrier_on(netdev); } else { netdev_info(netdev, "Link down\n"); - - /* carrier off first to avoid watchdog timeout */ netif_carrier_off(netdev); - if (test_bit(IONIC_LIF_F_UP, lif->state)) - netif_tx_stop_all_queues(netdev); + + if (test_bit(IONIC_LIF_F_UP, lif->state)) { + rtnl_lock(); + ionic_stop(netdev); + rtnl_unlock(); + } } link_out: @@ -275,8 +288,10 @@ static void ionic_lif_qcq_deinit(struct ionic_lif *lif, struct ionic_qcq *qcq) if (qcq->flags & IONIC_QCQ_F_INTR) { ionic_intr_mask(idev->intr_ctrl, qcq->intr.index, IONIC_INTR_MASK_SET); + irq_set_affinity_hint(qcq->intr.vector, NULL); devm_free_irq(dev, qcq->intr.vector, &qcq->napi); netif_napi_del(&qcq->napi); + qcq->intr.vector = 0; } qcq->flags &= ~IONIC_QCQ_F_INITED; @@ -318,19 +333,21 @@ static void ionic_qcqs_free(struct ionic_lif *lif) lif->adminqcq = NULL; } - for (i = 0; i < lif->nxqs; i++) - if (lif->rxqcqs[i].stats) - devm_kfree(dev, lif->rxqcqs[i].stats); - - devm_kfree(dev, lif->rxqcqs); - lif->rxqcqs = NULL; - - for (i = 0; i < lif->nxqs; i++) - if (lif->txqcqs[i].stats) - devm_kfree(dev, lif->txqcqs[i].stats); + if (lif->rxqcqs) { + for (i = 0; i < lif->nxqs; i++) + if (lif->rxqcqs[i].stats) + devm_kfree(dev, lif->rxqcqs[i].stats); + devm_kfree(dev, lif->rxqcqs); + lif->rxqcqs = NULL; + } - devm_kfree(dev, lif->txqcqs); - lif->txqcqs = NULL; + if (lif->txqcqs) { + for (i = 0; i < lif->nxqs; i++) + if (lif->txqcqs[i].stats) + devm_kfree(dev, lif->txqcqs[i].stats); + devm_kfree(dev, lif->txqcqs); + lif->txqcqs = NULL; + } } static void ionic_link_qcq_interrupts(struct ionic_qcq *src_qcq, @@ -1573,7 +1590,17 @@ int ionic_open(struct net_device *netdev) struct ionic_lif *lif = netdev_priv(netdev); int err; - netif_carrier_off(netdev); + if (test_bit(IONIC_LIF_F_UP, lif->state)) { + dev_dbg(lif->ionic->dev, "%s: %s called when state=UP\n", + __func__, lif->name); + return 0; + } + + ionic_link_status_check_request(lif); + + /* wait until carrier is up before creating rx and tx queues */ + if (!netif_carrier_ok(lif->netdev)) + return 0; err = ionic_txrx_alloc(lif); if (err) @@ -1592,7 +1619,6 @@ int ionic_open(struct net_device *netdev) set_bit(IONIC_LIF_F_UP, lif->state); - ionic_link_status_check_request(lif); if (netif_carrier_ok(netdev)) netif_tx_wake_all_queues(netdev); @@ -1611,7 +1637,7 @@ int ionic_stop(struct net_device *netdev) int err = 0; if (!test_bit(IONIC_LIF_F_UP, lif->state)) { - dev_dbg(lif->ionic->dev, "%s: %s state=DOWN\n", + dev_dbg(lif->ionic->dev, "%s: %s called when state=DOWN\n", __func__, lif->name); return 0; } @@ -1922,6 +1948,8 @@ static struct ionic_lif *ionic_lif_alloc(struct ionic *ionic, unsigned int index ionic_ethtool_set_ops(netdev); netdev->watchdog_timeo = 2 * HZ; + netif_carrier_off(netdev); + netdev->min_mtu = IONIC_MIN_MTU; netdev->max_mtu = IONIC_MAX_MTU; diff --git a/drivers/net/ethernet/pensando/ionic/ionic_main.c b/drivers/net/ethernet/pensando/ionic/ionic_main.c index e4a76e66f542..40345281b2c9 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_main.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_main.c @@ -240,11 +240,16 @@ static void ionic_adminq_cb(struct ionic_queue *q, static int ionic_adminq_post(struct ionic_lif *lif, struct ionic_admin_ctx *ctx) { - struct ionic_queue *adminq = &lif->adminqcq->q; + struct ionic_queue *adminq; int err = 0; WARN_ON(in_interrupt()); + if (!lif->adminqcq) + return -EIO; + + adminq = &lif->adminqcq->q; + spin_lock(&lif->adminq_lock); if (!ionic_q_has_space(adminq, 1)) { err = -ENOSPC; From patchwork Thu Mar 12 21:50:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Nelson X-Patchwork-Id: 222606 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 C0F10C1975A for ; Thu, 12 Mar 2020 21:50:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 981EF206FA for ; Thu, 12 Mar 2020 21:50:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=pensando.io header.i=@pensando.io header.b="v9iFFMDA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726675AbgCLVud (ORCPT ); Thu, 12 Mar 2020 17:50:33 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:34562 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726632AbgCLVub (ORCPT ); Thu, 12 Mar 2020 17:50:31 -0400 Received: by mail-pg1-f194.google.com with SMTP id t3so3738137pgn.1 for ; Thu, 12 Mar 2020 14:50:31 -0700 (PDT) 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=CjLHdiigT+dY4nI+BffDj7ZEu+9tEft0aQo1byukjwg=; b=v9iFFMDA7c4qgS1K4lC2u7cPuDWPdx4oX9uOtBoocOhmdnVpUGPR0F2xGyJ1WXU1H2 uELnMpKzGGJ+0Ed9C1wJtHofjv0m36XBM0VDYLssWYvhOirT1xOCnLyERpxopojML6OJ qCeLcQ32lmPA19PWZU7A+YhikC57JCTY5iLgKM59KVL2xq1/A0Ov7kqBJYz77fGfK7f7 05VjOR0CHIfXHykTMtGJAM2PpQy8ewz1oxZFp8MGowyqGMydKGRETctCvfWfrm7UNVTT GsZUYA9DpI2Hgt3FnPlKzNGI0680kb6Y3xafN79HHmwKvE8VnOP2f6ALbW0UNUowumqS wC/g== 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=CjLHdiigT+dY4nI+BffDj7ZEu+9tEft0aQo1byukjwg=; b=XqM6IXQQ+V9PFbH/ciD8bhiD+T7xiyBYGny42brf8psjjhkWMVlPvljZ7gnJl2MKvC hNGWNmL3xNsuXL1A7q4zyerVxCaz6tvCZDeCMqXHTn3ZU9lCr3G2hUt8cS7CbR4PjqVr HMYt8LnZKbVZ5bvCy/TeAIuMeLVxIQnkuxoI1gpQWv6G34TiFiGRx/xUyD+Rf95zjWaL oIY6l3dxL8SDtQa9/OpEg9jvM+0OZzUpWHgdUqMZAvCw/oI76UF0LarDZ9REdAbVOxyY /hajesHNTX8euBuOidywdWITUE4hbSB2jKNibt7Kx9qkFVDlvKgme6tCtxc8afinK7lr Eq/g== X-Gm-Message-State: ANhLgQ3KL4qUH4nyPPWMjC8dKQIidz3OVnRGCwUNxahfolN6vs3Go1Lw WiUYTU41gTb184I1xHnzJ8BSf5H3VQU= X-Google-Smtp-Source: ADFU+vvY8QV7rO55+RWmC0cZZdJJYz7IhQ2UPDaMZqLSdY9sVviTJQx/1Qynwlih4+Vj1guLy8GFlg== X-Received: by 2002:a63:1a53:: with SMTP id a19mr9882453pgm.227.1584049830274; Thu, 12 Mar 2020 14:50:30 -0700 (PDT) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id p2sm38281203pfb.41.2020.03.12.14.50.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Mar 2020 14:50:29 -0700 (PDT) From: Shannon Nelson To: netdev@vger.kernel.org, davem@davemloft.net Cc: Shannon Nelson Subject: [PATCH net-next 3/7] ionic: ignore eexist on rx filter add Date: Thu, 12 Mar 2020 14:50:11 -0700 Message-Id: <20200312215015.69547-4-snelson@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200312215015.69547-1-snelson@pensando.io> References: <20200312215015.69547-1-snelson@pensando.io> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Don't worry if the rx filter add firmware request fails on EEXIST, at least we know the filter is there. Same for the delete request, at least we know it isn't there. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c index 682f4b5af704..eb1e885a2f70 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c @@ -849,7 +849,7 @@ static int ionic_lif_addr_add(struct ionic_lif *lif, const u8 *addr) memcpy(ctx.cmd.rx_filter_add.mac.addr, addr, ETH_ALEN); err = ionic_adminq_post_wait(lif, &ctx); - if (err) + if (err && err != -EEXIST) return err; return ionic_rx_filter_save(lif, 0, IONIC_RXQ_INDEX_ANY, 0, &ctx); @@ -879,7 +879,7 @@ static int ionic_lif_addr_del(struct ionic_lif *lif, const u8 *addr) spin_unlock_bh(&lif->rx_filters.lock); err = ionic_adminq_post_wait(lif, &ctx); - if (err) + if (err && err != -EEXIST) return err; netdev_dbg(lif->netdev, "rx_filter del ADDR %pM (id %d)\n", addr, From patchwork Thu Mar 12 21:50:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Nelson X-Patchwork-Id: 222604 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 6487EC10DCE for ; Thu, 12 Mar 2020 21:50:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 34AB3206FA for ; Thu, 12 Mar 2020 21:50:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=pensando.io header.i=@pensando.io header.b="jtcuZBPX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726684AbgCLVug (ORCPT ); Thu, 12 Mar 2020 17:50:36 -0400 Received: from mail-pj1-f66.google.com ([209.85.216.66]:54467 "EHLO mail-pj1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726637AbgCLVud (ORCPT ); Thu, 12 Mar 2020 17:50:33 -0400 Received: by mail-pj1-f66.google.com with SMTP id np16so3093478pjb.4 for ; Thu, 12 Mar 2020 14:50:32 -0700 (PDT) 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=3mb9QuPeiADGGqmEP+838Y3QNMnODA03xCrK5e6N588=; b=jtcuZBPXsHGdn+xxrAG+082fFCkEWRwybCs+7jsdq9Ca1Ktf0bwwl4uUV9b7zz9HyN DlK9QQaiCTRa+pi2Cmkub50ENeSJLNxmmvrPlvVl+97DowjLCF1HL8u1g/R2yn5LwuwR X4XCX1cXB+i1nwNbQ3J+k/5shOLRSYDFQliUvm8l6RpaN7J3KueXxmYjR82fjVSZzbuH SgIiSpX461GZUFreY/d75RWL6l6mx/ILABYKSspI4qFLSZUf/QuD0tppxYDdirm1GROs J0U+oZX5K+V57D4yKzHyPNxjgT3AdX7JQnSFcb/ojUfe03vFJAbfnAyiqUl6okv8QTYM /Ppw== 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=3mb9QuPeiADGGqmEP+838Y3QNMnODA03xCrK5e6N588=; b=a4axrLcOo50rY5rqB3mCdiQbXg4R5rQZVdhp2Gzcy7+WLeNpEyB+e1d8r88/TCSlXl c6B3NS6N2oU1yJxMBPcH5C//P9FHE40a488+YBuWNL/+IJVLqRHqNDGTjU+35WtGvE9K O/0tpOBZEK3mbE3fhH1AyI4jAcHvGHuI6CY1BkBwgdAaMU+7j4EtfUyyKJhYvtDWM4Hg nO+EqdyCwgkNGby+oIScHIVpp/nIwjnx2+0067wHxsHsnSgrozLXtltOdukIpBP9FUDi QC4vaO5nkw9TZfwLmGv1FpsEYAMRicAq7tgrTGW9aml+mLYu1PZAOOMcNfOG0okj1rl/ WizA== X-Gm-Message-State: ANhLgQ1KcGehb3Fitfiouzyho9DEQj8l3A8w2yhmKjpyl5NHEFIay7yj Oko3i3KWXChjuFhcJQfT/TD9wlugXus= X-Google-Smtp-Source: ADFU+vs/TFSUq/bZe8RVcJZ3rmcSb/6Z0KbfcP3qpprYqiqEiSc0fre8j1uxTB5T4Tz6RKHqWPKJvA== X-Received: by 2002:a17:902:247:: with SMTP id 65mr10175663plc.128.1584049831486; Thu, 12 Mar 2020 14:50:31 -0700 (PDT) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id p2sm38281203pfb.41.2020.03.12.14.50.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Mar 2020 14:50:30 -0700 (PDT) From: Shannon Nelson To: netdev@vger.kernel.org, davem@davemloft.net Cc: Shannon Nelson Subject: [PATCH net-next 4/7] ionic: add a flag for FW in reset Date: Thu, 12 Mar 2020 14:50:12 -0700 Message-Id: <20200312215015.69547-5-snelson@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200312215015.69547-1-snelson@pensando.io> References: <20200312215015.69547-1-snelson@pensando.io> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add the FW_RESET flag, and prevent a few things from happening if the FW_RESET flag is set. Code for setting and clearing it is in a following patch. Signed-off-by: Shannon Nelson --- Depending on timing of net updates into net-next, this may have a conflict with 905fc4f8a399 ("ionic: fix vf op lock usage") .../ethernet/pensando/ionic/ionic_bus_pci.c | 4 ++ .../ethernet/pensando/ionic/ionic_ethtool.c | 17 +++++++- .../net/ethernet/pensando/ionic/ionic_lif.c | 40 +++++++++++++++---- .../net/ethernet/pensando/ionic/ionic_lif.h | 1 + .../net/ethernet/pensando/ionic/ionic_main.c | 8 ++-- 5 files changed, 58 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c index 60fc191a35e5..c55e28f3c986 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c @@ -185,6 +185,10 @@ static int ionic_sriov_configure(struct pci_dev *pdev, int num_vfs) struct device *dev = ionic->dev; int ret = 0; + if (ionic->master_lif && + test_bit(IONIC_LIF_F_FW_RESET, ionic->master_lif->state)) + return -EBUSY; + if (num_vfs > 0) { ret = pci_enable_sriov(pdev, num_vfs); if (ret) { diff --git a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c index a233716eac29..ddae21b1f80a 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c @@ -27,10 +27,11 @@ static void ionic_get_stats_strings(struct ionic_lif *lif, u8 *buf) static void ionic_get_stats(struct net_device *netdev, struct ethtool_stats *stats, u64 *buf) { - struct ionic_lif *lif; + struct ionic_lif *lif = netdev_priv(netdev); u32 i; - lif = netdev_priv(netdev); + if (test_bit(IONIC_LIF_F_FW_RESET, lif->state)) + return; memset(buf, 0, stats->n_stats * sizeof(*buf)); for (i = 0; i < ionic_num_stats_grps; i++) @@ -255,6 +256,9 @@ static int ionic_set_link_ksettings(struct net_device *netdev, struct ionic_dev *idev; int err = 0; + if (test_bit(IONIC_LIF_F_FW_RESET, lif->state)) + return -EBUSY; + idev = &lif->ionic->idev; /* set autoneg */ @@ -303,6 +307,9 @@ static int ionic_set_pauseparam(struct net_device *netdev, u32 requested_pause; int err; + if (test_bit(IONIC_LIF_F_FW_RESET, lif->state)) + return -EBUSY; + if (pause->autoneg) return -EOPNOTSUPP; @@ -355,6 +362,9 @@ static int ionic_set_fecparam(struct net_device *netdev, u8 fec_type; int ret = 0; + if (test_bit(IONIC_LIF_F_FW_RESET, lif->state)) + return -EBUSY; + if (lif->ionic->idev.port_info->config.an_enable) { netdev_err(netdev, "FEC request not allowed while autoneg is enabled\n"); return -EINVAL; @@ -739,6 +749,9 @@ static int ionic_nway_reset(struct net_device *netdev) struct ionic *ionic = lif->ionic; int err = 0; + if (test_bit(IONIC_LIF_F_FW_RESET, lif->state)) + return -EBUSY; + /* flap the link to force auto-negotiation */ mutex_lock(&ionic->dev_cmd_lock); diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c index eb1e885a2f70..7909a037d5f7 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c @@ -1664,6 +1664,9 @@ static int ionic_get_vf_config(struct net_device *netdev, struct ionic *ionic = lif->ionic; int ret = 0; + if (test_bit(IONIC_LIF_F_FW_RESET, lif->state)) + return -EBUSY; + down_read(&ionic->vf_op_lock); if (vf >= pci_num_vf(ionic->pdev) || !ionic->vfs) { @@ -1691,6 +1694,9 @@ static int ionic_get_vf_stats(struct net_device *netdev, int vf, struct ionic_lif_stats *vs; int ret = 0; + if (test_bit(IONIC_LIF_F_FW_RESET, lif->state)) + return -EBUSY; + down_read(&ionic->vf_op_lock); if (vf >= pci_num_vf(ionic->pdev) || !ionic->vfs) { @@ -1726,6 +1732,9 @@ static int ionic_set_vf_mac(struct net_device *netdev, int vf, u8 *mac) if (!(is_zero_ether_addr(mac) || is_valid_ether_addr(mac))) return -EINVAL; + if (test_bit(IONIC_LIF_F_FW_RESET, lif->state)) + return -EBUSY; + down_read(&ionic->vf_op_lock); if (vf >= pci_num_vf(ionic->pdev) || !ionic->vfs) { @@ -1757,6 +1766,9 @@ static int ionic_set_vf_vlan(struct net_device *netdev, int vf, u16 vlan, if (proto != htons(ETH_P_8021Q)) return -EPROTONOSUPPORT; + if (test_bit(IONIC_LIF_F_FW_RESET, lif->state)) + return -EBUSY; + down_read(&ionic->vf_op_lock); if (vf >= pci_num_vf(ionic->pdev) || !ionic->vfs) { @@ -1783,6 +1795,9 @@ static int ionic_set_vf_rate(struct net_device *netdev, int vf, if (tx_min) return -EINVAL; + if (test_bit(IONIC_LIF_F_FW_RESET, lif->state)) + return -EBUSY; + down_write(&ionic->vf_op_lock); if (vf >= pci_num_vf(ionic->pdev) || !ionic->vfs) { @@ -1805,6 +1820,9 @@ static int ionic_set_vf_spoofchk(struct net_device *netdev, int vf, bool set) u8 data = set; /* convert to u8 for config */ int ret; + if (test_bit(IONIC_LIF_F_FW_RESET, lif->state)) + return -EBUSY; + down_write(&ionic->vf_op_lock); if (vf >= pci_num_vf(ionic->pdev) || !ionic->vfs) { @@ -1827,6 +1845,9 @@ static int ionic_set_vf_trust(struct net_device *netdev, int vf, bool set) u8 data = set; /* convert to u8 for config */ int ret; + if (test_bit(IONIC_LIF_F_FW_RESET, lif->state)) + return -EBUSY; + down_write(&ionic->vf_op_lock); if (vf >= pci_num_vf(ionic->pdev) || !ionic->vfs) { @@ -1863,6 +1884,9 @@ static int ionic_set_vf_link_state(struct net_device *netdev, int vf, int set) return -EINVAL; } + if (test_bit(IONIC_LIF_F_FW_RESET, lif->state)) + return -EBUSY; + down_write(&ionic->vf_op_lock); if (vf >= pci_num_vf(ionic->pdev) || !ionic->vfs) { @@ -2055,7 +2079,8 @@ static void ionic_lif_free(struct ionic_lif *lif) /* free queues */ ionic_qcqs_free(lif); - ionic_lif_reset(lif); + if (!test_bit(IONIC_LIF_F_FW_RESET, lif->state)) + ionic_lif_reset(lif); /* free lif info */ dma_free_coherent(dev, lif->info_sz, lif->info, lif->info_pa); @@ -2093,6 +2118,11 @@ static void ionic_lif_deinit(struct ionic_lif *lif) clear_bit(IONIC_LIF_F_INITED, lif->state); + if (!test_bit(IONIC_LIF_F_FW_RESET, lif->state)) { + cancel_work_sync(&lif->deferred.work); + cancel_work_sync(&lif->tx_timeout_work); + } + ionic_rx_filters_deinit(lif); ionic_lif_rss_deinit(lif); @@ -2454,12 +2484,8 @@ void ionic_lifs_unregister(struct ionic *ionic) * current model, so don't bother searching the * ionic->lif for candidates to unregister */ - if (!ionic->master_lif) - return; - - cancel_work_sync(&ionic->master_lif->deferred.work); - cancel_work_sync(&ionic->master_lif->tx_timeout_work); - if (ionic->master_lif->netdev->reg_state == NETREG_REGISTERED) + if (ionic->master_lif && + ionic->master_lif->netdev->reg_state == NETREG_REGISTERED) unregister_netdev(ionic->master_lif->netdev); } diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.h b/drivers/net/ethernet/pensando/ionic/ionic_lif.h index 7c0c6fef8c0b..d811cbb790dc 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.h +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.h @@ -126,6 +126,7 @@ enum ionic_lif_state_flags { IONIC_LIF_F_UP, IONIC_LIF_F_LINK_CHECK_REQUESTED, IONIC_LIF_F_QUEUE_RESET, + IONIC_LIF_F_FW_RESET, /* leave this as last */ IONIC_LIF_F_STATE_SIZE diff --git a/drivers/net/ethernet/pensando/ionic/ionic_main.c b/drivers/net/ethernet/pensando/ionic/ionic_main.c index 40345281b2c9..601865db7e03 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_main.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_main.c @@ -283,9 +283,11 @@ int ionic_adminq_post_wait(struct ionic_lif *lif, struct ionic_admin_ctx *ctx) err = ionic_adminq_post(lif, ctx); if (err) { - name = ionic_opcode_to_str(ctx->cmd.cmd.opcode); - netdev_err(netdev, "Posting of %s (%d) failed: %d\n", - name, ctx->cmd.cmd.opcode, err); + if (!test_bit(IONIC_LIF_F_FW_RESET, lif->state)) { + name = ionic_opcode_to_str(ctx->cmd.cmd.opcode); + netdev_err(netdev, "Posting of %s (%d) failed: %d\n", + name, ctx->cmd.cmd.opcode, err); + } return err; } From patchwork Thu Mar 12 21:50:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Nelson X-Patchwork-Id: 222605 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 0D8C9C10DCE for ; Thu, 12 Mar 2020 21:50:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CC35020716 for ; Thu, 12 Mar 2020 21:50:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=pensando.io header.i=@pensando.io header.b="A6lXYk+B" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726703AbgCLVuh (ORCPT ); Thu, 12 Mar 2020 17:50:37 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:38754 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726632AbgCLVue (ORCPT ); Thu, 12 Mar 2020 17:50:34 -0400 Received: by mail-pg1-f193.google.com with SMTP id x7so3731431pgh.5 for ; Thu, 12 Mar 2020 14:50:34 -0700 (PDT) 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=Jgxy3tCrGex6W2ji7AyPVdZL2zZf5ftOnGNPJQUguS8=; b=A6lXYk+B/IokykcSQKMhWcNCSF5DNGu31wRY8H/C1tsENFdmB3pefb7+n1EEy27Qzv fsmLL5NHx/FEOW9KOkOdRHJk/6RIOXf2hj+mXI1re8Ci4X7bdI+7RIbQxgH78iOWdMxR VRBItvS2D6qZLyX+jEue/i97krBYAJA29/Cbk+0IpVx3Z2pfAwK8QkCXNuo15PwwSf5W eFhCdrvaxQ0p58D17K5JX2VvO95BtMHpdkPl30uDZqU1bw2QB8jCIWkbWPCIy8SYWMq9 bJULuIXWRS24YIoUPZLQUrBzLGcFiYqEWNGPgX2jC/+9EVbAaCzRgpmEFb/9o5+5QPMz temA== 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=Jgxy3tCrGex6W2ji7AyPVdZL2zZf5ftOnGNPJQUguS8=; b=cg6GPxFPNh6ncdIFaG9aSUiuTeng28MTMNWAf3pLZydt3PvYotIWV32pGfonRfcL6f /NF1iXuv8psUjW50DIgysYXqLJNvk6ODxGQcnnnJuKW7nrTgCzzP38lPxc9Djd3m3gP0 6OhwUOXVd03FuanPLsKYu2lPrPhoHjTY9naKM+3vD1IU2Bp6PZAA8NxaRMoWF8fe+0Sb RRwDsV8QQ/GSa/+JIZrejZWNmKNRZExLs7yJPWc8vf3SsHTQ5Tf8g9ONvSal6L5TzXbv M9Xtq5kls8NaPQdH+Jw1c5PN6R35FY+5YigdP0xvpsfsxHPJQINQ2WFK0VwnJMhsCfrG mtVQ== X-Gm-Message-State: ANhLgQ2zUS+2T8RvwuWr6seZNWptwShp36ZDQvOTXk4qa/Ke2UxWgdpf cWvYSBiKIy2FDxCivrgTK3+3UXPVU70= X-Google-Smtp-Source: ADFU+vvmYh4t8G0Q6lCo0rbjBUh5NZ8k5uM4B9EUY4uQn3OAEbpWWFP0nTrid+zG4evj3j8ngicF2A== X-Received: by 2002:aa7:8553:: with SMTP id y19mr8246175pfn.307.1584049833115; Thu, 12 Mar 2020 14:50:33 -0700 (PDT) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id p2sm38281203pfb.41.2020.03.12.14.50.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Mar 2020 14:50:31 -0700 (PDT) From: Shannon Nelson To: netdev@vger.kernel.org, davem@davemloft.net Cc: Shannon Nelson Subject: [PATCH net-next 5/7] ionic: remove lifs on fw reset Date: Thu, 12 Mar 2020 14:50:13 -0700 Message-Id: <20200312215015.69547-6-snelson@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200312215015.69547-1-snelson@pensando.io> References: <20200312215015.69547-1-snelson@pensando.io> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org When the FW RESET event comes to the driver from the firmware, tear down the LIFs. This event signals a FW upgrade where we need to quiesce all operations and wait for the FW to restart. The FW will continue the update process once it sees all the LIFs are reset. When the update process is done it will set the fw_status back to RUNNING. Meanwhile, the heartbeat check continues and when the fw_status is seen as set to running we can rebuild the LIFs. We expect that there was a LINK_DOWN event before this to stop the queues, and there will be a LINK_UP event afterwards to get things started again. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_lif.c | 79 ++++++++++++++++--- .../net/ethernet/pensando/ionic/ionic_lif.h | 1 + 2 files changed, 70 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c index 7909a037d5f7..a6af75031347 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c @@ -21,6 +21,9 @@ static void ionic_lif_rx_mode(struct ionic_lif *lif, unsigned int rx_mode); static int ionic_lif_addr_add(struct ionic_lif *lif, const u8 *addr); static int ionic_lif_addr_del(struct ionic_lif *lif, const u8 *addr); static void ionic_link_status_check(struct ionic_lif *lif); +static void ionic_lif_handle_fw_down(struct ionic_lif *lif); +static void ionic_lif_handle_fw_up(struct ionic_lif *lif); +static void ionic_lif_set_netdev_info(struct ionic_lif *lif); static void ionic_lif_deferred_work(struct work_struct *work) { @@ -50,6 +53,12 @@ static void ionic_lif_deferred_work(struct work_struct *work) case IONIC_DW_TYPE_LINK_STATUS: ionic_link_status_check(lif); break; + case IONIC_DW_TYPE_LIF_RESET: + if (w->fw_status) + ionic_lif_handle_fw_up(lif); + else + ionic_lif_handle_fw_down(lif); + break; default: break; } @@ -690,6 +699,7 @@ static bool ionic_notifyq_service(struct ionic_cq *cq, struct ionic_cq_info *cq_info) { union ionic_notifyq_comp *comp = cq_info->cq_desc; + struct ionic_deferred_work *work; struct net_device *netdev; struct ionic_queue *q; struct ionic_lif *lif; @@ -715,11 +725,13 @@ static bool ionic_notifyq_service(struct ionic_cq *cq, ionic_link_status_check_request(lif); break; case IONIC_EVENT_RESET: - netdev_info(netdev, "Notifyq IONIC_EVENT_RESET eid=%lld\n", - eid); - netdev_info(netdev, " reset_code=%d state=%d\n", - comp->reset.reset_code, - comp->reset.state); + work = kzalloc(sizeof(*work), GFP_ATOMIC); + if (!work) { + netdev_err(lif->netdev, "%s OOM\n", __func__); + } else { + work->type = IONIC_DW_TYPE_LIF_RESET; + ionic_lif_deferred_enqueue(&lif->deferred, work); + } break; default: netdev_warn(netdev, "Notifyq unknown event ecode=%d eid=%lld\n", @@ -1232,7 +1244,8 @@ static int ionic_init_nic_features(struct ionic_lif *lif) netdev->hw_features |= netdev->hw_enc_features; netdev->features |= netdev->hw_features; - netdev->priv_flags |= IFF_UNICAST_FLT; + netdev->priv_flags |= IFF_UNICAST_FLT | + IFF_LIVE_ADDR_CHANGE; return 0; } @@ -2067,6 +2080,51 @@ static void ionic_lif_reset(struct ionic_lif *lif) mutex_unlock(&lif->ionic->dev_cmd_lock); } +static void ionic_lif_handle_fw_down(struct ionic_lif *lif) +{ + struct ionic *ionic = lif->ionic; + + set_bit(IONIC_LIF_F_FW_RESET, lif->state); + dev_info(ionic->dev, "FW Down: Stopping LIFs\n"); + + if (test_bit(IONIC_LIF_F_UP, lif->state)) { + dev_info(ionic->dev, "Surprise FW stop, stopping netdev\n"); + rtnl_lock(); + ionic_stop(lif->netdev); + rtnl_unlock(); + } + + ionic_lifs_deinit(ionic); + ionic_qcqs_free(lif); + + dev_info(ionic->dev, "FW Down: LIFs stopped\n"); +} + +static void ionic_lif_handle_fw_up(struct ionic_lif *lif) +{ + struct ionic *ionic = lif->ionic; + int err; + + dev_info(ionic->dev, "FW Up: restarting LIFs\n"); + + err = ionic_qcqs_alloc(lif); + if (!err) + err = ionic_lifs_init(ionic); + + if (lif->registered) + ionic_lif_set_netdev_info(lif); + + if (!err) + clear_bit(IONIC_LIF_F_FW_RESET, lif->state); + + ionic_link_status_check_request(lif); + + if (!err) + dev_info(ionic->dev, "FW Up: LIFs restarted\n"); + else + dev_info(ionic->dev, "FW Up: LIFs restart failed\n"); +} + static void ionic_lif_free(struct ionic_lif *lif) { struct device *dev = lif->ionic->dev; @@ -2229,6 +2287,7 @@ static int ionic_lif_notifyq_init(struct ionic_lif *lif) if (err) return err; + lif->last_eid = 0; q->hw_type = ctx.comp.q_init.hw_type; q->hw_index = le32_to_cpu(ctx.comp.q_init.hw_index); q->dbval = IONIC_DBELL_QID(q->hw_index); @@ -2271,8 +2330,8 @@ static int ionic_station_set(struct ionic_lif *lif) addr.sa_family = AF_INET; err = eth_prepare_mac_addr_change(netdev, &addr); if (err) { - netdev_warn(lif->netdev, "ignoring bad MAC addr from NIC %pM\n", - addr.sa_data); + netdev_warn(lif->netdev, "ignoring bad MAC addr from NIC %pM - err %d\n", + addr.sa_data, err); return 0; } @@ -2296,8 +2355,6 @@ static int ionic_lif_init(struct ionic_lif *lif) int dbpage_num; int err; - ionic_debugfs_add_lif(lif); - mutex_lock(&lif->ionic->dev_cmd_lock); ionic_dev_cmd_lif_init(idev, lif->index, lif->info_pa); err = ionic_dev_cmd_wait(lif->ionic, DEVCMD_TIMEOUT); @@ -2333,6 +2390,8 @@ static int ionic_lif_init(struct ionic_lif *lif) goto err_out_free_dbid; } + ionic_debugfs_add_lif(lif); + err = ionic_lif_adminq_init(lif); if (err) goto err_out_adminq_deinit; diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.h b/drivers/net/ethernet/pensando/ionic/ionic_lif.h index d811cbb790dc..732dc1f99d24 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.h +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.h @@ -98,6 +98,7 @@ struct ionic_deferred_work { union { unsigned int rx_mode; u8 addr[ETH_ALEN]; + u8 fw_status; }; };