From nobody Fri Feb 16 00:05:24 2024 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 4TbXJ44HRbz512sw; Fri, 16 Feb 2024 00:05:24 +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 4TbXJ42zNqz4pXP; Fri, 16 Feb 2024 00:05:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708041924; 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=QiwuevaVEmM1/CCV4gOAW1uZwvfc+OKMK/XHdP7A0Aw=; b=Gg8EnH1BVBJKXBlZhyuRFULi1BzcRFd9t1y7lOzzZ4ZZVNZwIstwRNA3xOEC3QgpqK3nBy kcPA3EM1joT90KiuLznkhkwNxxOoE2LQGBcbbonsCW8v6EL0NDPBmvc/5mKlZsN+KpmHzv WWiFIYOJkNp4frXHLBaBfgjpwh78LIHpjvyRwTDbo9m+7oTT1wBa2SXy/STs7s5B1y+tH8 MB2RJFmIuRIAPUsz9z65izVePBP7fX8m7Ob2yNGSS1C2Mn9rjqw012VCKwbypbMhh9fCAD EdKr4FU9uxCs0G8T9IRkUfxZJlTr1NSZ4/HabM2FOR7Q43Bp5l1IcCWhF364WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708041924; 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=QiwuevaVEmM1/CCV4gOAW1uZwvfc+OKMK/XHdP7A0Aw=; b=TkNfctdp/M7Kh06IdwHJJnA6Q4HmkGAIeqlz1lhre5cgVUvTurGjcLGbYz70qky6TaiwAJ ZFSO5alahJixevty73zb9LEF3FmcC96EzcTlafplqUq5lpJEmh0NguETlCss+n6FpmrWNv TiUwZfZKuJRmEFoIMQQpWD8SK3iiwwOl49ny9qi1ZSoOsBWWhKYCv2uf0CYx2bjXwsXAFr JIktiohoosHsypUxHNKjy17xDWhq805OWSFYdyhrbBnMKlGO7eqqQDoQkrHMOWhBrH6LCw Npduie8MqV4PuPxkQpjju1jFm3zPcz6fWENcs724gtY/Om2BoXtH69b40vST1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708041924; a=rsa-sha256; cv=none; b=S2OJCNrBvPjz8P93UGFMC+RgH4cxvsD8zCpL39luGNs93xX47q8L+CpcozZpaS9MTjh+93 jzlY+b1u40D1HLUec9CCnb83RaSXBT8xOpsy34zyMNEnUReIy1+AzRItQ1GUAp9Sw/QA2w PrQwjKcdvyguGJvLtoQp7XGVv3i8poP+YStb37mKcW0kt9LHsDeJBtt5EjYV4W+m797rxa WtOQUJGRhemR7wXvaTKLTfxOISJVAIItzIsdlxXUPQduhAWEic5JYbsCA4wK1mW8wxE83c 8F59qAupUrdzEqMLtEu8QWrflpksJ8d2WibBeZRdrljfCPSgR18+yObYxiycrg== 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 4TbXJ424y2z12rc; Fri, 16 Feb 2024 00:05:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41G05OKt023096; Fri, 16 Feb 2024 00:05:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41G05Ou8023093; Fri, 16 Feb 2024 00:05:24 GMT (envelope-from git) Date: Fri, 16 Feb 2024 00:05:24 GMT Message-Id: <202402160005.41G05Ou8023093@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 992f5b16afa7 - main - 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/main X-Git-Reftype: branch X-Git-Commit: 992f5b16afa73d0ea63c8a886a78ad2eda928e37 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=992f5b16afa73d0ea63c8a886a78ad2eda928e37 commit 992f5b16afa73d0ea63c8a886a78ad2eda928e37 Author: John Baldwin AuthorDate: 2024-02-16 00:05:09 +0000 Commit: John Baldwin CommitDate: 2024-02-16 00:05:09 +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 --- 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; } }