diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-07-10 17:08:55 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-07-10 17:08:55 +0300 |
commit | 81bd6aab35ad9ecce95dfe3e33c807effe370d83 (patch) | |
tree | 6c856cb948d3bc12246f696b209a410ae138d52f /drivers/platform/x86/amd/hsmp/hsmp.c | |
parent | a681e6559ce6fe8ca56333f7041d0a0d38aaee94 (diff) | |
parent | 1562d948232546cfad45a1beddc70fe0c7b34950 (diff) | |
download | linux-rolling-stable.tar.xz |
Merge v6.15.6linux-rolling-stable
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/platform/x86/amd/hsmp/hsmp.c')
-rw-r--r-- | drivers/platform/x86/amd/hsmp/hsmp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/platform/x86/amd/hsmp/hsmp.c b/drivers/platform/x86/amd/hsmp/hsmp.c index a3ac09a90de4..ab877112f4c8 100644 --- a/drivers/platform/x86/amd/hsmp/hsmp.c +++ b/drivers/platform/x86/amd/hsmp/hsmp.c @@ -99,7 +99,7 @@ static int __hsmp_send_message(struct hsmp_socket *sock, struct hsmp_message *ms short_sleep = jiffies + msecs_to_jiffies(HSMP_SHORT_SLEEP); timeout = jiffies + msecs_to_jiffies(HSMP_MSG_TIMEOUT); - while (time_before(jiffies, timeout)) { + while (true) { ret = sock->amd_hsmp_rdwr(sock, mbinfo->msg_resp_off, &mbox_status, HSMP_RD); if (ret) { dev_err(sock->dev, "Error %d reading mailbox status\n", ret); @@ -108,6 +108,10 @@ static int __hsmp_send_message(struct hsmp_socket *sock, struct hsmp_message *ms if (mbox_status != HSMP_STATUS_NOT_READY) break; + + if (!time_before(jiffies, timeout)) + break; + if (time_before(jiffies, short_sleep)) usleep_range(50, 100); else |