File tree 2 files changed +7
-8
lines changed
2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 44
44
#define PLPKS_MAX_DATA_SIZE 4000
45
45
46
46
// Timeouts for PLPKS operations
47
- #define PLPKS_MAX_TIMEOUT 5000 // msec
48
- #define PLPKS_FLUSH_SLEEP 10 // msec
49
- #define PLPKS_FLUSH_SLEEP_RANGE 400
47
+ #define PLPKS_MAX_TIMEOUT (5 * USEC_PER_SEC)
48
+ #define PLPKS_FLUSH_SLEEP 10000 // usec
50
49
51
50
struct plpks_var {
52
51
char * component ;
Original file line number Diff line number Diff line change @@ -415,8 +415,7 @@ static int plpks_confirm_object_flushed(struct label *label,
415
415
break ;
416
416
}
417
417
418
- usleep_range (PLPKS_FLUSH_SLEEP ,
419
- PLPKS_FLUSH_SLEEP + PLPKS_FLUSH_SLEEP_RANGE );
418
+ fsleep (PLPKS_FLUSH_SLEEP );
420
419
timeout = timeout + PLPKS_FLUSH_SLEEP ;
421
420
} while (timeout < PLPKS_MAX_TIMEOUT );
422
421
@@ -464,9 +463,10 @@ int plpks_signed_update_var(struct plpks_var *var, u64 flags)
464
463
465
464
continuetoken = retbuf [0 ];
466
465
if (pseries_status_to_err (rc ) == - EBUSY ) {
467
- int delay_ms = get_longbusy_msecs (rc );
468
- mdelay (delay_ms );
469
- timeout += delay_ms ;
466
+ int delay_us = get_longbusy_msecs (rc ) * 1000 ;
467
+
468
+ fsleep (delay_us );
469
+ timeout += delay_us ;
470
470
}
471
471
rc = pseries_status_to_err (rc );
472
472
} while (rc == - EBUSY && timeout < PLPKS_MAX_TIMEOUT );
You can’t perform that action at this time.
0 commit comments