Kaynağa Gözat

Fix the ordering of CD and Toolbox vendor commands

The actual issue, as pointed out by @saybur,
here: https://github.com/ZuluSCSI/ZuluSCSI-firmware/pull/434#issuecomment-2207978614

was that `scsiCDRomCommand()` was handling CD-ROM specific vendor
commands before `scsiVendorCommand()`, where the Toolbox vendor commands
were being handled. When Apple quirks or Plextor vendor commands
were enabled and Toolbox was enabled, the CD-ROM vendor commands were
overriding the Toolbox commands.

This fix moves `scsiToolboxCommand()` into `scsi.c` above
scsiCDRomCommand to override the CD-ROM specific commands.
Morio 1 yıl önce
ebeveyn
işleme
ee6bcc13eb

+ 7 - 0
lib/SCSI2SD/src/firmware/scsi.c

@@ -599,8 +599,15 @@ static void process_Command()
 	{
 		enter_Status(CONFLICT);
 	}
+	// Handle Toolbox commands, overriding other vendor commands if enabled
+	else if (scsiToolboxEnabled() && scsiToolboxCommand())
+	{
+		// already handled
+	}
 	// Handle odd device types first that may override basic read and
 	// write commands. Will fall-through to generic disk handling.
+	// Some device specific vendor commands are located here instead
+	// of in scsiVendorCommand()
 	else if (((cfg->deviceType == S2S_CFG_OPTICAL) && scsiCDRomCommand()) ||
 		((cfg->deviceType == S2S_CFG_SEQUENTIAL) && scsiTapeCommand()) ||
 #ifdef ZULUSCSI_NETWORK

+ 0 - 4
lib/SCSI2SD/src/firmware/vendor.c

@@ -171,10 +171,6 @@ int scsiVendorCommand()
 	  // XEBEC S1410 controller
 	  // Stub, return success
 	}   	
-	else if (scsiToolboxEnabled() && scsiToolboxCommand())
-	{
-		// already handled
-	}
 	else
 	{
 		commandHandled = 0;