Skip to content

Commit

Permalink
Post UNIT_ATTENTION condition after CD medium change (#247)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
PetteriAimonen committed Aug 17, 2023
1 parent c4b7528 commit 6e2a988
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ZuluSCSI_cdrom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1157,6 +1157,12 @@ void cdromCloseTray(image_config_t &img)
dbgmsg("------ 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)
{
dbgmsg("------ Posting UNIT ATTENTION after medium change");
scsiDev.targets[target].unitAttention = NOT_READY_TO_READY_TRANSITION_MEDIUM_MAY_HAVE_CHANGED;
}
}
}

Expand Down

0 comments on commit 6e2a988

Please sign in to comment.