diff options
author | Bartlomiej Grzesik <bag@semihalf.com> | 2021-08-31 04:22:33 +0000 |
---|---|---|
committer | Wojciech Macek <wma@FreeBSD.org> | 2021-08-31 04:22:33 +0000 |
commit | df9c0e88e1e30cb5d1c81c4c2f295f7d153ed02b (patch) | |
tree | 855adcbf58cdcd9f59983b4412abd094cae50b18 | |
parent | 315bca194a14f3b9ec683675bafa8d990d16bfaf (diff) |
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
-rw-r--r-- | sys/arm64/qoriq/qoriq_dw_pci.c | 8 |
1 files changed, 1 insertions, 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); } |