Skip to content

Device MSC: add START STOP (load/eject) request support#246

Merged
fdesbiens merged 2 commits intoeclipse-threadx:devfrom
ayedm1:device_storage_load_eject_media
Mar 3, 2026
Merged

Device MSC: add START STOP (load/eject) request support#246
fdesbiens merged 2 commits intoeclipse-threadx:devfrom
ayedm1:device_storage_load_eject_media

Conversation

@ayedm1
Copy link
Contributor

@ayedm1 ayedm1 commented Jan 18, 2026

  • changes:
  • Add mass-storage “removable media” support by tracking per-LUN prevent/allow medium removal and loaded/ejected status.
  • Introduce an optional per-LUN callback to handle SCSI START STOP UNIT (including load/eject and power-condition fields).
  • Extend storage constants (media types, sense keys/codes, power conditions, prevent flags) to support the new behavior and improve readability (explicit hex values).
  • Initialize new per-LUN state on activation (default: medium removal allowed, medium loaded) and wire the new callback through storage initialization.
  • Includes minor formatting/comment cleanups and version banner updates to 6.4.6.
  • implemenatation referance:

SCSI Block Commands – 4 (SBC-4)

PREVENT ALLOW MEDIUM REMOVAL command:

image

START STOP UNIT command:

image image

Merging changes ahead of hotfix release 202504a
@ayedm1 ayedm1 moved this to In review in ThreadX Roadmap Jan 18, 2026
@ayedm1 ayedm1 added the feature New feature or enhancement request label Jan 18, 2026
@ayedm1 ayedm1 requested review from ABOUSTM and rahmanih January 18, 2026 14:55
@fdesbiens fdesbiens changed the base branch from master to dev February 5, 2026 21:38
Copy link
Contributor

@rahmanih rahmanih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,
could you please make this PR cover the "START/STOP request support" only, and undo all the cosmetics changes, that can be done in a separate PR.

@ayedm1 ayedm1 force-pushed the device_storage_load_eject_media branch 2 times, most recently from a773faa to e28b1dd Compare February 9, 2026 21:01
- Add mass-storage “removable media” support by tracking per-LUN prevent/allow medium removal and loaded/ejected status.
- Introduce an optional per-LUN callback to handle SCSI START STOP UNIT (including load/eject and power-condition fields).
- Extend storage constants (media types, sense keys/codes, power conditions, prevent flags) to support the new behavior and improve readability (explicit hex values).
- Initialize new per-LUN state on activation (default: medium removal allowed, medium loaded) and wire the new callback through storage initialization.
- Includes minor formatting/comment cleanups and version banner updates to 6.4.6.

SCSI Block Commands – 4 (SBC-4)
@ayedm1 ayedm1 force-pushed the device_storage_load_eject_media branch from e28b1dd to 8cdbb7c Compare February 9, 2026 21:06
@ayedm1 ayedm1 requested a review from rahmanih February 9, 2026 21:12
@ayedm1
Copy link
Contributor Author

ayedm1 commented Feb 9, 2026

Hi, could you please make this PR cover the "START/STOP request support" only, and undo all the cosmetics changes, that can be done in a separate PR.

cosmetics changes, reverted

@fdesbiens
Copy link
Contributor

Is this ready to merge, @rahmanih?

@rahmanih
Copy link
Contributor

@fdesbiens
still under validation...

Copy link
Contributor

@rahmanih rahmanih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on Windows and Linux and it works as expected.

approved 💯

@fdesbiens fdesbiens merged commit 74288e2 into eclipse-threadx:dev Mar 3, 2026
1 check passed
@github-project-automation github-project-automation bot moved this from In review to Done in ThreadX Roadmap Mar 3, 2026
@ayedm1 ayedm1 deleted the device_storage_load_eject_media branch March 3, 2026 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or enhancement request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants