Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5375256ybl; Tue, 14 Jan 2020 07:58:27 -0800 (PST) X-Google-Smtp-Source: APXvYqzU6oKfMPJj7WeB3BJCxE86KasnmdRl12WQOKbXku7b/kpzbsAKdesUwZO9aZb8Zy87wPsK X-Received: by 2002:a9d:6e82:: with SMTP id a2mr16804542otr.336.1579017507466; Tue, 14 Jan 2020 07:58:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579017507; cv=none; d=google.com; s=arc-20160816; b=iTl3zWw4APnIkSBqzh42yIKE7jZOpKPJvTe5zA5YXTwM9xgd6L29bRO7OPvfSI+qP9 5AxvcL//ybQGUc7FlBqqRwShKdJDbRM1B/OhPyG2yF2rmZjC5A+g1nikDxreAQ/LgkAG f8ilzhOcgqUe2PPD2A7VFisfBSf7GBtkkdRlQ01rQIFCMstDNsKwzcBqVGnAEucfBIIl ATUrf0GzGdrcnsK0YTopSP5LTNxJMxKDcF62LuwjQIPxL9P8XslFR3QI/W5qwgZ9WCnz E/Jop77wOC6DowkRmXy12e3PGdeE/dGJTXFIAdLJR3RGDXTIMPbeAEhLzoue38lD4g7S 38vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=Yk8GFN5UR6ODGPVQcY9gJ7fbN7vn3/9Rbnqkdx8z7fk=; b=MEmcS8Ji8IdvrcULc2cQme7be0qCHzN+YthaVQrITSRuv2x8rSExK86kBFYdWA8xUu K2rMZSBF/Cg4nhQJ3tXq4sTVFnina0/ZpJxGbdronX2ciCgA6NTrOG/lWJq8qhqlZxpX aenwm3alSCcplMYlk4MQ/FU9A6a8PZO710aPjff7rc2szim71Ahn4BlTcAwAe72+dMPb vXWtbfVuYjjwSvRWFGyJSo2JtAvRxeustgl+Q8o5B7uBFobloduyCMPKWc0qsCoO8UOa 7uMVQ9ZDEPW5N2I3Vg7xx4fRNGBxkElywyjknAL3YWWKteXWVt0RFFbgOFmnKQbDr4q8 pazw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y18si8169133oix.27.2020.01.14.07.58.16; Tue, 14 Jan 2020 07:58:27 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729033AbgANPzv (ORCPT + 99 others); Tue, 14 Jan 2020 10:55:51 -0500 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:41677 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726375AbgANPzv (ORCPT ); Tue, 14 Jan 2020 10:55:51 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from moshe@mellanox.com) with ESMTPS (AES256-SHA encrypted); 14 Jan 2020 17:55:45 +0200 Received: from dev-l-vrt-136.mtl.labs.mlnx (dev-l-vrt-136.mtl.labs.mlnx [10.134.136.1]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 00EFtiIe015197; Tue, 14 Jan 2020 17:55:44 +0200 Received: from dev-l-vrt-136.mtl.labs.mlnx (localhost [127.0.0.1]) by dev-l-vrt-136.mtl.labs.mlnx (8.14.7/8.14.7) with ESMTP id 00EFtitB019698; Tue, 14 Jan 2020 17:55:44 +0200 Received: (from moshe@localhost) by dev-l-vrt-136.mtl.labs.mlnx (8.14.7/8.14.7/Submit) id 00EFti44019696; Tue, 14 Jan 2020 17:55:44 +0200 From: Moshe Shemesh To: "David S. Miller" Cc: Alexander Duyck , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Moshe Shemesh Subject: [PATCH net-next RFC 0/3] Add mlx5 devices FW upgrade reset support Date: Tue, 14 Jan 2020 17:55:25 +0200 Message-Id: <1579017328-19643-1-git-send-email-moshe@mellanox.com> X-Mailer: git-send-email 1.8.4.3 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset adds support for FW upgrade. On devlink reload, if a pending FW image is found, the driver will perform a FW upgrade reset flow to activate the pending FW image. Sending as RFC because the FW activation reset requires a pci link toggling. Although it works and we verify that the device is the only device on the pcie bridge before allowing such reset, as already done by other drivers [1], we would like to get some feedback on the last patch of this series. [1] function trigger_sbr() at drivers/infiniband/hw/hfi1/pcie.c Moshe Shemesh (3): net/mlx5: Add structure layout and defines for MFRL register net/mlx5: Add functions to set/query MFRL register net/mlx5: Add FW upgrade reset support drivers/net/ethernet/mellanox/mlx5/core/devlink.c | 81 +++++++++++++++++++++- drivers/net/ethernet/mellanox/mlx5/core/fw.c | 44 ++++++++++++ .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 2 + include/linux/mlx5/driver.h | 1 + include/linux/mlx5/mlx5_ifc.h | 17 +++++ 5 files changed, 144 insertions(+), 1 deletion(-) -- 1.8.3.1