Page MenuHomeFreeBSD

ixl(4): Fix NVM update API
Needs ReviewPublic

Authored by kgalazka on Mon, Jun 29, 1:02 PM.
Tags
None
Referenced Files
F161690267: D57942.diff
Sun, Jul 5, 11:41 PM
Unknown Object (File)
Sun, Jul 5, 5:32 AM
Unknown Object (File)
Fri, Jul 3, 4:09 AM
Unknown Object (File)
Thu, Jul 2, 10:46 PM
Unknown Object (File)
Thu, Jul 2, 5:41 PM
Unknown Object (File)
Thu, Jul 2, 9:32 AM
Unknown Object (File)
Thu, Jul 2, 9:32 AM
Unknown Object (File)
Thu, Jul 2, 9:32 AM
Subscribers

Details

Reviewers
None
Group Reviewers
Intel Networking
Summary

Driver provides an interface for tools operating on adapters'
Non-Volatile Memory using SIOC(G|S)DRVSPEC ioctls. It allows
tools to issue Admin Queue commands to the firmware, which
may return an error code encoded as a negative integer.
The driver passed this negative integer as the return value
of the ioctl handler. This was causing issues because the FreeBSD
kernel reserves negative error codes in system calls for special
purposes such as restarting the handler or detecting incorrect
behavior in VFS operations. Simple remapping of negative values
to positive integers caused currently available tools to misbehave
and could break the NVM update process. Introduce a new API version,
which allows new versions of tools to detect the fixed driver.
Temporarily keep the old API, but issue a warning that tools need
to be updated.

Also refactor the code to use centralized cleanup and move the
debug message from the firmware earlier to make sure it is not masked
by an error from copyout.

Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com>

Assisted by: Copilot GPT 5.4
Sponsored by: Intel Corporation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 74377
Build 71260: arc lint + arc unit