git: 7a3d9a7d49f1 - stable/13 - qoriq_dw_pci: Fix typo in link status checking code

From: Kornel Dulęba <kd_at_FreeBSD.org>
Date: Wed, 19 Oct 2022 12:45:48 UTC
The branch stable/13 has been updated by kd:

URL: https://cgit.FreeBSD.org/src/commit/?id=7a3d9a7d49f1652aa617c42fe994335cd59cd2ce

commit 7a3d9a7d49f1652aa617c42fe994335cd59cd2ce
Author:     Bartlomiej Grzesik <bag@semihalf.com>
AuthorDate: 2021-08-31 04:22:33 +0000
Commit:     Kornel Dulęba <kd@FreeBSD.org>
CommitDate: 2022-10-19 12:42:35 +0000

    qoriq_dw_pci: Fix typo in link status checking code
    
    On some DesignWare PCIe controllers accessing config registers of slots
    whose link is down triggers a SError. Because of that we need to check the
    link status before any acceses config space.
    Due to a typo link was always reported up.
    This fixes a SError that occured during boot on LS1028A-RDB.
    
    Obtained from:          Semihalf
    Reviewed by:            wma
    Differential revision:  https://reviews.freebsd.org/D31509
    
    (cherry picked from commit df9c0e88e1e30cb5d1c81c4c2f295f7d153ed02b)
---
 sys/arm64/qoriq/qoriq_dw_pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/arm64/qoriq/qoriq_dw_pci.c b/sys/arm64/qoriq/qoriq_dw_pci.c
index 424a030e094c..d052c9910a47 100644
--- a/sys/arm64/qoriq/qoriq_dw_pci.c
+++ b/sys/arm64/qoriq/qoriq_dw_pci.c
@@ -150,7 +150,7 @@ qorif_dw_pci_get_link(device_t dev, bool *status)
 	reg = pci_dw_dbi_rd4(sc->dev, sc->soc_cfg->pex_pf0_dgb);
 	reg >>=  sc->soc_cfg->ltssm_bit;
 	reg &= 0x3F;
-	*status = (reg = 0x11) ? true: false;
+	*status = (reg == 0x11) ? true : false;
 	return (0);
 }