Lock down Platform trait: pub(crate), only init/set_read_speed/is_ready

Platform trait is no longer publicly exported. External code uses
DriveSession only — cannot call unlock, load_firmware, calibrate directly.

- Platform trait: pub(crate) with 3 methods only
- All handlers are private methods on Mt1959
- DriveStatus moved to mt1959 internal struct
- init() has guard: no re-init if already ready
- set_read_speed() has guard: no-op if not calibrated
- Removed open_unlocked() — open() is the only entry
- Removed Platform and DriveStatus from public exports

Prevents: out-of-sequence SCSI commands, double-init, wrong firmware writes.
This commit is contained in:
MattJackson
2026-04-08 21:41:57 -07:00
parent 97407570ed
commit 475cfadfc8
4 changed files with 61 additions and 87 deletions
+1 -1
View File
@@ -86,7 +86,7 @@ pub use error::{Error, Result};
pub use drive::{DriveSession, find_drive, find_drives, resolve_device};
pub use identity::DriveId;
pub use profile::{DriveProfile, Chipset};
pub use platform::{Platform, DriveStatus};
// Platform trait is pub(crate) — callers use DriveSession, not Platform directly
pub use scsi::ScsiTransport;
pub use speed::DriveSpeed;
pub use disc::{Disc, DiscFormat, Title, Clip, Stream, VideoStream, AudioStream, SubtitleStream,