Received: by 10.223.185.116 with SMTP id b49csp1069888wrg; Fri, 23 Feb 2018 11:21:59 -0800 (PST) X-Google-Smtp-Source: AH8x226rm/CLM/yIis12g8Ip7DrBl8agbkYlhT5tLrQnk8YNkf/zU5GZtoFRPQPTAp5iLEyzUGSk X-Received: by 10.99.110.199 with SMTP id j190mr2213188pgc.404.1519413719451; Fri, 23 Feb 2018 11:21:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519413719; cv=none; d=google.com; s=arc-20160816; b=qJtgL5ik1G75g9iMHpJwUtC0FoAVDDhd4oWpswsjYUkf8ojo1WqXbgamY2XzhHdL+X guL/JZGmpzNPpzzwBHnMThgKp+FL8ooaBix5B3zJ9K/OidcjdqCCiCeQa5DHxXe3m4DW osRHZs8xK8AMjgnTvnAOR+4tD1kekS5lYI2m77mG0t4zrr0stUgEQhHfa6rcJ5Ouj93g ova29gzlywh8OGrzGaI8xzcC2QZvCC7ANYH3Dfo8bN9yumYZ+HWWwBTTypWlpdo5TLM6 7tZd4OVrBEK+TA72va7IvQdwv+uWaEJUgh3AofqaikjDXjs0ZdFm+aCDjvQKCBvDLN6R VAww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=gvGwDXZjs70dEy86e/9WmSjQtlBjYFNpPo3HcDUdf+U=; b=F6rn8enaGYYkr6ZWKGTITjBf0MWuYOvfdN/8dj1eS8ff2RWxtedUcu6oSKzOQCb+om xkAV0bJwBswc1POERfkCpRxeSY5xAFsqslw/j+1zdcpCYA0pFDhrldi+bHiA45voWrUV lzawRaIySwSbnaWUzCjMAHhaXwMNK1Srns/zrRDmkZHV+0hwfZ5q9GFlfH+rZDhwtmYJ LIZGqrG8UKQ+IUkIGpQUzy00Cw1j+aZHHFQHZAH1seBPlGW+ZAcOQgRawUe+WQoG6kH0 UDd8H0s12N30G/7S08WSMAXxR5zz/zCmtb4M1mnTxwt+jKQ7DjuEikS1LcSIkwcew37K FZTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x10si2255502pfd.188.2018.02.23.11.21.45; Fri, 23 Feb 2018 11:21:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964876AbeBWSyA (ORCPT + 99 others); Fri, 23 Feb 2018 13:54:00 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:47574 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964828AbeBWSx6 (ORCPT ); Fri, 23 Feb 2018 13:53:58 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 842CF1159; Fri, 23 Feb 2018 18:53:57 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ray Jui , Michael Chan , "David S. Miller" , Sasha Levin Subject: [PATCH 4.14 102/159] bnxt_en: Need to unconditionally shut down RoCE in bnxt_shutdown Date: Fri, 23 Feb 2018 19:26:50 +0100 Message-Id: <20180223170755.775602161@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170743.086611315@linuxfoundation.org> References: <20180223170743.086611315@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ray Jui [ Upstream commit a7f3f939dd7d8398acebecd1ceb2e9e7ffbe91d2 ] The current 'bnxt_shutdown' implementation only invokes 'bnxt_ulp_shutdown' to shut down RoCE in the case when the system is in the path of power off (SYSTEM_POWER_OFF). While this may work in most cases, it does not work in the smart NIC case, when Linux 'reboot' command is initiated from the Linux that runs on the ARM cores of the NIC card. In this particular case, Linux 'reboot' results in a system 'L3' level reset where the entire ARM and associated subsystems are being reset, but at the same time, Nitro core is being kept in sane state (to allow external PCIe connected servers to continue to work). Without properly shutting down RoCE and freeing all associated resources, it results in the ARM core to hang immediately after the 'reboot' By always invoking 'bnxt_ulp_shutdown' in 'bnxt_shutdown', it fixes the above issue Fixes: 0efd2fc65c92 ("bnxt_en: Add a callback to inform RDMA driver during PCI shutdown.") Signed-off-by: Ray Jui Signed-off-by: Michael Chan Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -8218,8 +8218,9 @@ static void bnxt_shutdown(struct pci_dev if (netif_running(dev)) dev_close(dev); + bnxt_ulp_shutdown(bp); + if (system_state == SYSTEM_POWER_OFF) { - bnxt_ulp_shutdown(bp); bnxt_clear_int_mode(bp); pci_wake_from_d3(pdev, bp->wol); pci_set_power_state(pdev, PCI_D3hot);