Matthew Jackson 24909ba668 fix(mt1959): poll media ready after a confirmed upload, stall-bounded (T6)
A confirmed load_firmware proves only that the new firmware answers vendor
READ BUFFERs. libfreemkv's session runs wait_ready before init and never
after, so run_probe's READ CAPACITY could see NOT READY, probe a UHD disc at
the BD address, and spin validate's five retries.

After a confirmed upload, run_init now polls TEST UNIT READY every 500 ms
until the drive is ready. Per T6 (stop-design-v5 §2.11), progress is a
(sense key, ASC, ASCQ) answer not yet seen in this poll; it fails with the
new internal ld Error::NotReady (7104, maps to NotApplicable) only after
60 s without progress. There is no total cap, and a dead bus aborts at
once. The wait sits behind a ReadyClock seam, so the tests run the window
on a virtual clock. ST-U1 turns the wait into the cancellable pause.
2026-09-27 23:50:46 -07:00
2026-09-02 12:27:57 -07:00
2026-09-27 17:07:40 -07:00
2026-09-02 12:27:57 -07:00
2026-07-10 12:31:19 -07:00
2026-09-02 12:27:57 -07:00
2026-09-02 12:27:57 -07:00

License: MIT CI codecov

freemkv-unlock

The unlock layer for the freemkv toolchain.

An unlocker removes a drive-level bus-encryption barrier so the drive serves readable (de-bus'd / de-scrambled) sectors. Content-key decryption is a separate concern — the consumer's job.

This crate defines the Unlocker contract and a generic SCSI transport contract, and holds the self-contained unlocker modules. The consumer (libfreemkv) depends on this crate and dispatches through all_unlockers(); it never names an individual unlocker, and clients of libfreemkv are oblivious to unlockers entirely (as they are to the SCSI layer).

use freemkv_unlock::UnlockError;

// Drive-prep: try each unlocker's feature unlock until one claims the drive.
// `NotApplicable` means "not this unlocker's drive" — move on; a transport
// error means a dead bus — abort. `unlock_bus` follows the same contract for
// removing per-disc bus encryption.
for u in freemkv_unlock::all_unlockers() {
    match u.unlock_features(&mut scsi, &ctx) {
        Ok(unlocked) => return Ok(unlocked),
        Err(UnlockError::NotApplicable) => continue,
        Err(e) => return Err(e),
    }
}

To remove an unlocker, delete its module directory and its one line in all_unlockers() — nothing else changes.

License

freemkv-unlock's own source is MIT — see LICENSE.

src/ld/profiles.json bundles volatile, RAM-only LibreDrive microcode authored and owned by the MakeMKV team (GuinpinSoft inc.) — Copyright (c) MakeMKV team, all rights reserved. That microcode is third-party proprietary material, not covered by the MIT license; no ownership is claimed. See NOTICE. With thanks to the MakeMKV team for LibreDrive.

S
Description
No description provided
Readme MIT
1.3 MiB
Languages
Rust 100%