From patchwork Fri Mar 20 02:31:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Nelson X-Patchwork-Id: 222189 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 0B30AC4332E for ; Fri, 20 Mar 2020 02:32:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D2D432051A for ; Fri, 20 Mar 2020 02:32:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=pensando.io header.i=@pensando.io header.b="1P/mN8+K" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726851AbgCTCcF (ORCPT ); Thu, 19 Mar 2020 22:32:05 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:45010 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726103AbgCTCcD (ORCPT ); Thu, 19 Mar 2020 22:32:03 -0400 Received: by mail-pl1-f193.google.com with SMTP id h11so1871207plr.11 for ; Thu, 19 Mar 2020 19:32:03 -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=P+o/xmIwloxnf/kcXoii3cfLlqj1+C/3YOs388gSVDc=; b=1P/mN8+KKeiK28Z0o6s/+5xcg4SjG3wL4BRYANIVuxPmbSD5yuKGwJM8IX7DDEZzR4 hI1Y/p9KWkI/pv7sw9a91FE+6x866ZVXqxx5iXgxZbm3i1g2Vt4x/zGRJkA8jbsYxr4F uOdKr7howU7Q5FwSyh/52ZbpWwY8Yj03mbosjM6VLeYrN0In1VQzkyl7jUCL+jeE5N5a i/zau3XRBYo1r/qRJxwTlriRcW4orBGwiWDmDua7Bimm+RYV4i9fs5CwxjGebmz4to/6 fUrDJX+xoLb5DcE3vHlxLyvxMXE/2tecNhC2bmfXVfLb+UTLsjy4BIwonrK8Rk5qqksB 9mtw== 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=P+o/xmIwloxnf/kcXoii3cfLlqj1+C/3YOs388gSVDc=; b=rU5XYl5xHAVsdr7R7YB7t9GY/dpqnAy+jwIUPkXAEgcTrxCDpaAcyB8e+LA/0IFcfM FfGbN+geWOiWqWaJQULX3FK7vjSM9b7vQhz33GPrL6JVzJLOrVsiwRN6OAheuFb104pn lU/7xXd9zOW6c+HjJh9bATRe9XuZonGrPnPB1BBo3pApkuxUfJgtUGvNB09OCdOigUW3 tfcAzj4Ob46VGTEtACw+SZMFtSh9yXQV5U6vxF3taM+Bnx+PX0ynXzOF4lwIpeUc7ZsU LUq4EhMFq0QncAXJx5QtANu+CWKgHPyDMxWRiMnasKMfh0u50dHhAkjN0dbcFiWUpPCf tlWQ== X-Gm-Message-State: ANhLgQ11bCTgpI4KBoKOg6LMbjjPsPc32tMoEPkcYmq/2C4uOC6OJVwQ +JGA4EULWTGTjTdS3Cyx8qiZDnmxQBo= X-Google-Smtp-Source: ADFU+vtTpLYqy+am2jLeVag2fwFItsV2gvSUbCQQngaTZ6SHiviV/CTUHxGLndRk3SaHXk8A38/+Ag== X-Received: by 2002:a17:902:eb11:: with SMTP id l17mr6222761plb.52.1584671522349; Thu, 19 Mar 2020 19:32:02 -0700 (PDT) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id i124sm3606485pfg.14.2020.03.19.19.32.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Mar 2020 19:32:01 -0700 (PDT) From: Shannon Nelson To: netdev@vger.kernel.org, davem@davemloft.net Cc: Shannon Nelson Subject: [PATCH net-next 2/6] ionic: leave dev cmd request contents alone on FW timeout Date: Thu, 19 Mar 2020 19:31:49 -0700 Message-Id: <20200320023153.48655-3-snelson@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200320023153.48655-1-snelson@pensando.io> References: <20200320023153.48655-1-snelson@pensando.io> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org It is possible (but unlikely) that FW was busy and missed a heartbeat check but is still alive and will process the pending request, so don't clean the dev_cmd in this case. This occasionally occurs when working with a card that is supporting many devices and is trying to shut them all down at once, but still wants to see that last LIF disable request. Fixes: 97ca486592c0 ("ionic: add heartbeat check") Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_main.c b/drivers/net/ethernet/pensando/ionic/ionic_main.c index c5e3d7639f7e..a0dc100b12e6 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_main.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_main.c @@ -360,7 +360,10 @@ int ionic_dev_cmd_wait(struct ionic *ionic, unsigned long max_seconds) done, duration / HZ, duration); if (!done && hb) { - ionic_dev_cmd_clean(ionic); + /* It is possible (but unlikely) that FW was busy and missed a + * heartbeat check but is still alive and will process this + * request, so don't clean the dev_cmd in this case. + */ dev_warn(ionic->dev, "DEVCMD %s (%d) failed - FW halted\n", ionic_opcode_to_str(opcode), opcode); return -ENXIO; From patchwork Fri Mar 20 02:31:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Nelson X-Patchwork-Id: 222188 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 03EE4C4332B for ; Fri, 20 Mar 2020 02:32:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C79D22051A for ; Fri, 20 Mar 2020 02:32:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=pensando.io header.i=@pensando.io header.b="wPob5nXZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726958AbgCTCcK (ORCPT ); Thu, 19 Mar 2020 22:32:10 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:41297 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726867AbgCTCcG (ORCPT ); Thu, 19 Mar 2020 22:32:06 -0400 Received: by mail-pl1-f196.google.com with SMTP id t16so1875512plr.8 for ; Thu, 19 Mar 2020 19:32:04 -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=VOeHVAGcH+jvqxZz+niCt9Fl35GWfxvR8XgYIp7jtxQ=; b=wPob5nXZj+Whq4OHS/W9bMfawTpuIxiSqMalcVk/Bu0KCirkdgGmRb5prxEjb5sY9M zKVYDvbsCuAAH8uuP1ZezulmEwdOy0Ef0mliHqMuIAo9ZG1DkUt6LD2vBP/1twKqeD5A aqcoRzHRMFYBE0asPMTmOF4ZfG5zvT+7VNRw6i6rGqapi4y3GLaEBl3/ZtcTWr4lkrIo d8Kw53Pw7D9X0f/izOkaB9MSTUE7iMCnrSnLN5sRJlEDIR/I+1IPU8ow+0/t7VZzHk0N T8zKuMDFMgn/d2bWBx1BRA2ZaLew3clSYMa2B5Cv/mBonyasG+AAR94T7N510Rz+ndeO G/vg== 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=VOeHVAGcH+jvqxZz+niCt9Fl35GWfxvR8XgYIp7jtxQ=; b=rzFH3Y5azWKY4zvVuBqZ0DJXQJWhl+dr4Iip+VUXvnRtC8KMYcB7I2KR+bS5kZxYdo tikt+ueAzcy+6Hc4F8UnJ+FiDhqzVT4aOV7SO99YScSO3E4QGCQFPrBc6ElrsXqfkCBt ae8BXhVgTgEJA+0q3MIhkmXmQtkzVDOEcpaQF8ceVVSzOMejIYUcx508y4aCZbJZoJ9n 1WIRPldFTKfWqCIbtUlZ3TXf0zkVRZ5yn5jLDmhkIR9SvLq+6BbbKsRPbx2UeNYdC9yt UeduJDTYvikT4vPkxqWiVTxWSMsbfGc4V0fPsbzkw1IMu/reJ4/TMLub2iSLtd2phjjp xMxQ== X-Gm-Message-State: ANhLgQ1YdoX7JN8QaZJLTRXtrJXJ3OrcJM9329YMf2MAxbR4SjKQx1CN TEgZ+3mC/CufUTdhmQc59PAT5jNZYxw= X-Google-Smtp-Source: ADFU+vtNTdnivp1lMI0y3Xthlvziy1uDXb5uW2erZfiq1CkQOqwPPutxwjE0MMJHlVcAL8/zzHuE0w== X-Received: by 2002:a17:902:5a85:: with SMTP id r5mr6418342pli.182.1584671524073; Thu, 19 Mar 2020 19:32:04 -0700 (PDT) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id i124sm3606485pfg.14.2020.03.19.19.32.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Mar 2020 19:32:03 -0700 (PDT) From: Shannon Nelson To: netdev@vger.kernel.org, davem@davemloft.net Cc: Shannon Nelson Subject: [PATCH net-next 4/6] ionic: ignore eexist on rx filter add Date: Thu, 19 Mar 2020 19:31:51 -0700 Message-Id: <20200320023153.48655-5-snelson@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200320023153.48655-1-snelson@pensando.io> References: <20200320023153.48655-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. Fixes: 2a654540be10 ("ionic: Add Rx filter and rx_mode ndo support") 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 c62d3d01d5aa..ea44f510cb76 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c @@ -832,7 +832,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); @@ -862,7 +862,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 Fri Mar 20 02:31:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Nelson X-Patchwork-Id: 222187 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 87589C4332E for ; Fri, 20 Mar 2020 02:32:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5EF802051A for ; Fri, 20 Mar 2020 02:32:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=pensando.io header.i=@pensando.io header.b="YdPEg5tA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726946AbgCTCcJ (ORCPT ); Thu, 19 Mar 2020 22:32:09 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:37925 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726103AbgCTCcG (ORCPT ); Thu, 19 Mar 2020 22:32:06 -0400 Received: by mail-pl1-f193.google.com with SMTP id w3so1886083plz.5 for ; Thu, 19 Mar 2020 19:32:05 -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=vfvWXeMPkJuLw370uHqvltpeOedgdDnSQPEFYPF8YTE=; b=YdPEg5tAgESuy1g6aMJWE+BhZD5xH+Hdi+WJETswCIjDrKhJRvP3yxsU4cSbHbHXOZ XaJU70nLgXOJs9HcOO6SWnW74yUSN8/8abbP4FiRRaoy18sS0K4/yRsiZnS7ovfk9APx yasS+aaleILTknCs5XjeCxs2KcYVSk9G8EcVsuE+SN+pnDnGeSXCTAmwp6Zd8AdrtGRG QRHaTo6fy3YwJ9lJ1BB1OMdPQGTPH8lxYSyJDTVkb46OAOfZpzXXRiM1YWkkxeWqAOPA 6cTG7zECbfMeBNChWBZSvEfms2gU5hmJwwGrbXTb4Do7lEjLd+f4HB8GpGgsZkWMTw47 seFQ== 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=vfvWXeMPkJuLw370uHqvltpeOedgdDnSQPEFYPF8YTE=; b=hwZM7ght+IKVfKFwxirTwm89m+ELHg0wYYs+tBoO9IHw84KZ5ecaPDslfdaBC3zqqB 80+kWWnv6he8Iyz4BeH9uYNfoiIEmOqjN/CWf0IUDxRpOXYQm+VV7GbS80+1J02JvTX4 2bW3YFtlYeAEPDLqNRnb5z9DJbHwwr8JZDUbHPldQc3AypUi4UcoSo2cqXjHc/nAPhiB T/LUHMcck6wBQ4oU/Ki8g0zSvMxJiipLo9Fvrhjt1Cf7xdXIpV7gmCkhVjpcBLgWPqhS EqHBEGUHWsmtf8rQFQqFh9W25RsSq/qgNuPeMRC+G9FsSrEw98D4RkM4kK6iDgt9Txhg x8pA== X-Gm-Message-State: ANhLgQ0o44vewVzABQO8hFpTN/qap9x0+5qkDbdsMHiOTl65txF98ZGP CJFKQQ6NYlqlKpsHGq0zl3NuDH6UuH0= X-Google-Smtp-Source: ADFU+vsf77F+KlFlLxHXY1KGkNnKxKE8Ts2OLgicPgDjjjJsqErFLaDH65W+gbTNOgFUUrlhAmy0Qg== X-Received: by 2002:a17:902:123:: with SMTP id 32mr6549862plb.38.1584671524929; Thu, 19 Mar 2020 19:32:04 -0700 (PDT) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id i124sm3606485pfg.14.2020.03.19.19.32.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Mar 2020 19:32:04 -0700 (PDT) From: Shannon Nelson To: netdev@vger.kernel.org, davem@davemloft.net Cc: Shannon Nelson Subject: [PATCH net-next 5/6] ionic: clean irq affinity on queue deinit Date: Thu, 19 Mar 2020 19:31:52 -0700 Message-Id: <20200320023153.48655-6-snelson@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200320023153.48655-1-snelson@pensando.io> References: <20200320023153.48655-1-snelson@pensando.io> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add a little more cleanup when tearing down the queues. Fixes: 1d062b7b6f64 ("ionic: Add basic adminq support") Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c index ea44f510cb76..490f79c82bf1 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c @@ -275,8 +275,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;