Commit deeed351 authored by David S. Miller's avatar David S. Miller
Browse files

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: default avatarDavid S. Miller <davem@davemloft.net>
parents 1f773970 6828208a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
+1 −3
Original line number Diff line number Diff line
@@ -402,6 +402,7 @@ static int pdsc_core_init(struct pdsc *pdsc)

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 ");
+1 −2
Original line number Diff line number Diff line
@@ -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 */
@@ -463,7 +463,6 @@ struct pds_core_lif_getattr_cmd {
 * @rsvd:       Word boundary padding
 * @comp_index: Index in the descriptor ring for which this is the completion
 * @state:	LIF state (enum pds_core_lif_state)
 * @name:	LIF name string, 0 terminated
 * @features:	Features (enum pds_core_hw_features)
 * @rsvd2:      Word boundary padding
 * @color:	Color bit