Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3040178imw; Mon, 18 Jul 2022 00:23:35 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vdzD4XEgQ3/xN/l/ZJqGFwbS64obbFCAiuTorDiz4mlg7OTtgLo9uxHdDZFoOiDAA0jDvh X-Received: by 2002:a17:906:58d5:b0:72f:2b21:eb20 with SMTP id e21-20020a17090658d500b0072f2b21eb20mr4296185ejs.508.1658129015495; Mon, 18 Jul 2022 00:23:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658129015; cv=none; d=google.com; s=arc-20160816; b=INtKNaBF6Gwe9p5RW5wujP6cScJCFMfbRpp9+r1xdPKexT4621eXSvMgS1REZ4nh4Q ZOuLtLTaq6jFfQ5lUVgwXf/eShJhjqVbCMtAxrX8aprkR6bheRPD3CNJz4zJzlT60ofV 4PP1St0qbClKo2P4fVgXsEcAMBvhRvn3JAfwfXfO0nd6D1pnh1dsE+Vbasfc5oTZKOqk 5sghFwRTqTTM/L/Cw1xMGCm2bWjEj5L6S1Rc7g6syH+hiNF63NVI0EZ8LPawpstg+/1A I5fAgm1RaT5DqRnlHVt0G7sT+Es5r6Y4uUoWCrVibfuooRHPlN0f4mH+FMj+y8VHJvg0 4uBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=a5hZOAAUWc2PoIMWjCrKIcjEuKInTNDbrdy1CIkcc5U=; b=Fj74nZw5/A98vjDlZpEN1QG0UPBEuYz7bxlUGQlI3lufhr9EgAKc4svMlhvVI0F/u/ kMpb5X2jCckK2sO5NIBY2nZcJ8RQTj7+FDP+82Ss4nUR82R7YtxPhXMxUwIDQDsvmE1s OBdDhezlcMOVugwvKObq+1sXqwgHuRC7Fw5yh8Q5SHshnecXagGBjFvCv/fegzAKnkG2 WbuGyeOuoqxPZrjaQVeqOdEceuieB9/jMX8XPEubEcGP/9Gb1kJ7Fb8DZwnEPp6ejbu+ 8N9qXanlzOPG6MfIYlmkmf8KjL5mXn3NeIEy4kZQ1g9t1Yr9TQPmLxI1cFG732JczFrW yIMw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa32-20020a17090786a000b0072b02ef4ae9si15017897ejc.618.2022.07.18.00.23.14; Mon, 18 Jul 2022 00:23:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233824AbiGRHXK (ORCPT + 65 others); Mon, 18 Jul 2022 03:23:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233811AbiGRHXJ (ORCPT ); Mon, 18 Jul 2022 03:23:09 -0400 X-Greylist: delayed 67 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 18 Jul 2022 00:23:08 PDT Received: from us-smtp-delivery-44.mimecast.com (us-smtp-delivery-44.mimecast.com [207.211.30.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8F16217AB9 for ; Mon, 18 Jul 2022 00:23:08 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-277-AgST6BwiNTG9NjgWcQgQBg-1; Mon, 18 Jul 2022 03:21:54 -0400 X-MC-Unique: AgST6BwiNTG9NjgWcQgQBg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9F8D7811E80; Mon, 18 Jul 2022 07:21:53 +0000 (UTC) Received: from dreadlord.bne.redhat.com (fdacunha.bne.redhat.com [10.64.0.157]) by smtp.corp.redhat.com (Postfix) with ESMTP id 69304141511A; Mon, 18 Jul 2022 07:21:49 +0000 (UTC) From: Dave Airlie To: torvalds@linux-foundation.org, Jonathan Corbet , linux-doc@vger.kernel.org, gregkh@linuxfoundation.org, Daniel Vetter , mcgrof@kernel.org Cc: linux-kernel@vger.kernel.org, dri-devel@lists.sf.net, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, alsa-devel@alsa-project.org, linux-media@vger.kernel.org, linux-block@vger.kernel.org, Dave Airlie Subject: [PATCH] docs: driver-api: firmware: add driver firmware guidelines. Date: Mon, 18 Jul 2022 17:21:44 +1000 Message-Id: <20220718072144.2699487-1-airlied@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_SOFTFAIL,SPOOFED_FREEMAIL,SPOOF_GMAIL_MID autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Dave Airlie A recent snafu where Intel ignored upstream feedback on a firmware change, led to a late rc6 fix being required. In order to avoid this in the future we should document some expectations around linux-firmware. I was originally going to write this for drm, but it seems quite generic advice. I'm cc'ing this quite widely to reach subsystems which use fw a lot. Signed-off-by: Dave Airlie --- Documentation/driver-api/firmware/core.rst | 1 + .../firmware/firmware-usage-guidelines.rst | 34 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 Documentation/driver-api/firmware/firmware-usage-guidelines.rst diff --git a/Documentation/driver-api/firmware/core.rst b/Documentation/driver-api/firmware/core.rst index 1d1688cbc078..803cd574bbd7 100644 --- a/Documentation/driver-api/firmware/core.rst +++ b/Documentation/driver-api/firmware/core.rst @@ -13,4 +13,5 @@ documents these features. direct-fs-lookup fallback-mechanisms lookup-order + firmware-usage-guidelines diff --git a/Documentation/driver-api/firmware/firmware-usage-guidelines.rst b/Documentation/driver-api/firmware/firmware-usage-guidelines.rst new file mode 100644 index 000000000000..34d2412e78c6 --- /dev/null +++ b/Documentation/driver-api/firmware/firmware-usage-guidelines.rst @@ -0,0 +1,34 @@ +=================== +Firmware Guidelines +=================== + +Drivers that use firmware from linux-firmware should attempt to follow +the rules in this guide. + +* Firmware should be versioned with at least a major/minor version. It + is suggested that the firmware files in linux-firmware be named with + some device specific name, and just the major version. The + major/minor/patch versions should be stored in a header in the + firmware file for the driver to detect any non-ABI fixes/issues. The + firmware files in linux-firmware should be overwritten with the newest + compatible major version. Newer major version firmware should remain + compatible with all kernels that load that major number. + +* Users should *not* have to install newer firmware to use existing + hardware when they install a newer kernel. If the hardware isn't + enabled by default or under development, this can be ignored, until + the first kernel release that enables that hardware. This means no + major version bumps without the kernel retaining backwards + compatibility for the older major versions. Minor version bumps + should not introduce new features that newer kernels depend on + non-optionally. + +* If a security fix needs lockstep firmware and kernel fixes in order to + be successful, then all supported major versions in the linux-firmware + repo should be updated with the security fix, and the kernel patches + should detect if the firmware is new enough to declare if the security + issue is fixed. All communications around security fixes should point + at both the firmware and kernel fixes. If a security fix requires + deprecating old major versions, then this should only be done as a + last option, and be stated clearly in all communications. + -- 2.36.1