[26.04_linux-nvidia] NVIDIA: SAUCE: usb: misc: add LSTP adapter support - #530
Draft
nirmoy wants to merge 8 commits into
Draft
[26.04_linux-nvidia] NVIDIA: SAUCE: usb: misc: add LSTP adapter support#530nirmoy wants to merge 8 commits into
nirmoy wants to merge 8 commits into
Conversation
Contributor
PR Validation ReportPatchscan ✅ No Missing FixesAll cherry-picked commits checked — no missing upstream fixes found. PR Lint ❌ Errors foundDetailsChecking 8 commits... Cherry-pick digest: ┌──────────────┬──────────────────────────────────────────────────────────────────┬────────────┬─────────┬───────────────────────────┐ │ Local │ Referenced upstream / Patch subject │ Patch-ID │ Subject │ SoB chain │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ 95a561534950 │ [SAUCE] usb: lstp: skip zero-length mmio commands │ N/A │ N/A │ nirmoyd │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ 195fa574470a │ [SAUCE] usb: lstp: preserve unread ipmi requests │ N/A │ N/A │ nirmoyd │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ 5271494ae3cc │ [SAUCE] usb: lstp: recover chip select after errors │ N/A │ N/A │ nirmoyd │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ e4f8b9ac8cf1 │ [SAUCE] usb: lstp: auto-bind empty spi firmware nodes │ N/A │ N/A │ nirmoyd │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ 7b3293eb6fb2 │ [SAUCE] usb: lstp: advertise fixed spi settings │ N/A │ N/A │ nirmoyd │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ c41554d1d6dd │ [SAUCE] usb: lstp: bind auto-created spi devices │ N/A │ N/A │ nirmoyd │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ 50fafedb229d │ [SAUCE] [config] enable usb_lstp as a module │ N/A │ N/A │ nirmoyd │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ 2f317e05648f │ [SAUCE] usb: misc: add lstp adapter support │ N/A │ N/A │ aambroze, nirmoyd │ └──────────────┴──────────────────────────────────────────────────────────────────┴────────────┴─────────┴───────────────────────────┘ Lint: all checks passed. PR metadata: E: PR targets 26.04_linux-nvidia but body has no https://bugs.launchpad.net/... link |
The Low-Speed Transport Protocol (LSTP) adapter exposes firmware-configured I2C, SPI, GPIO, UART, IPMI, and MMIO channels over a single USB interface. Add the driver as a downstream patch and integrate it with Kconfig, Kbuild, and MAINTAINERS. Adapt the GPIO, I2C, memory-allocation, and UART interfaces to the APIs available in this kernel. Use the configured I2C retry count and avoid a spurious zero-length write before a userspace SMBus block read. (backported from https://gitlab-master.nvidia.com/spt-firmware-taskforce/lstp/lstp_module) Signed-off-by: Adrian Ambrozewicz <aambrozewicz@nvidia.com> Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
nirmoy
force-pushed
the
agent/lstp-driver-26.04
branch
from
August 5, 2026 11:27
f0b9473 to
2aa061d
Compare
Enable CONFIG_USB_LSTP=m for the amd64 and arm64 NVIDIA flavours. Building lstp.ko through the kernel packaging pipeline also allows the module to be signed for Secure Boot. Enable CONFIG_USB_LSTP_SPI_SPIDEV so auto_bind_spidev defaults to true and LSTP SPI channels without firmware-described children create spidev devices. Keep separate IPMI POST-code routing disabled. Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
nirmoy
force-pushed
the
agent/lstp-driver-26.04
branch
from
August 5, 2026 15:34
2aa061d to
50fafed
Compare
The generic spidev modalias is not present in the spidev device ID table, so dynamically created LSTP SPI devices remain unbound. Load spidev before creating the devices and set its name as a driver override before registration. Fail channel startup if a child cannot be created or bound. Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
LSTP firmware supplies one clock rate for each SPI channel and supports only 8-bit words, but the controller currently accepts other settings and silently ignores them during transfers. Publish the firmware rate as both the minimum and maximum controller speed and restrict the word-size mask to 8 bits so the SPI core rejects unsupported requests. Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
A channel fwnode may be present without describing any available SPI child devices. Treat that case like a missing fwnode so the auto_bind_spidev option creates the fallback devices it promises. Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
A failed transfer can leave chip select asserted in the adapter. Send a best-effort zero-length write with the deassert flag before completing the failed message, while preserving the original transfer error. Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
Removing a FIFO record before checking the userspace buffer loses the request on a short read or copy fault. Serialize readers and retain one dequeued record until copy_to_user() succeeds. Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
Zero-length read and write calls must complete without issuing hardware operations. Return immediately after validating the file offset instead of sending empty LSTP commands. Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
Collaborator
Author
BaseOS Kernel ReviewSummaryLSTP has an IPMI open/disconnect UAF window and reports rejected UART and SPI operations as successful. This can expose freed memory, lose UART bytes, and claim NACKed SPI transfers completed. Findings: Critical: 0, High: 3, Medium: 3, Low: 3 Latest watcher review: open review Generated test plan: open test plan Kernel deb build: successful (download debs, 4 files) Head: This comment is maintained by nv-pr-bot. It is updated when the GitHub watcher publishes a newer review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
f662fa18e05dlstp.kounderdrivers/usb/misc/CONFIG_USB_LSTP=mfor amd64 and arm64 NVIDIA flavoursMotivation
The temporary DKMS delivery works for image enablement, but carrying LSTP in NV-Kernels lets the normal kernel packaging and signing pipeline produce a module that supports Secure Boot.
Platform software requires the LSTP SPI channels to expose spidev children, so
CONFIG_USB_LSTP_SPI_SPIDEV=yenables this behavior without a separate modprobe configuration file.This is the
26.04_linux-nvidiacompanion to BOS PR #524.BugLink: https://jirasw.nvidia.com/browse/DGX-17400
Source and scope
The driver is synchronized through LSTP GitLab main commit
f662fa18e05d8c4b5a2b0bc83acc4e8687c9a9fb. The latest source includes these kernel changes after the originalc3e97053446asnapshot:4f28fdedaf85: use the firmware I2C configuration for bus retry policyf662fa18e05d: fix combined userspace SMBus block readsOut-of-tree packaging, CI, README, specification PDFs, and other repository-local files are not imported.
Device-tree schemas remain omitted because the released copies still need kernel-tree
$idandmaintainersnormalization. They can follow with the upstream-oriented patch series.The source exposes USB vendor ID
0x0955. The previously tested DKMS snapshot also exposed0x0424; the LSTP owners should confirm whether that second alias is approved and required before this draft is marked ready.Validation
26.04_linux-nvidiatipgit diff --check: pass8a2f5316851f356d9e08ddacceeff7e05c4f7c1bCONFIG_USB_LSTP=mresolves foramd64-nvidia,arm64-nvidia, andarm64-nvidia-64kCONFIG_USB_LSTP_SPI_SPIDEV=ymakesauto_bind_spidevdefault to true for all three flavoursCONFIG_SEPARATE_LSTP_IPMI_POSTCODESremains disabled for all three flavourslstp.owithW=1against this branchThe matching BOS source has passed arm64 compilation and
modprobetesting. Standard-kernel package builds and runtime testing remain required for this companion PR.