Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f8be11ed authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cnss2: Add delay for pci link training retries"

parents 526ac3d8 e0b81867
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -78,6 +78,7 @@ static DEFINE_SPINLOCK(time_sync_lock);
#define POWER_ON_RETRY_DELAY_MS			200

#define LINK_TRAINING_RETRY_MAX_TIMES		3
#define LINK_TRAINING_RETRY_DELAY_MS		500

#define HANG_DATA_LENGTH		384
#define HST_HANG_DATA_OFFSET		((3 * 1024 * 1024) - HANG_DATA_LENGTH)
@@ -777,6 +778,8 @@ static int cnss_set_pci_link(struct cnss_pci_data *pci_priv, bool link_up)
			    link_up ? "resume" : "suspend", ret);
		if (link_up && retry++ < LINK_TRAINING_RETRY_MAX_TIMES) {
			cnss_pr_dbg("Retry PCI link training #%d\n", retry);
			if (pci_priv->pci_link_down_ind)
				msleep(LINK_TRAINING_RETRY_DELAY_MS * retry);
			goto retry;
		}
	}