drive: run drive-prep unlock for EVERY disc, incl. DVD (fix riplock regression)
The v1.0.0-rc.1 unlocker refactor added an `if disc_is_dvd() { return }`
early-return in Drive::init() that skipped the whole drive-prep unlock for
DVDs. That firmware unlock is what lifts riplock and readies max read
speed — a DRIVE-level, disc-independent feature — so skipping it left
every DVD stuck at stock/riplock speed (~0.4x, 3h ETA). UHD was unaffected
because it flows through the unlock.
Remove the skip: init() now runs the identity-keyed drive unlocker for all
discs (disc kind is Unknown at init, so only the drive unlocker matches;
the AACS host-cert handshake and CSS bus-auth still run later, gated on the
real disc kind, on top of the unlocked drive). Speed stays where it
belongs — SET CD SPEED(0xFFFF) at pass-1 start (disc/mod.rs) — not in the
unlocker. Also drop the matching probe_disc DVD skip.
Reverts the SET STREAMING stopgap (separate freemkv-unlock revert): that
treated the symptom; the real bug was the skipped unlock. Drive features
come from the firmware unlock, not a stock speed CDB.
This commit is contained in:
@@ -124,26 +124,6 @@ pub(crate) fn run_unlockers(
|
||||
Err(fu::UnlockError::NotApplicable)
|
||||
}
|
||||
|
||||
/// Apply drive-level feature tuning (max read speed / riplock lift) for the
|
||||
/// installed drive, for ANY disc. This is the drive-features capability, kept
|
||||
/// separate from bus removal: it issues only STOCK MMC commands (no firmware
|
||||
/// unlock), so it is safe on a CSS DVD that must stay in stock mode. Each
|
||||
/// unlocker's `apply_drive_features` is self-gating (a no-op unless it recognises
|
||||
/// the drive), so we call every one; disc kind is irrelevant here, so we pass
|
||||
/// `Unknown`. Best-effort — never returns an error to the caller (a slow drive
|
||||
/// still rips).
|
||||
pub(crate) fn apply_drive_features(
|
||||
scsi: &mut dyn crate::scsi::ScsiTransport,
|
||||
drive_id: &crate::identity::DriveId,
|
||||
) {
|
||||
let id = to_fu_drive_id(drive_id);
|
||||
let ctx = fu::UnlockCtx::new(&id, fu::DiscKind::Unknown, &[]);
|
||||
let mut adapter = ScsiAdapter(scsi);
|
||||
for u in fu::all_unlockers() {
|
||||
let _ = u.apply_drive_features(&mut adapter, &ctx);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
Reference in New Issue
Block a user