Skip to contentSkip to conversation

platform/x86/intel/sdsi: Change mailbox timeout

PATCH In review David E. Box 3 participants 3 messages Apr 13, 2023 – Apr 17, 2023

Subsystems (2)
lore
Share & tools
lore

David E. Box

author maintainer
#0 lore raw

PATCH 1/1 platform/x86/intel/sdsi: Change mailbox timeout

On some platforms, it may take up to 400ms for the ready bit to be set in a successful mailbox transaction. Set the timeout to 500ms to cover the worst case.

---
 drivers/platform/x86/intel/sdsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/intel/sdsi.c +1 -1
index 9e0ea2cdd704..556e7c6dbb05 100644
@@ -49,7 +49,7 @@
 #define SDSI_MBOX_CMD_SUCCESS		0x40
 #define SDSI_MBOX_CMD_TIMEOUT		0x80
 
-#define MBOX_TIMEOUT_US			2000
+#define MBOX_TIMEOUT_US			500000
 #define MBOX_TIMEOUT_ACQUIRE_US		1000
 #define MBOX_POLLING_PERIOD_US		100
 #define MBOX_ACQUIRE_NUM_RETRIES	5

base-commit: 5b309e80f457ebb41770e0122766825a78cfc11b

Signature · 1 line
2.34.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · David E. Box

On some platforms, it may take up to 400ms for the ready bit to be set in a successful mailbox transaction. Set the timeout to 500ms to cover the worst case.

---
 drivers/platform/x86/intel/sdsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/intel/sdsi.c +0 -0
index 9e0ea2cdd704..556e7c6dbb05 100644

drivers/platform/x86/intel/sdsi.c line 55

Quoted 8 lines
drivers/platform/x86/intel/sdsi.c +1 -1
@@ -49,7 +49,7 @@
 #define SDSI_MBOX_CMD_SUCCESS		0x40
 #define SDSI_MBOX_CMD_TIMEOUT		0x80
 
-#define MBOX_TIMEOUT_US			2000
+#define MBOX_TIMEOUT_US			500000
 #define MBOX_TIMEOUT_ACQUIRE_US		1000
 #define MBOX_POLLING_PERIOD_US		100
 #define MBOX_ACQUIRE_NUM_RETRIES	5
Signature · 1 line
 i.
#2 lore raw

Hi,

Quoted 19 lines · Ilpo Järvinen
Quoted 17 lines · David E. Box

On some platforms, it may take up to 400ms for the ready bit to be set in a successful mailbox transaction. Set the timeout to 500ms to cover the worst case.

---
 drivers/platform/x86/intel/sdsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/intel/sdsi.c +0 -0
index 9e0ea2cdd704..556e7c6dbb05 100644
@@ -49,7 +49,7 @@
 #define SDSI_MBOX_CMD_SUCCESS		0x40
 #define SDSI_MBOX_CMD_TIMEOUT		0x80
 
Quoted 7 lines

drivers/platform/x86/intel/sdsi.c line 55

Quoted 5 lines
drivers/platform/x86/intel/sdsi.c +1 -1
-#define MBOX_TIMEOUT_US			2000
+#define MBOX_TIMEOUT_US			500000
 #define MBOX_TIMEOUT_ACQUIRE_US		1000
 #define MBOX_POLLING_PERIOD_US		100
 #define MBOX_ACQUIRE_NUM_RETRIES	5

Thank you both for the patch + review, I've applied this patch to my review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up in my review-hans branch once I've pushed my local branch there, which might take a while.

Once I've run some tests on this branch the patches there will be added to the platform-drivers-x86/for-next branch and eventually will be included in the pdx86 pull-request to Linus for the next merge-window.

Regards,

Hans