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
This commit is contained in:

committed by
Ravindra Konda

parent
0a9f61aed2
commit
20021f2826
@@ -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 cnss_set_pci_link(struct cnss_pci_data *pci_priv, bool link_up)
|
||||||
{
|
{
|
||||||
int ret = 0, retry = 0;
|
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");
|
cnss_pr_vdbg("%s PCI link\n", link_up ? "Resuming" : "Suspending");
|
||||||
|
|
||||||
@@ -373,6 +378,8 @@ retry:
|
|||||||
ret = cnss_pci_set_link_up(pci_priv);
|
ret = cnss_pci_set_link_up(pci_priv);
|
||||||
if (ret && retry++ < LINK_TRAINING_RETRY_MAX_TIMES) {
|
if (ret && retry++ < LINK_TRAINING_RETRY_MAX_TIMES) {
|
||||||
cnss_pr_dbg("Retry PCI link training #%d\n", retry);
|
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)
|
if (pci_priv->pci_link_down_ind)
|
||||||
msleep(LINK_TRAINING_RETRY_DELAY_MS * retry);
|
msleep(LINK_TRAINING_RETRY_DELAY_MS * retry);
|
||||||
goto retry;
|
goto retry;
|
||||||
|
Reference in New Issue
Block a user