]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
pds_core: smaller adminq poll starting interval
authorShannon Nelson <shannon.nelson@amd.com>
Fri, 25 Apr 2025 20:46:17 +0000 (13:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Apr 2025 11:55:59 +0000 (12:55 +0100)
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>
drivers/net/ethernet/amd/pds_core/adminq.c
include/linux/pds/pds_adminq.h

index 506f682d15c10a009e09da6955206c865f44a206..097bb092bdb8cd76b5a0185d98373eff72d1c3f9 100644 (file)
@@ -225,7 +225,7 @@ int pdsc_adminq_post(struct pdsc *pdsc,
                     union pds_core_adminq_comp *comp,
                     bool fast_poll)
 {
-       unsigned long poll_interval = 1;
+       unsigned long poll_interval = 200;
        unsigned long poll_jiffies;
        unsigned long time_limit;
        unsigned long time_start;
@@ -252,7 +252,7 @@ int pdsc_adminq_post(struct pdsc *pdsc,
        time_limit = time_start + HZ * pdsc->devcmd_timeout;
        do {
                /* Timeslice the actual wait to catch IO errors etc early */
-               poll_jiffies = msecs_to_jiffies(poll_interval);
+               poll_jiffies = usecs_to_jiffies(poll_interval);
                remaining = wait_for_completion_timeout(wc, poll_jiffies);
                if (remaining)
                        break;
index 339156113fa5d7addf3b5d4077e5487a9d24d52b..40ff0ec2b87922a981a78ff9c24022d919e69040 100644 (file)
@@ -4,7 +4,7 @@
 #ifndef _PDS_CORE_ADMINQ_H_
 #define _PDS_CORE_ADMINQ_H_
 
-#define PDSC_ADMINQ_MAX_POLL_INTERVAL  256
+#define PDSC_ADMINQ_MAX_POLL_INTERVAL  256000  /* usecs */
 
 enum pds_core_adminq_flags {
        PDS_AQ_FLAG_FASTPOLL    = BIT(1),       /* completion poll at 1ms */