소스 검색

Request stop from target without response

Copy of
https://github.com/BlueSCSI/BlueSCSI-v2/commit/6743cb6e3deef3794fcd2fcf01ff4e82f47be3b5

Co-authored-by: Eric Helgeson <erichelgeson@gmail.com>
Morio 2 년 전
부모
커밋
97c14fb468
1개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 6 2
      src/ZuluSCSI_initiator.cpp

+ 6 - 2
src/ZuluSCSI_initiator.cpp

@@ -560,10 +560,14 @@ bool scsiRequestSense(int target_id, uint8_t *sense_key)
 // Execute UNIT START STOP command to load/unload media
 bool scsiStartStopUnit(int target_id, bool start)
 {
-    uint8_t command[6] = {0x1B, 0, 0, 0, 0, 0};
+    uint8_t command[6] = {0x1B, 0x1, 0, 0, 0, 0};
     uint8_t response[4] = {0};
 
-    if (start) command[4] |= 1;
+    if (start)
+    {
+        command[4] |= 1; // Start
+        command[1] = 0;  // Immediate
+    }
 
     int status = scsiInitiatorRunCommand(target_id,
                                          command, sizeof(command),