NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/60463: PCI_RESOURCE: ahcisata not detected
The following reply was made to PR kern/60463; it has been noted by GNATS.
From: Thomas Klausner <wiz%netbsd.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: kern/60463: PCI_RESOURCE: ahcisata not detected
Date: Tue, 1 Dec 2026 23:42:26 +0100
--swjno7kcsj36cbcr
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
I didn't notice this commit, since the automatic forwarding via GNATS
didn't work, but it did fix the problem for me.
The only difference between a Nov 26 kernel (no PCI_RESOURCE) and a
Dec 1 kernel (PCI_RESOURCE) is now
MPACPI PCI bus number 11 configuration failed: 6
but the bus scanning works fine and the dmesg diff doesn't show any
effective changes due to that.
Thanks, Jared!
Thomas
--swjno7kcsj36cbcr
Content-Type: message/rfc822
Content-Disposition: inline
Return-Path: <bounces-source-changes-full-owner-wiz=NetBSD.org%NetBSD.org@localhost>
Delivered-To: wiz%gatalith.at@localhost
Received: from gatalith.at
by gatalith.at with LMTP
id 2PdJJ4/epmoiZgAA4iLUCg
(envelope-from <bounces-source-changes-full-owner-wiz=NetBSD.org%NetBSD.org@localhost>)
for <wiz%gatalith.at@localhost>; Sun, 13 Sep 2026 19:34:07 +0200
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
by gatalith.at (Postfix) with ESMTPS id 83BD9390CC6
for <wiz%gatalith.at@localhost>; Sun, 13 Sep 2026 19:34:06 +0200 (CEST)
Received: by mail.netbsd.org (Postfix)
id E3273855FB; Sun, 13 Sep 2026 17:34:03 +0000 (UTC)
Delivered-To: wiz%netbsd.org@localhost
Received: by mail.netbsd.org (Postfix, from userid 605)
id 914E785643; Sun, 13 Sep 2026 17:34:03 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netbsd.org;
s=20240131; t=1789320843;
bh=273f/rnYpqY/ca6rcU10Nk+Bp/TvOvYLfn/IGNmsOw0=;
h=Date:From:Subject:To:List-Id:Reply-To:List-Unsubscribe;
b=qU+CjUYxojVAB3Igc/hB4gsu/O0cfy1AigaE4Q45IzVRVUTqVypbWLTQ0Tv71vgL3
C83XwGf1oh7o49i6eFIsVJTu2g01GAeISqfWHLxnNeS3H/StPtBKgHTpTxf+BqbKpL
19ZyYBFigQGtnSU8EI8wIvsFmjK6Zdu+/7Vgu8Yw=
Delivered-To: source-changes-full%NetBSD.org@localhost
Received: from localhost (localhost [127.0.0.1])
by mail.netbsd.org (Postfix) with ESMTP id 70261855CE
for <source-changes-full%NetBSD.org@localhost>; Sun, 13 Sep 2026 17:34:01 +0000 (UTC)
X-Virus-Scanned: amavisd-new at netbsd.org
Authentication-Results: mail.netbsd.org (amavisd-new);
dkim=pass (1024-bit key) header.d=netbsd.org
Received: from mail.netbsd.org ([IPv6:::1])
by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025)
with ESMTP id ZwH1aPS1-NRG for <source-changes-full%netbsd.org@localhost>;
Sun, 13 Sep 2026 17:34:00 +0000 (UTC)
Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984])
by mail.netbsd.org (Postfix) with ESMTP id 80FF184CFE
for <source-changes-full%NetBSD.org@localhost>; Sun, 13 Sep 2026 17:34:00 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netbsd.org;
s=20240131; t=1789320840;
bh=273f/rnYpqY/ca6rcU10Nk+Bp/TvOvYLfn/IGNmsOw0=;
h=Date:From:Subject:To:Reply-To;
b=Aiz+3m6hXB7RMi1w+7rAvnaat/7AcNNwe4AyssDfksZ4nZj8yexFsNPCzTB0rZbOa
9z0hL3+hb2Ez5pP41K5KuEu3+Kk75zD5ChzMxXpv5BWnt5SHCk5LHeWftbCbxHjm7A
s1BCfK8lMEnZTiIA0iVrifbW4sHJhI1tdFFUQOmI=
Received: by cvs.NetBSD.org (Postfix, from userid 500)
id 78D1DF99A; Sun, 13 Sep 2026 17:34:00 +0000 (UTC)
Content-Transfer-Encoding: 7bit
Content-Type: multipart/mixed; boundary="_----------=_1789320840285100"
MIME-Version: 1.0
Date: Sun, 13 Sep 2026 17:34:00 +0000
From: "Jared D. McNeill" <jmcneill%netbsd.org@localhost>
Subject: CVS commit: src/sys/dev/pci
To: source-changes-full%NetBSD.org@localhost
X-Mailer: log_accum
Message-Id: <20260913173400.78D1DF99A%cvs.NetBSD.org@localhost>
Sender: source-changes-full-owner%NetBSD.org@localhost
List-Id: <source-changes-full.NetBSD.org>
Precedence: bulk
Reply-To: source-changes-d%NetBSD.org@localhost
Mail-Reply-To: "Jared D. McNeill" <jmcneill%netbsd.org@localhost>
Mail-Followup-To: source-changes-d%NetBSD.org@localhost
List-Unsubscribe: <mailto:majordomo%NetBSD.org@localhost?subject=Unsubscribe%20source-changes-full&body=unsubscribe%20source-changes-full>
This is a multi-part message in MIME format.
--_----------=_1789320840285100
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="US-ASCII"
Module Name: src
Committed By: jmcneill
Date: Sun Sep 13 17:34:00 UTC 2026
Modified Files:
src/sys/dev/pci: pci_resource.c
Log Message:
pci_resource: use existing BARs even if mem/io space is left disabled
It's possible that firmware assigned resources to a device and left
memory / io space accesses disabled. Let's assume if we see a non-zero
address in a BAR that it was assigned by firmware.
Should help PR# kern/60427 and kern/60463
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/pci_resource.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
--_----------=_1789320840285100
Content-Disposition: inline
Content-Length: 1205
Content-Transfer-Encoding: binary
Content-Type: text/x-diff; charset=us-ascii
Modified files:
Index: src/sys/dev/pci/pci_resource.c
diff -u src/sys/dev/pci/pci_resource.c:1.7 src/sys/dev/pci/pci_resource.c:1.8
--- src/sys/dev/pci/pci_resource.c:1.7 Mon Mar 3 19:38:43 2025
+++ src/sys/dev/pci/pci_resource.c Sun Sep 13 17:34:00 2026
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_resource.c,v 1.7 2025/03/03 19:38:43 riastradh Exp $ */
+/* $NetBSD: pci_resource.c,v 1.8 2026/09/13 17:34:00 jmcneill Exp $ */
/*-
* Copyright (c) 2022 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_resource.c,v 1.7 2025/03/03 19:38:43 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_resource.c,v 1.8 2026/09/13 17:34:00 jmcneill Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -769,6 +769,15 @@ pci_resource_init_device(struct pci_reso
PCI_BAR(pi->pi_bar), 0);
continue;
}
+ if (pi->pi_base != 0) {
+ /*
+ * Firmware may have programmed the BAR and left
+ * IO / memory space disabled. Assume that a non-zero
+ * BAR means that firmware has already assigned
+ * resources.
+ */
+ enabled |= __BIT(pi->pi_type);
+ }
if ((enabled & __BIT(pi->pi_type)) == 0) {
continue;
}
--_----------=_1789320840285100--
--swjno7kcsj36cbcr--
Home |
Main Index |
Thread Index |
Old Index