Skip to content

fix(windows): classify UASP storage as USB - #1682

Merged
tdewey-rpi merged 1 commit into
raspberrypi:mainfrom
unraid:agent/upstream-uasp-classification
Aug 7, 2026
Merged

fix(windows): classify UASP storage as USB#1682
tdewey-rpi merged 1 commit into
raspberrypi:mainfrom
unraid:agent/upstream-uasp-classification

Conversation

@elibosley

Copy link
Copy Markdown
Contributor

Summary

Windows UASP storage can be hidden as a system SCSI disk; this classifies SCSI-enumerated devices with an authoritative USB bus type as USB before applying the system-drive heuristic.

Why This Exists

Windows exposes many USB 3 storage bridges through the SCSI enumerator when they use UASP. Enumerator-only classification therefore leaves isUSB false, and a non-removable UASP target can be guessed to be a system drive and hidden from the storage list.

Resolution

Use the adapter descriptor bus type already collected by the device scan. When the enumerator is SCSI and busType is USB, mark the device as USB before the existing system-drive classification. The later authoritative system-disk override remains unchanged.

Reviewer Considerations

  • The change only affects devices whose adapter descriptor explicitly reports USB.
  • A UASP device that is actually a system disk remains protected by the authoritative system-disk override.
  • The observed failure involved an ASMedia ASM2115 enclosure enumerating as SCSI\DISK.

Behavior Changes

UASP-attached removable storage appears in the Windows storage list instead of being hidden by the generic SCSI system-drive heuristic.

Implementation Summary

  • Refine isUSB from the SCSI enumerator plus USB adapter bus type before system-drive classification.

Verification

  • git diff --check: passed.
  • The fix is isolated to the Windows device-enumeration path and reproduces the classification used successfully with an ASMedia ASM2115 UASP enclosure.

Risk

Low. The adapter bus type is authoritative, and the existing final system-disk override is preserved.

@elibosley
elibosley marked this pull request as ready for review August 6, 2026 00:28
@tdewey-rpi
tdewey-rpi merged commit 5482b32 into raspberrypi:main Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants