diff --git a/test-tool/iscsi-support.c b/test-tool/iscsi-support.c index 2b4c75e..c009d70 100644 --- a/test-tool/iscsi-support.c +++ b/test-tool/iscsi-support.c @@ -2461,6 +2461,9 @@ int set_swp(struct scsi_device *sdev) goto finished; } + /* For MODE SELECT PS is reserved and hence must be cleared */ + mp->ps = 0; + logging(LOG_VERBOSE, "Turn SWP ON"); mp->control.swp = 1; @@ -2510,6 +2513,9 @@ int clear_swp(struct scsi_device *sdev) goto finished; } + /* For MODE SELECT PS is reserved and hence must be cleared */ + mp->ps = 0; + logging(LOG_VERBOSE, "Turn SWP OFF"); mp->control.swp = 0; diff --git a/utils/iscsi-swp.c b/utils/iscsi-swp.c index fc34281..c282df4 100644 --- a/utils/iscsi-swp.c +++ b/utils/iscsi-swp.c @@ -206,6 +206,9 @@ int main(int argc, char *argv[]) goto finished; } + /* For MODE SELECT PS is reserved and hence must be cleared */ + mp->ps = 0; + printf("SWP:%d\n", mp->control.swp); switch (swp) {