[26.04_linux-nvidia-bos] NVIDIA: SAUCE: usb: misc: add LSTP adapter support - #524
[26.04_linux-nvidia-bos] NVIDIA: SAUCE: usb: misc: add LSTP adapter support#524nirmoy wants to merge 9 commits into
Conversation
fdb866d to
266c382
Compare
PR Validation ReportPatchscan ✅ No Missing FixesAll cherry-picked commits checked — no missing upstream fixes found. PR Lint ❌ Errors foundDetailsChecking 9 commits... Cherry-pick digest: ┌──────────────┬──────────────────────────────────────────────────────────────────┬────────────┬─────────┬───────────────────────────┐ │ Local │ Referenced upstream / Patch subject │ Patch-ID │ Subject │ SoB chain │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ bad10ed86d95 │ [SAUCE] usb: lstp: roll back failed spi startup │ N/A │ N/A │ nirmoyd │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ c2e5dd312fa5 │ [SAUCE] usb: lstp: skip zero-length mmio commands │ N/A │ N/A │ nirmoyd │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ a1b19fc14cc6 │ [SAUCE] usb: lstp: preserve unread ipmi requests │ N/A │ N/A │ nirmoyd │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ 860b5966a683 │ [SAUCE] usb: lstp: recover chip select after errors │ N/A │ N/A │ nirmoyd │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ 92b36d082a01 │ [SAUCE] usb: lstp: auto-bind empty spi firmware nodes │ N/A │ N/A │ nirmoyd │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ 1188df5c06cd │ [SAUCE] usb: lstp: advertise fixed spi settings │ N/A │ N/A │ nirmoyd │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ 39b68f006676 │ [SAUCE] usb: lstp: bind auto-created spi devices │ N/A │ N/A │ nirmoyd │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ fcd2f2f18268 │ [SAUCE] [config] enable usb_lstp as a module │ N/A │ N/A │ nirmoyd │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ a3c70a737731 │ [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-bos but body has no https://bugs.launchpad.net/... link |
01fb73b to
5d52b11
Compare
c8318a3 to
c342480
Compare
BaseOS Kernel ReviewSummaryLSTP has false-success UART writes after repeated NACKs, a poll race that can hide pending IPMI requests, and incomplete SPI-child rollback that leaves unusable devices exposed. Findings: Critical: 0, High: 0, Medium: 5, Low: 2 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. |
96b683a to
f4cb906
Compare
0d63a60 to
b9d70b2
Compare
9ef5052 to
ab2723a
Compare
3c4975e to
f0a297f
Compare
Boro watcher review skippedThe PR watcher skips automatic boro reviews for changes with more than 50 commits. This change currently has 100 commits. To run the review anyway, ask Head: This comment is maintained by BaseOS Reviewer. It is updated when the watcher sees a newer head. |
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://github.com/NVIDIA/lstp_module) Signed-off-by: Adrian Ambrozewicz <[email protected]> Signed-off-by: Nirmoy Das <[email protected]>
Enable CONFIG_USB_LSTP=m for the amd64 and arm64 NVIDIA BOS 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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
Channel startup failures do not abort USB probe. If fallback spidev creation fails after controller registration, the controller and any children created before the failure otherwise remain registered. Group controller registration and child creation under devres so the complete SPI channel is rolled back on an error. Signed-off-by: Nirmoy Das <[email protected]>
f0a297f to
bad10ed
Compare
|
Closing because host-OS LSTP support is no longer required by the product and is not needed to provide Secure Boot. |
Summary
NVIDIA/lstp_modulesource at commita91dee07c285lstp.kounderdrivers/usb/misc/CONFIG_USB_LSTP=mfor amd64 and arm64 NVIDIA BOS 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-nvidia-boscompanion to standard-kernel PR #530.BugLink: https://jirasw.nvidia.com/browse/DGX-17400
Source and scope
The driver is based on public
NVIDIA/lstp_modulecommita91dee07c285a22139f17533049b2924c1fbf045. That snapshot includes the firmware-provided I2C retry policy and the combined userspace SMBus block-read fix. The in-tree copy adds the documented Linux 7.0 API adaptations and the follow-up fixes carried as separate commits in this PR.Out-of-tree packaging, CI, README, specification PDFs, and other repository-local files are not imported.
Device-tree schemas remain omitted because the public 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-nvidia-bostipgit diff --check: passa91dee07c285; unchanged files match byte-for-byte and the remaining deltas are the documented Linux 7.0 GPIO, I2C, allocation, and xarray API adaptationsscripts/checkpatch.pl --strictfor the latest sync: 0 errors, 0 warnings, 0 checksCONFIG_USB_LSTP=mwith the required USB, I2C, SPI, GPIO, LED, and TTY dependencies enabledW=1against the PR's Linux 7.0 tree7.0.0-2015-nvidia-bos-64kmodinfo -n lstpselected/lib/modules/7.0.0-2015-nvidia-bos-64k/kernel/drivers/usb/misc/lstp/lstp.ko, and ranmodprobe lstpsuccessfullylsmodshowedlstp; dmesg recordedusbcore: registered new interface driver lstp; taint remained unchanged (12288before and after)CONFIG_USB_LSTP=mandCONFIG_USB_LSTP_SPI_SPIDEV=yfor amd64, arm64, and arm64-64k BOS flavoursThe arm64 runtime test predates the two I2C-only source updates. A refreshed kernel package build and I2C functional test remain required. The BOS configuration already has
CONFIG_MODULE_SIG=yandCONFIG_MODULE_SIG_ALL=y; CI/package output will verify the production signature.