From dcb1cc079e2bc40baaa141f64cd15f66a5446eea Mon Sep 17 00:00:00 2001 From: Uwe Seimet Date: Sun, 6 Mar 2022 12:51:41 +0100 Subject: [PATCH] Updated SASI LUN handling --- src/raspberrypi/controllers/sasidev_ctrl.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/raspberrypi/controllers/sasidev_ctrl.cpp b/src/raspberrypi/controllers/sasidev_ctrl.cpp index 944cb9a6..2676c19d 100644 --- a/src/raspberrypi/controllers/sasidev_ctrl.cpp +++ b/src/raspberrypi/controllers/sasidev_ctrl.cpp @@ -647,11 +647,8 @@ void SASIDEV::Error(sense_key sense_key, asc asc, status status) return; } - // Logical Unit - DWORD lun = GetEffectiveLun(); - // Set status and message - ctrl.status = (lun << 5) | status; + ctrl.status = (GetEffectiveLun() << 5) | status; // status phase Status(); @@ -1085,6 +1082,6 @@ void SASIDEV::FlushUnit() int SASIDEV::GetEffectiveLun() const { - return (ctrl.cmd[1] >> 5) & 0x01; + return (ctrl.cmd[1] >> 5) & 0x07; }