Skip to content

Commit 36d73ef

Browse files
committed
librtas: return CALL_AGAIN on RC_BUSY status in handle_delay()
There is no need to delay before retrying on RC_BUSY return status. The kernel used to get this wrong too. torvalds/linux@38f7b70 Excerpt referenced from above commit: RTAS_BUSY (-2): RTAS has suspended a potentially long-running operation in order to meet its latency obligation and give the OS the opportunity to perform other work. RTAS can resume making progress as soon as the OS reattempts the call. To avoid uselessly sleeping update handle_delay() to return CALL_AGAIN immediately when it is passed RC_BUSY. Suggested-by: Nathan Lynch <[email protected]> Signed-off-by: Tyrel Datwyler <[email protected]>
1 parent 6713a92 commit 36d73ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

librtas_src/syscall_calls.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ unsigned int handle_delay(int status, uint64_t * elapsed)
7575
for (ms = 1; order > 0; order--)
7676
ms = ms * 10;
7777
} else if (status == RC_BUSY) {
78-
/* Regular Delay */
79-
ms = 1;
78+
/* Retry */
79+
return CALL_AGAIN;
8080
} else {
8181
/* Not a delay return code */
8282
return 0;

0 commit comments

Comments
 (0)