PiSCSI / piscsi

PiSCSI allows a Raspberry Pi to function as emulated SCSI devices (hard disk, CD-ROM, and others) for vintage SCSI-based computers and devices. This is a fork of the RaSCSI project by GIMONS.
https://piscsi.org
BSD 3-Clause "New" or "Revised" License
545 stars 82 forks source link

ModePageDevice::ModeSelect() is unimplemented but called by ScsiController::XferOutBlockOriented() #1397

Closed kkaempf closed 10 months ago

kkaempf commented 11 months ago

Info

Describe the issue

While hard disk emulation works nicely, mounting a CDROM ISO results in "fatal controller error" from VAX/VMS.

Running piscsi in trace mode reveals

[2023-12-11 20:28:52.262] [trace] (ID 5) - Controller is executing ModeSelect6, CDB $151000001800
[2023-12-11 20:28:52.262] [debug] (ID:LUN 5:0) - Device is executing ModeSelect6 ($15)
[2023-12-11 20:28:52.262] [trace] (ID 5) - Data Out phase
[2023-12-11 20:28:52.262] [trace] (ID 5) - Receiving data, transfer length: 24 byte(s)
[2023-12-11 20:28:52.262] [trace] (ID 5) - Phase: dataout
[2023-12-11 20:28:52.262] [debug] (ID 5) - Error status: Sense Key $05, ASC $20
[2023-12-11 20:28:52.262] [trace] (ID 5) - Status phase, status is $02
[2023-12-11 20:28:52.262] [trace] (ID 5) - Bus Free phase

-> illegal_request, invalid_command_operation_code

Looking through the code (and adding a respective LogTrace call) reveals that ModePageDevice::ModeSelect - which is not implemented and always throws - is called from ScsiController::XferOutBlockOriented.

It looks like an incomplete implementation ?!

rdmark commented 10 months ago

Merged. Thanks for contributing!