Ver Fonte

Post UNIT_ATTENTION condition after CD medium change (#247)

Trying if this helps for hosts that do not detect medium
change from a single "NO MEDIUM" message.

Requires unit attention to be enabled in zuluscsi.ini by:

[SCSI]
EnableUnitAttention = 1
Petteri Aimonen há 2 anos atrás
pai
commit
82a8b9493b
1 ficheiros alterados com 6 adições e 0 exclusões
  1. 6 0
      src/BlueSCSI_cdrom.cpp

+ 6 - 0
src/BlueSCSI_cdrom.cpp

@@ -1158,6 +1158,12 @@ void cdromCloseTray(image_config_t &img)
         debuglog("------ CDROM close tray on ID ", (int)target);
         img.ejected = false;
         img.cdrom_events = 2; // New media
+
+        if (scsiDev.boardCfg.flags & S2S_CFG_ENABLE_UNIT_ATTENTION)
+        {
+            debuglog("------ Posting UNIT ATTENTION after medium change");
+            scsiDev.targets[target].unitAttention = NOT_READY_TO_READY_TRANSITION_MEDIUM_MAY_HAVE_CHANGED;
+        }
     }
 }