Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pds_core: smaller adminq poll starting interval

Shorten the adminq poll starting interval in order to notice
any transaction errors more quickly.

Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Shannon Nelson and committed by
David S. Miller
7c4f4c4f 144530c1

+3 -3
+2 -2
drivers/net/ethernet/amd/pds_core/adminq.c
··· 225 225 union pds_core_adminq_comp *comp, 226 226 bool fast_poll) 227 227 { 228 - unsigned long poll_interval = 1; 228 + unsigned long poll_interval = 200; 229 229 unsigned long poll_jiffies; 230 230 unsigned long time_limit; 231 231 unsigned long time_start; ··· 252 252 time_limit = time_start + HZ * pdsc->devcmd_timeout; 253 253 do { 254 254 /* Timeslice the actual wait to catch IO errors etc early */ 255 - poll_jiffies = msecs_to_jiffies(poll_interval); 255 + poll_jiffies = usecs_to_jiffies(poll_interval); 256 256 remaining = wait_for_completion_timeout(wc, poll_jiffies); 257 257 if (remaining) 258 258 break;
+1 -1
include/linux/pds/pds_adminq.h
··· 4 4 #ifndef _PDS_CORE_ADMINQ_H_ 5 5 #define _PDS_CORE_ADMINQ_H_ 6 6 7 - #define PDSC_ADMINQ_MAX_POLL_INTERVAL 256 7 + #define PDSC_ADMINQ_MAX_POLL_INTERVAL 256000 /* usecs */ 8 8 9 9 enum pds_core_adminq_flags { 10 10 PDS_AQ_FLAG_FASTPOLL = BIT(1), /* completion poll at 1ms */