Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp2131274imi; Sun, 24 Jul 2022 08:23:57 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tDGreIYWkMqvvNRzSFIDv5cqkZ/hZ2iThF2YPh5JQyE0sH+plGM7lrQMjGiefod6csSrGF X-Received: by 2002:a05:6402:5299:b0:435:61da:9bb9 with SMTP id en25-20020a056402529900b0043561da9bb9mr9410382edb.21.1658676237302; Sun, 24 Jul 2022 08:23:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658676237; cv=none; d=google.com; s=arc-20160816; b=CIabkCVJssF+ynyLbYcK2u97tBIOn4SKvapA2XYT4kqqgwtDYS46vZes17BKJtuie0 DRCp7deU1/mm+CHUM5frSYlfUv2qN/kAORcKmAuRwm1QPSsH6Zl8NeIQEb9XLPfeiycE 800VuZzPWNK5ZeuiGsSb0Ga/6L6IpA8Bp85L4zTFmfmuzeuyLFJp3FnfbDzZApdEbrgl nT5y7RKX2K40kxeYuqX4RMi9a6tyQnVjt1G1Zf+2TtvTfhCqmVH5sFaBKHeFSdJgOgPV AmvwMUqzNNeQ+0PPKeH+xBmwmVk4rAthrMBOKWLIOsVGvQeEhDr4rt3NxP4X6WW4MPTE ALtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=RG/BJ3Nv9HakG4zVWqCXWL3uZp6IBIbE/vdVZRgFNzw=; b=KErXwgFM3+GVLoRJnE6Vtvb6kXvvt7PSgaUMALcHIZjAmHqPAXIDtvZ8CME+0uGSwJ GyGV0Kj3lBxDjjWV+EhoXaLfn2aKxZkw1LxATTp9GKxqj84Vhtf2NlmFE2KtYPUiSd7f pkQT2PyLMvmCuU7wnCT9V6ik4eLMz0WoFepmszVM+egOq2cnwz5pkVVG5BDlWYl2rjX7 Z3Zaw8a+f0u2DKUADoxcBjNRgzcYV2r+2MlXwRwT38SXaA3bvyXiyJC7cF+zWQsJAR5N IGO/3pjYHEj+vO54J5dOi5ROO7NK/UKA6e4Dp/NZZz+sIajgeLUBhmvXiZrNV/LXJde5 UtOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=hyxJq9tj; 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=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x9-20020aa7d389000000b0043a72951a14si9349919edq.304.2022.07.24.08.23.35; Sun, 24 Jul 2022 08:23:57 -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; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=hyxJq9tj; 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=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232877AbiGXPWI (ORCPT + 65 others); Sun, 24 Jul 2022 11:22:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229640AbiGXPWH (ORCPT ); Sun, 24 Jul 2022 11:22:07 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEAA811C07; Sun, 24 Jul 2022 08:22:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=RG/BJ3Nv9HakG4zVWqCXWL3uZp6IBIbE/vdVZRgFNzw=; t=1658676126; x=1659885726; b=hyxJq9tjqYBSUs+yl2lXhjEasadf4QDDhUQtDVBgBTsOCXy dXAS1NdbzZAH8t2GUlNLJhRhD49LM6qQYr6ikt7VEwb372PnhXfEw2eIErL3/1g/NmcQS7A1MmBoj M7sI/c7TKKmGWAVMuqOX0QISRHvCSzFTYdLMvn4EDRAsr7qLMVn4yGnhfPIrpN9AlVZXuznPdF7KL MRGo6/1aZIACWmI+uYVqBv6MGHPydotxxqBIszWJT+2aLy/cMHaEc5ZyPntvis9Hxxu9S7XG2Yi0g ypD4kw1ai5Re/1SorP2ClE+MC/OBt+Q4GXVXOTKFomMo1MmltlwK5AiDCvwoP4Gg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oFdQP-006zmj-2a; Sun, 24 Jul 2022 17:21:45 +0200 Message-ID: <4f8ab262d98ba2a4d0e106e127c171e75b52ad47.camel@sipsolutions.net> Subject: Re: [PATCH] docs: driver-api: firmware: add driver firmware guidelines. (v3) From: Johannes Berg To: Dave Airlie , 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 , Rodrigo Vivi , Harry Wentland Date: Sun, 24 Jul 2022 17:21:43 +0200 In-Reply-To: <20220721044352.3110507-1-airlied@gmail.com> References: <20220721044352.3110507-1-airlied@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.3 (3.44.3-1.fc36) MIME-Version: 1.0 X-malware-bazaar: not-scanned X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 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 On Thu, 2022-07-21 at 14:43 +1000, Dave Airlie wrote: >=20 > +Users switching to a newer kernel should *not* have to install newer > +firmware files to keep their hardware working. At the same time updated > +firmware files must not cause any regressions for users of older kernel > +releases. That seems sane, and certainly something we've done in wireless in the past. > +* Firmware files shall be designed in a way that it allows checking for > + firmware ABI version changes. It is recommended that firmware files 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 firmware version should > + be stored in the firmware header, or as an exception, as part of the > + firmware file name, Eh, I went to write a whole paragraph here and then read it again ... Maybe this should say "[t]he _full_ firmware version", to contrast with the previous sentence mentioning the "major version". > in order to let the driver detact any non-ABI typo - 'detect' > + fixes/changes. The firmware files in linux-firmware should be > + overwritten with the newest compatible major version. >=20 That's also a bit confusing IMHO - did that mean "minor version"? Or something? I mean ... if you overwrite a file that has the major version in the filename then by definition it is the same major version? > + This means no major version bumps without the kernel retaining > + backwards compatibility for the older major versions. Strictly reading this might require aeons of support for firmware version, if you have a release cadence of them like every 6 weeks for a new _major_ version (yes, because APIs change), then that's rather harsh. In practice we've often done this, but I think some reasonable cut-off could/should be there, such as dropping support after a reasonably long time frame (say a year?) Often though that's less a question of "does it still work" and rather one of "do I still support that" and the answer for the latter is obviously "no" much quicker than the former. johannes