diff options
author | Alex Elder <elder@linaro.org> | 2021-01-13 11:15:30 -0600 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-01-14 17:40:05 -0800 |
commit | 59b5f45496253ae977792cbe82480686be46b005 (patch) | |
tree | 83bec2d1be52990919be4bdff1ac64fd1af1c580 /drivers | |
parent | 74401946bdad6eb812d2d3c77f1ace849f963a6a (diff) |
net: ipa: change GSI command timeout
The GSI command timeout is currently 5 seconds, which is much higher
than it should be.
Express the timeout in milliseconds rather than seconds, and reduce
it to 50 milliseconds.
Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ipa/gsi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index 93b143ba92be..4de769166978 100644 --- a/drivers/net/ipa/gsi.c +++ b/drivers/net/ipa/gsi.c @@ -89,7 +89,7 @@ /* Delay period for interrupt moderation (in 32KHz IPA internal timer ticks) */ #define GSI_EVT_RING_INT_MODT (32 * 1) /* 1ms under 32KHz clock */ -#define GSI_CMD_TIMEOUT 5 /* seconds */ +#define GSI_CMD_TIMEOUT 50 /* milliseconds */ #define GSI_CHANNEL_STOP_RX_RETRIES 10 #define GSI_CHANNEL_MODEM_HALT_RETRIES 10 @@ -359,11 +359,13 @@ static u32 gsi_ring_index(struct gsi_ring *ring, u32 offset) static bool gsi_command(struct gsi *gsi, u32 reg, u32 val, struct completion *completion) { + unsigned long timeout = msecs_to_jiffies(GSI_CMD_TIMEOUT); + reinit_completion(completion); iowrite32(val, gsi->virt + reg); - return !!wait_for_completion_timeout(completion, GSI_CMD_TIMEOUT * HZ); + return !!wait_for_completion_timeout(completion, timeout); } /* Return the hardware's notion of the current state of an event ring */ |