git: df9c0e88e1e3 - main - qoriq_dw_pci: Fix typo in link status checking code

Wojciech Macek wma at FreeBSD.org
Tue Aug 31 04:23:57 UTC 2021


The branch main has been updated by wma:

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

commit df9c0e88e1e30cb5d1c81c4c2f295f7d153ed02b
Author:     Bartlomiej Grzesik <bag at semihalf.com>
AuthorDate: 2021-08-31 04:22:33 +0000
Commit:     Wojciech Macek <wma at FreeBSD.org>
CommitDate: 2021-08-31 04:22:33 +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
---
 sys/arm64/qoriq/qoriq_dw_pci.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/sys/arm64/qoriq/qoriq_dw_pci.c b/sys/arm64/qoriq/qoriq_dw_pci.c
index 4d0c7928fc4c..d052c9910a47 100644
--- a/sys/arm64/qoriq/qoriq_dw_pci.c
+++ b/sys/arm64/qoriq/qoriq_dw_pci.c
@@ -101,13 +101,7 @@ static struct qoriq_dw_pci_cfg ls2028_cfg = {
 /* Compatible devices. */
 static struct ofw_compat_data compat_data[] = {
 	{"fsl,ls1012a-pcie", (uintptr_t)&ls1012_cfg},
-	/*
-	 * XXX: On LS1028ARDB attaching this driver causes external abort.
-	 * Disable it for now.
-	 */
-#ifdef notyet
 	{"fsl,ls1028a-pcie", (uintptr_t)&ls2028_cfg},
-#endif
 	{"fsl,ls1043a-pcie", (uintptr_t)&ls1043_cfg},
 	{"fsl,ls1046a-pcie", (uintptr_t)&ls1012_cfg},
 	{"fsl,ls2080a-pcie", (uintptr_t)&ls2080_cfg},
@@ -156,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);
 }
 


More information about the dev-commits-src-all mailing list