From patchwork Mon Feb 11 06:59:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 1039661 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=netronome.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="Cx6hO+0L"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 43yc9B4ksnz9s4Z for ; Mon, 11 Feb 2019 17:59:42 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726028AbfBKG7j (ORCPT ); Mon, 11 Feb 2019 01:59:39 -0500 Received: from mail-qt1-f194.google.com ([209.85.160.194]:39438 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725931AbfBKG7j (ORCPT ); Mon, 11 Feb 2019 01:59:39 -0500 Received: by mail-qt1-f194.google.com with SMTP id o6so11002383qtk.6 for ; Sun, 10 Feb 2019 22:59:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PCMkn5a0+PMjdAMe7wzYRqUFWLcZJ7luhz6nWBeuo8g=; b=Cx6hO+0LxjpWJF8VqCwjh6q98XokOFXqP2PdVTVAvhd4yPQuj970xXeQ1hypkd4vit TtLHuzYK5t5ffVA7/05qkububpf+YWKWkmcMoalvZgwAVgVTUtnWW6TyHkDdqKYhNpmU MsQMWlZ9IyfH2KaKASKAvo794oYMNsM47o71LHjRYDuiHrqYZyIAkFpA4R7jiikMwi2g GGzXFQXGy+4ADeCnkOA44F3cJh8QEZ6FrV8zDzbAENIYWbaQF4r2fN2LThqqtathhK2+ Iv7kaenDQgCiv4XpfzM21CzkbxeG2PwbU3PKl1k9LXETV3JA3EwOwS+mySspEbwISPta u1VA== 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:mime-version :content-transfer-encoding; bh=PCMkn5a0+PMjdAMe7wzYRqUFWLcZJ7luhz6nWBeuo8g=; b=GT09Md8rOEr3uU92rhiilnX20Rv06/wjkbNkmrlDIV59AOdeMXfUECpWMeYG7a3a69 BbEC0/2W9Yyg8Df7GETMHOoxY2Q/ui5mxfQk9CinECfX6cPb8bX5QSjwLZLs1S906drS NkN0g1SvU3ZYCS7a8sfwxFQIdDLmGOwV3ZYhuoJ1RbPQungEMQlxxyfE04Mc3QkjY07m X3+BYdAtbP1EQ6tycyq1guLImrq3YEDtNfFFDwVb2GbZlhp4o3D5HVFqKQNvjChshcG/ d7jV+yjUKLEZOAC161nM7fOHXwfL6RF+sUQlv8pMQZGhGTgW8c5i20Cpt6/Dr6cmbb8v +YjQ== X-Gm-Message-State: AHQUAuburhpYkGDMUeAwROpdpQy4RFbB0Q2kEq8BNRO96UTuJrdV0wUs CkJfcy1sryARbSQUntuE8phKvM4xqyYT9A== X-Google-Smtp-Source: AHgI3IbdNXwhEUleYS4jr7ZVKtNccAHA3oT6Cxf6XZE5AGqa2hp7BwbERxAso8xoZcL49tyZgOj45Q== X-Received: by 2002:ac8:3413:: with SMTP id u19mr1716698qtb.348.1549868378505; Sun, 10 Feb 2019 22:59:38 -0800 (PST) Received: from jkicinski-Precision-T1700.netronome.com ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id c68sm9677990qkf.65.2019.02.10.22.59.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Feb 2019 22:59:37 -0800 (PST) From: Jakub Kicinski To: davem@davemloft.net, jiri@resnulli.us Cc: netdev@vger.kernel.org, oss-drivers@netronome.com, mkubecek@suse.cz, andrew@lunn.ch, Jakub Kicinski Subject: [RFC 0/3] devlink: add the ability to update device flash Date: Sun, 10 Feb 2019 22:59:19 -0800 Message-Id: <20190211065923.22670-1-jakub.kicinski@netronome.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi! This series is the second step to allow trouble shooting and recovering devices in bad state without the use of netdevs as handles. We can already query FW versions over devlink, now we add the ability to update the FW. This will allow drivers to implement some from of "limp-mode" where the device can't really be used for networking and hence has no netdev, but we can interrogate it over devlink and fix the broken FW. Small but nice advantage of devlink is that it only holds the devlink instance lock during flashing, unlike ethtool which holds rtnl_lock(). Sending as RFC due to impending conflicts. Jakub Kicinski (3): devlink: add flash update command ethtool: add compat for flash update nfp: devlink: allow flashing the device via devlink .../net/ethernet/netronome/nfp/nfp_devlink.c | 47 +++++++++++++- include/net/devlink.h | 11 ++++ include/uapi/linux/devlink.h | 6 ++ net/core/devlink.c | 61 +++++++++++++++++++ net/core/ethtool.c | 12 +++- 5 files changed, 133 insertions(+), 4 deletions(-)