From nobody Fri Oct 10 21:05:06 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 4cjzlk63WLz6BywH; Fri, 10 Oct 2025 21:05:06 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cjzlk1zR6z3Cr3; Fri, 10 Oct 2025 21:05:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760130306; 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=FS/cR63ib1uwG3LtQnSImhSo0KN7lYXW+thGsDOjZRk=; b=pcrstZaY+OUPCrvIYp3IFn92U9omb+VS7f0zoq0moXh15I0xizRx6gYOImK1zcdnZ3jP11 xj4wQws9WlfGo53guw9yWWvjxbEvkz2eDd5iA845qdNMj5U6/4BKC98b1eYFD25mKf7J3h xrTfrjpRfYza32BOdV5O3JY4EgSbRyR7Ff5sO1YtUiGJtao0YYeFkAh/xk3k/05qWvQRwR vtyQYM9ug6gh6K0eWOhBojXEWx4v1/iBC0hJjfUkZxp5sP6gKw2txwD+KlHFPz0FVm30as kA7cZRbaMi+pdu+LyANfQeemgTQS46keJWZeZxdZL16wuOJnVSTVskI2yq5cvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760130306; 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=FS/cR63ib1uwG3LtQnSImhSo0KN7lYXW+thGsDOjZRk=; b=qZVqypV3YlgmPDrG87FADTd5tdDOlJYzT6/GUfpG9se+9jl5x6iWaK0zwxqJ0L3l9HuGcJ c1C17kG8UK8hfydD1kZlPCNkp+3/uniRu+k7UqoVS3TQjGD2gyPx49WJjjxMGOUkeG7uJN 8vdpYvn4jiZCgzBKBIk+uzSMTckT1oWF289Cfb3sPXIZRHgF/3SGpTAz6Zo82lWAMFeBLJ q7jy3DCvE8BJrDVSSYgbhdY1vDMIuS+0gtrrMf+TcY44Xt0G0kcwgSg4tZ1fye7C1U410E p7yiLEvqMNf6kFFQyc/lWkwcqNeabSo21AGKVaFwdIFm/J9YRg3QEUcwu90UJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760130306; a=rsa-sha256; cv=none; b=MnK8JHmodQtWQQfV8vHuJ8j18YQuFrJ4Lq4+DxTEathfQ9Sl7CYABZK/1eoVn5n++ve+uJ l+wS6gyKJcxQpVZ7rktN2+UnLaswd93eLA0DP/lJsh7JePg0VkhAeMzjtlCOiLnf6KuT4H 3SwYm+vii8m658+rNNdrSDgrijG3zCgyj/Jw7P6B59uTtj1bgaTG/7senqwnYCKEEXvtH6 S1O+PtBALMNPJ1d85sEVQIU/Dn6DlUj4qJcMqeRneGZQE0IVEEP7HCPQuN8fOOkOOeIAp/ 5+VK84Vcnk1z8BScaGCVB7G8BZx/0AxToeLY58lTi7s/rox9ba1F+JUIygEWHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4cjzlk1TgLz1Jf3; Fri, 10 Oct 2025 21:05:06 +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 59AL569W043340; Fri, 10 Oct 2025 21:05:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59AL56K1043337; Fri, 10 Oct 2025 21:05:06 GMT (envelope-from git) Date: Fri, 10 Oct 2025 21:05:06 GMT Message-Id: <202510102105.59AL56K1043337@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: fb939e88ba19 - stable/15 - ahci: Don't fail attach if the MSI-X BARs cannot be allocated 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/15 X-Git-Reftype: branch X-Git-Commit: fb939e88ba192fc75ebcbc863bcf1523e65a756b Auto-Submitted: auto-generated The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=fb939e88ba192fc75ebcbc863bcf1523e65a756b commit fb939e88ba192fc75ebcbc863bcf1523e65a756b Author: John Baldwin AuthorDate: 2025-10-06 17:56:47 +0000 Commit: John Baldwin CommitDate: 2025-10-10 21:04:31 +0000 ahci: Don't fail attach if the MSI-X BARs cannot be allocated If the MSI-X table and/or PBA live in separate BAR(s) and those BAR(s) cannot be allocated, fall back to using MSI or INTx instead of failing attach. PR: 289748 Reported by: Vitalij Satanivskij Reviewed by: avg, imp Differential Revision: https://reviews.freebsd.org/D52889 (cherry picked from commit b658158e9396848d3963e9555d356d0f4ca6900a) --- sys/dev/ahci/ahci_pci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/ahci/ahci_pci.c b/sys/dev/ahci/ahci_pci.c index 78de098efbb8..9e7cfd4a9a33 100644 --- a/sys/dev/ahci/ahci_pci.c +++ b/sys/dev/ahci/ahci_pci.c @@ -575,8 +575,8 @@ ahci_pci_attach(device_t dev) ctlr->r_msix_table = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &ctlr->r_msix_tab_rid, RF_ACTIVE); if (ctlr->r_msix_table == NULL) { - ahci_free_mem(dev); - return (ENXIO); + msix_count = 0; + goto no_msix; } } @@ -591,12 +591,12 @@ ahci_pci_attach(device_t dev) ctlr->r_msix_pba = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &ctlr->r_msix_pba_rid, RF_ACTIVE); if (ctlr->r_msix_pba == NULL) { - ahci_free_mem(dev); - return (ENXIO); + msix_count = 0; } } } +no_msix: pci_enable_busmaster(dev); /* Reset controller */ if ((error = ahci_pci_ctlr_reset(dev)) != 0) {