From nobody Thu Feb 27 14:17:00 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Z3YLh4cSbz5qFrP; Thu, 27 Feb 2025 14:17:00 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Z3YLh40wPz3xPJ; Thu, 27 Feb 2025 14:17:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1740665820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/kv/rreLgajWkXqvR25Ui+NGxtXosQ7u3Fr6f9HcRps=; b=Fku0anIY+xGzYp4jOY+ASTloVAJ+nzRBJ+1owjLFonO85eXBwqx4K4kbVYUtme+/sheG1i lpt9hFO8SSzyic7FX1ATyda0r67wt2VYs2iX9sSEHs+TpPSQ5jkvF7/AuqZ35/DxrqkX8w lb9NDjPAlWuHNREIxqDqoo1yrq7eh83IISNn9U4T11f9N0LC4jz7RLFFuY8ldvESW9k7VX A3r2YeH3aBwZFIwDS22ZxzZ0E1sJ22ooeFZSTUYDkXgFYRdnglowdKVv9tuEjbfUco2yCW eLyRN1mv4PPCcWyC/UtJlkaQrkev4XkMhwvifL7F0wCMYJ80XrdtqhT2A8xvog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1740665820; a=rsa-sha256; cv=none; b=jte6D/SeImr+UkIEqSCO8FsOxvOO7X0BvfeIEWbzLtvbcJrbqLEGL+09bWWzoiRw2Ia8bN D4dqWYyTQ1D2ITfooNMN/t1MIcEbqDfeGiHK1oh+aMmEqYnhJA8IV0nJByprzGb44I2ndt Ng7P52szITYTCh/TrjuIrBJjtiVY+mT1o3g4apJx5Auuk4TRDoB0XzSA9UVet5P0VTKdSa 44E59eLkZhelWN4wGk2gqft/k/aHyorauhbUb3nvCT0oTtDGWCi/vRHpwSVVkYJucda06h 0Yb4xeCdlQ1PHlObsBQUsN8i3rFUT/EDdJ+o0/5RIpVOT0KW6Wjvh+fpoJgy+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1740665820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/kv/rreLgajWkXqvR25Ui+NGxtXosQ7u3Fr6f9HcRps=; b=hGbJUER+qIDdBU5D2uH40KjcXjbJ5rOf/5loMdHXc1hZxIB7lCYu1DxSyDwmIVdP49I7l5 t53nWRgisQ1ucBjRMXGtpS2qdrGx0UISmqiMv51LLAHSO9UgyuMWBzzEuOHBWCSNfGH88n 5m7Or0XVcFObwQuagKouc6EJKZUFE1eAlg+yS20p1T3uBWvTlyyCwnnz5ri45T1+AggKC+ BV/LerRrxdmfaP6mMrkTko4sOJb2DHkznDZo1McSbiLqM2v4k4v1dc7zUC6jHGbQuNwtb/ n9HW4zIGwPy/JrI1aofDMOAD1u+ObLflKxbEv68wPP/zCYKlxzt9Q+Q5NFt3xw== 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 4Z3YLh3cXvzmZS; Thu, 27 Feb 2025 14:17:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 51REH020016567; Thu, 27 Feb 2025 14:17:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 51REH02i016564; Thu, 27 Feb 2025 14:17:00 GMT (envelope-from git) Date: Thu, 27 Feb 2025 14:17:00 GMT Message-Id: <202502271417.51REH02i016564@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: c8e37e38080d - stable/14 - pci_host_generic: Set a valid error if allocating a range resource fails List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c8e37e38080dac3287578ab05d4d8e28046a2493 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c8e37e38080dac3287578ab05d4d8e28046a2493 commit c8e37e38080dac3287578ab05d4d8e28046a2493 Author: John Baldwin AuthorDate: 2024-02-16 00:05:09 +0000 Commit: John Baldwin CommitDate: 2025-02-27 13:09:21 +0000 pci_host_generic: Set a valid error if allocating a range resource fails Previously pci_host_generic_attach was returning 0 (success) incorrectly if allocating a range failed. The error value was 0 from the previously successful call to bus_set_resource in this case. Fixes: d79b6b8ec267 pci_host_generic: Don't rewrite resource start address for translation (cherry picked from commit 992f5b16afa73d0ea63c8a886a78ad2eda928e37) --- sys/dev/pci/pci_host_generic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/pci/pci_host_generic.c b/sys/dev/pci/pci_host_generic.c index 45a478634d20..ca384d9a1483 100644 --- a/sys/dev/pci/pci_host_generic.c +++ b/sys/dev/pci/pci_host_generic.c @@ -216,6 +216,7 @@ pci_host_generic_core_attach(device_t dev) if (sc->ranges[tuple].res == NULL) { device_printf(dev, "failed to allocate resource for range %d\n", tuple); + error = ENXIO; goto err_rman_manage; } }