Repository navigation
scsi: targets any controller can open, with the machine's identity - #265
Merged
Merged
Conversation
The code that opens a target -- a CHD, a copy-on-write overlay, the file itself, or an empty CD-ROM drive -- lived inside wd33c93a; it is ScsiDevice::open now. What a target reports in INQUIRY is the attaching controller's ScsiIdentity: the Indy keeps its Sony CDU-76S and SGI disk, defined beside wd33c93a, and the command set stays shared. The shared device also answers RESERVE, RELEASE, VERIFY and SET CD SPEED (nothing to do), takes MODE SELECT(10) and a 1024-byte block length, and says why a write failed (write protected, block out of range, medium error) instead of returning a check condition with no sense; a write past the end is refused rather than growing the image. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
scsi: targets any controller can open, with the machine's identity
Groundwork for a second SCSI host adapter (the O2's AIC-7880), with no change to what the Indy or Indigo2 report.
The change
ScsiDevice::open: the code that opens a target (a CHD, a copy-on-write overlay, the file itself, or an empty CD-ROM drive) moves out ofwd33c93a::add_device, so any controller can attach the same targets.ScsiIdentity: what a target reports in INQUIRY (vendor, product, revision) is passed in by the controller. The Indy and Indigo2 keep exactly what they reported before, the Sony CDU-76S and the SGI disk strings, now defined besidewd33c93a.Tests
cargo test --lib: all pass, apart frombreakpoints_can_be_set_while_running_and_report_their_hitandudp_fragmented_both_ways, which fail the same way onmainhere. Built in the three CI configurations.🤖 Generated with Claude Code