docs: driver-api: firmware: add driver firmware guidelines. (v3)
Subsystems (5)
PATCH 1/1 docs: driver-api: firmware: add driver firmware guidelines. (v3)
From: Dave Airlie <[email protected]>
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.
v2: rewritten with suggestions from Thorsten Leemhuis
v3: rewritten with suggestions from Mauro
--- Documentation/driver-api/firmware/core.rst | 1 + .../firmware/firmware-usage-guidelines.rst | 44 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 Documentation/driver-api/firmware/firmware-usage-guidelines.rst
Documentation/driver-api/firmware/core.rst +1 -0
@@ -13,4 +13,5 @@ documents these features. direct-fs-lookup fallback-mechanisms lookup-order + firmware-usage-guidelines
Documentation/driver-api/firmware/firmware-usage-guidelines.rst new file +44 -0
44 lines not on this page · raw message
Signature · 1 line
2.36.1
Documentation/driver-api/firmware/firmware-usage-guidelines.rst line 8
Quoted 5 lines · Dave Airlie
Documentation/driver-api/firmware/firmware-usage-guidelines.rst new file +4
-0+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.
Documentation/driver-api/firmware/firmware-usage-guidelines.rst
Quoted 7 lines
Documentation/driver-api/firmware/firmware-usage-guidelines.rst new file +7
-0+* 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".
Quoted 1 line
in order to let the driver detact any non-ABI
typo - 'detect'
Review
Quoted 3 lines
(quoted diff) +2
-0+ fixes/changes. The firmware files in linux-firmware should be + overwritten with the newest compatible major version.
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?
Review
Quoted 2 lines
(quoted diff) +2
-0+ 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