From owner-dev-commits-src-all@freebsd.org Tue Aug 31 04:23:57 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 89E9B663AFA; Tue, 31 Aug 2021 04:23:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzDbK3LYjz4S0d; Tue, 31 Aug 2021 04:23:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5684A2D8D; Tue, 31 Aug 2021 04:23:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17V4NvN6089582; Tue, 31 Aug 2021 04:23:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17V4NvlM089581; Tue, 31 Aug 2021 04:23:57 GMT (envelope-from git) Date: Tue, 31 Aug 2021 04:23:57 GMT Message-Id: <202108310423.17V4NvlM089581@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wojciech Macek Subject: git: df9c0e88e1e3 - main - qoriq_dw_pci: Fix typo in link status checking code MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wma X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: df9c0e88e1e30cb5d1c81c4c2f295f7d153ed02b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 04:23:57 -0000 The branch main has been updated by wma: URL: https://cgit.FreeBSD.org/src/commit/?id=df9c0e88e1e30cb5d1c81c4c2f295f7d153ed02b commit df9c0e88e1e30cb5d1c81c4c2f295f7d153ed02b Author: Bartlomiej Grzesik AuthorDate: 2021-08-31 04:22:33 +0000 Commit: Wojciech Macek 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); }