]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/target/target_core_alua.c
target: Fix MAINTENANCE_IN service action CDB checks to use lower 5 bits
[karo-tx-linux.git] / drivers / target / target_core_alua.c
index c39ae7cd9895fd5d511e745ba6380358a4038620..be7251ee8b3a3ce8c311851c3dea683d1b9152c1 100644 (file)
@@ -387,7 +387,7 @@ static inline int core_alua_state_standby(
        case RECEIVE_DIAGNOSTIC:
        case SEND_DIAGNOSTIC:
        case MAINTENANCE_IN:
-               switch (cdb[1]) {
+               switch (cdb[1] & 0x1f) {
                case MI_REPORT_TARGET_PGS:
                        return 0;
                default:
@@ -429,7 +429,7 @@ static inline int core_alua_state_unavailable(
        case INQUIRY:
        case REPORT_LUNS:
        case MAINTENANCE_IN:
-               switch (cdb[1]) {
+               switch (cdb[1] & 0x1f) {
                case MI_REPORT_TARGET_PGS:
                        return 0;
                default:
@@ -469,7 +469,7 @@ static inline int core_alua_state_transition(
        case INQUIRY:
        case REPORT_LUNS:
        case MAINTENANCE_IN:
-               switch (cdb[1]) {
+               switch (cdb[1] & 0x1f) {
                case MI_REPORT_TARGET_PGS:
                        return 0;
                default: