diff options
| author | David S. Miller <davem@davemloft.net> | 2025-04-30 12:56:00 +0100 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2025-04-30 12:56:00 +0100 |
| commit | deeed351e982ac4d521598375b34b071304533b0 (patch) | |
| tree | 8957235b628105a9251d200140ae80b136b6fdb4 /drivers/net | |
| parent | Merge tag 'nf-next-25-04-29' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff) | |
| parent | pds_core: init viftype default in declaration (diff) | |
| download | linux-deeed351e982ac4d521598375b34b071304533b0.tar.gz linux-deeed351e982ac4d521598375b34b071304533b0.zip | |
Merge branch 'pds_core-cleanups'
Shannon Nelson says:
====================
pds_core: small code updates
These are a few little code touch ups for a kdoc complaint,
quicker error detection, and a cleaner initialization.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
| -rw-r--r-- | drivers/net/ethernet/amd/pds_core/adminq.c | 4 | ||||
| -rw-r--r-- | drivers/net/ethernet/amd/pds_core/core.c | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/ethernet/amd/pds_core/adminq.c b/drivers/net/ethernet/amd/pds_core/adminq.c index 506f682d15c1..097bb092bdb8 100644 --- a/drivers/net/ethernet/amd/pds_core/adminq.c +++ b/drivers/net/ethernet/amd/pds_core/adminq.c @@ -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; diff --git a/drivers/net/ethernet/amd/pds_core/core.c b/drivers/net/ethernet/amd/pds_core/core.c index 0e408f990f0b..076dfe2910c7 100644 --- a/drivers/net/ethernet/amd/pds_core/core.c +++ b/drivers/net/ethernet/amd/pds_core/core.c @@ -402,6 +402,7 @@ err_out_uninit: static struct pdsc_viftype pdsc_viftype_defaults[] = { [PDS_DEV_TYPE_FWCTL] = { .name = PDS_DEV_TYPE_FWCTL_STR, + .enabled = true, .vif_id = PDS_DEV_TYPE_FWCTL, .dl_id = -1 }, [PDS_DEV_TYPE_VDPA] = { .name = PDS_DEV_TYPE_VDPA_STR, @@ -432,9 +433,6 @@ static int pdsc_viftypes_init(struct pdsc *pdsc) /* See what the Core device has for support */ vt_support = !!le16_to_cpu(pdsc->dev_ident.vif_types[vt]); - if (vt == PDS_DEV_TYPE_FWCTL) - pdsc->viftype_status[vt].enabled = true; - dev_dbg(pdsc->dev, "VIF %s is %ssupported\n", pdsc->viftype_status[vt].name, vt_support ? "" : "not "); |
