Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Fix number of port for Hudson rev. 0x1f and newe...
details: https://anonhg.NetBSD.org/src/rev/594b7aab03c5
branches: trunk
changeset: 466517:594b7aab03c5
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Mon Dec 23 23:31:23 2019 +0000
description:
Fix number of port for Hudson rev. 0x1f and newer. Same as OpenBSD and Linux.
diffstat:
sys/dev/pci/piixpm.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diffs (40 lines):
diff -r 84439947f6a9 -r 594b7aab03c5 sys/dev/pci/piixpm.c
--- a/sys/dev/pci/piixpm.c Mon Dec 23 23:31:18 2019 +0000
+++ b/sys/dev/pci/piixpm.c Mon Dec 23 23:31:23 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: piixpm.c,v 1.56 2019/12/23 15:41:34 thorpej Exp $ */
+/* $NetBSD: piixpm.c,v 1.57 2019/12/23 23:31:23 msaitoh Exp $ */
/* $OpenBSD: piixpm.c,v 1.39 2013/10/01 20:06:02 sf Exp $ */
/*
@@ -22,7 +22,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: piixpm.c,v 1.56 2019/12/23 15:41:34 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: piixpm.c,v 1.57 2019/12/23 23:31:23 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -230,8 +230,6 @@
/* SB800 rev 0x40+, AMD HUDSON and newer need special initialization */
if (PIIXPM_IS_FCHGRP(sc) || PIIXPM_IS_SB800GRP(sc)) {
if (piixpm_sb800_init(sc) == 0) {
- sc->sc_numbusses = 4;
-
/* Read configuration */
conf = pci_conf_read(pa->pa_pc, pa->pa_tag,
SB800_SMB_HOSTC);
@@ -399,6 +397,12 @@
uint16_t val, base_addr;
bool enabled;
+ if (PIIXPM_IS_KERNCZ(sc) ||
+ (PIIXPM_IS_HUDSON(sc) && (sc->sc_rev >= 0x1f)))
+ sc->sc_numbusses = 2;
+ else
+ sc->sc_numbusses = 4;
+
/* Fetch SMB base address */
if (bus_space_map(iot,
SB800_INDIRECTIO_BASE, SB800_INDIRECTIO_SIZE, 0, &ioh)) {
Home |
Main Index |
Thread Index |
Old Index