WIP: LibreDrive stuck state detection in wait_ready + scan

- wait_ready: detects MMkv vendor probe when TUR returns Illegal Request
- scan: capacity fallback to 0 when READ CAPACITY fails
- Still needs: re-init to restore standard SCSI commands, or use raw reads for UDF
This commit is contained in:
MattJackson
2026-04-11 22:09:26 +00:00
parent 9078aa8718
commit 9268ea2fdb
2 changed files with 23 additions and 9 deletions
+2 -1
View File
@@ -533,7 +533,8 @@ impl Disc {
/// The session must be open and unlocked (DriveSession::open handles this).
/// All disc reads use standard READ(10) via UDF -- no vendor SCSI commands.
pub fn scan(session: &mut DriveSession, opts: &ScanOptions) -> Result<Self> {
let capacity = Self::read_capacity(session)?;
// READ CAPACITY may fail in LibreDrive mode — proceed with 0 and estimate later
let capacity = Self::read_capacity(session).unwrap_or(0);
let handshake = Self::do_handshake(session, opts);
Self::scan_with(session, capacity, handshake, opts)
}