From nobody Fri Oct 10 21:05:15 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 4cjzlw2xXVz6C095; Fri, 10 Oct 2025 21:05:16 +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 4cjzlw19CPz3DNk; Fri, 10 Oct 2025 21:05:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760130316; 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=G5fopW8o6qY4L/adkZOFcT1wmMMiFyCm5hbfivOks5c=; b=IuMpLhf4DGyB4rkJU88TNGtyu8e6HvJczNlt0csoTgaL3dur+DMFzlCvjRAdkdOUGHCtWN BdUULhNfDR/sGmEgQSZyHEl2qVqDhy/mnQobh45d3KspFfxFVQ0YsP3/gSgA7e9fIHB2DL IqlIei9urTG/O3tcWHlw5f6Va8PrrzAZbqAhHdK1iqwhdwx+jK6t9VprEXGxfVlDipFTjk 23N3UsdINVFoA7j7e093NLm4ek+cPfTSVZgGKNE9nE2bCkvpviPOd4ld+ro2JHovIP9El3 WZ8xhhUMJqDy3alti27mWyaBVMINHicBlfkibBRrx/6mGpI+23Ikp7g63o2IGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760130316; 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=G5fopW8o6qY4L/adkZOFcT1wmMMiFyCm5hbfivOks5c=; b=BSoFoetRcuDEiFau4Pk31yO8BduYKykLSE7ogIugvSHQMgNVmVtVQD7DJgcSd20DFpPGvz IxLm7tqVcwm8KRUvU2sZwBy1/UACqymYwbBv1jiBq7kZr6S7UIC3TyZNw2Il6zJJC+zBSW 02wfeMrzZRuzoMENuwKs4ej12XJBAyihnq2nUjVZ/dc1uqd9yGbLJzYihyrv2+6DWIi3lt hVajOPkcAFyh7cCiqRui6I5gcXwd15Qg5/Y90qYR78oIq0MUlQBTOf325H2Mugy5xlg9NG MpsEgB+WxA9GJfZT5OKLYusi2qexyPSo3TX1fIXvBCDsUN4Huuaj0oK0++2TGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760130316; a=rsa-sha256; cv=none; b=wO01sW6u/PDdOcWOtnhHbthcf9q8P0CCpn0VdrIK9JwwJXZITv6WyKrWz1BrJi+KSVxpyD mEtSfrtmVLR4j75ep/ss/fP80wBAfqQfhtBlmb3BNU7oZIstMizspu9Q6gX7TMY4frj6/a 3/PHAEiCo9U8lR+L9SwN4OtauVNbj1cKvVvICVLxwwDL/cAkINb+522R4QFyM39PpdYpzy i5Mr951e7gH9iRYFWNgBxOGp4sh79S1dEP4isKG1U87YL8/oyPwvIgcC4xV4QBWmPUku30 NyExgRnhdQ1jDq7Zwk2vaoI/mzTsP76LRvbeF9RrfHhJaZMw6h+hcLg2NKV5ng== 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 4cjzlw0khKz1Jf5; Fri, 10 Oct 2025 21:05:16 +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 59AL5Gw9043601; Fri, 10 Oct 2025 21:05:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59AL5FwS043598; Fri, 10 Oct 2025 21:05:15 GMT (envelope-from git) Date: Fri, 10 Oct 2025 21:05:15 GMT Message-Id: <202510102105.59AL5FwS043598@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: 07f4fa7a0db9 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 07f4fa7a0db931c47cc78c711e05d5d51a4e2448 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=07f4fa7a0db931c47cc78c711e05d5d51a4e2448 commit 07f4fa7a0db931c47cc78c711e05d5d51a4e2448 Author: John Baldwin AuthorDate: 2025-10-06 17:56:47 +0000 Commit: John Baldwin CommitDate: 2025-10-10 21:04:35 +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 a460ed32b103..3de1f6a79ef5 100644 --- a/sys/dev/ahci/ahci_pci.c +++ b/sys/dev/ahci/ahci_pci.c @@ -573,8 +573,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; } } @@ -589,12 +589,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) {