From mboxrd@z Thu Jan 1 00:00:00 1970 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=-3.0 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 4935BC169C4 for ; Mon, 11 Feb 2019 06:59:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 050C22070B for ; Mon, 11 Feb 2019 06:59:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="Cx6hO+0L" 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 Content-Transfer-Encoding: 8bit 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(-) -- 2.19.2