• Jeffrey Lee's avatar
    Fix USE_SCSI_OP version of CD_SCSIUserOp · 4ed2ff17
    Jeffrey Lee authored
    A fix from André Timmermans:
    CD_SCSIUserOp is not working because of a bug in the SWI dispatch code.
    In this code R11 is converted from a SWI offset nr into a softloadable
    driver opcode but when later the code checks if the driver implements
    the opcode or if it must call a local default implementation it compares
    R11 against SWI offset numbers (minus 1) instead of the driver opcodes.
    Per chance the number matches for the other opcodes but not for
    SCSIUserOp and so the softloadable driver is always called in this case
    even when there is no implementation for the opcode (like in
    CDFSSoftSCSI). Here is a patch to fix this.
    Tested on BB-xM, fixes CD_SCSIUserOp not working with CDFSSoftSCSI.
    Fixes https://www.riscosopen.org/tracker/tickets/491
    Version 2.42. Tagged as 'CDFSDriver-2_42'
VersionASM 850 Bytes