More custom mode page fixes - fall-through to standard pages if not found
authorMichael McMaster <michael@codesrc.com>
Mon, 1 Aug 2016 09:33:03 +0000 (19:33 +1000)
committerMichael McMaster <michael@codesrc.com>
Mon, 1 Aug 2016 09:33:03 +0000 (19:33 +1000)
software/SCSI2SD/src/mode.c

index ee9fa56..112c294 100755 (executable)
@@ -335,7 +335,7 @@ static void doModeSense(
        if (scsiDev.target->cfg->modePages[1] != 0)\r
        {\r
                pageFound = useCustomPages(scsiDev.target->cfg, pc, pageCode, &idx);\r
-               pageCode = 0xFF; // dodgy, skip rest of logic\r
+               if (pageFound && pageCode != 0x3F) pageCode = 0xFF; // skip rest of logic\r
        }\r
 \r
        if (pageCode == 0x01 || pageCode == 0x3F)\r