Browse Source

cnss2: Print sw_ctrl_gpio value setting pci_link up fails

This change will print sw_ctrl_gpio value during pci_link up fails.

Change-Id: Ifc92f52911e64b69ba80787763de0b5d1e15c217
CRs-Fixed: 3641068
Prateek Patil 1 year ago
parent
commit
20021f2826
1 changed files with 7 additions and 0 deletions
  1. 7 0
      cnss2/pci_qcom.c

+ 7 - 0
cnss2/pci_qcom.c

@@ -365,6 +365,11 @@ static int cnss_set_pci_link_status(struct cnss_pci_data *pci_priv,
 int cnss_set_pci_link(struct cnss_pci_data *pci_priv, bool link_up)
 {
 	int ret = 0, retry = 0;
+	struct cnss_plat_data *plat_priv;
+	int sw_ctrl_gpio;
+
+	plat_priv = pci_priv->plat_priv;
+	sw_ctrl_gpio = plat_priv->pinctrl_info.sw_ctrl_gpio;
 
 	cnss_pr_vdbg("%s PCI link\n", link_up ? "Resuming" : "Suspending");
 
@@ -373,6 +378,8 @@ retry:
 		ret = cnss_pci_set_link_up(pci_priv);
 		if (ret && retry++ < LINK_TRAINING_RETRY_MAX_TIMES) {
 			cnss_pr_dbg("Retry PCI link training #%d\n", retry);
+			cnss_pr_dbg("Value of SW_CTRL GPIO: %d\n",
+				    cnss_get_input_gpio_value(plat_priv, sw_ctrl_gpio));
 			if (pci_priv->pci_link_down_ind)
 				msleep(LINK_TRAINING_RETRY_DELAY_MS * retry);
 			goto retry;