Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/arch/macppc/macppc Pullup 1.22 [tsubai, mycroft]:
details: https://anonhg.NetBSD.org/src/rev/774c3af5bafe
branches: netbsd-1-5
changeset: 490078:774c3af5bafe
user: tv <tv%NetBSD.org@localhost>
date: Wed Nov 01 16:25:19 2000 +0000
description:
Pullup 1.22 [tsubai, mycroft]:
Fix a bug that prevents the kernel from detecting the root device.
diffstat:
sys/arch/macppc/macppc/autoconf.c | 41 +++++++++++++++++++++++++-------------
1 files changed, 27 insertions(+), 14 deletions(-)
diffs (99 lines):
diff -r d6978c38e70d -r 774c3af5bafe sys/arch/macppc/macppc/autoconf.c
--- a/sys/arch/macppc/macppc/autoconf.c Wed Nov 01 16:24:36 2000 +0000
+++ b/sys/arch/macppc/macppc/autoconf.c Wed Nov 01 16:25:19 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.21 2000/02/14 12:45:52 tsubai Exp $ */
+/* $NetBSD: autoconf.c,v 1.21.4.1 2000/11/01 16:25:19 tv Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -174,20 +174,32 @@
struct device *dev;
void *aux;
{
- static struct device *parent = NULL;
+ static struct device *parent;
static char *bp = bootpath + 1, *cp = cbootpath;
unsigned long addr;
char *p;
- if (booted_device || dev->dv_parent != parent)
+ if (booted_device)
return;
/* Skip over devices not represented in the OF tree. */
- if (DEVICE_IS(dev, "mainbus") || DEVICE_IS(dev, "scsibus") ||
- DEVICE_IS(dev, "atapibus") || DEVICE_IS(dev, "pci")) {
+ if (DEVICE_IS(dev, "mainbus")) {
parent = dev;
return;
}
+ if (DEVICE_IS(dev, "atapibus") || DEVICE_IS(dev, "pci") ||
+ DEVICE_IS(dev, "scsibus"))
+ return;
+
+ if (DEVICE_IS(dev->dv_parent, "atapibus") ||
+ DEVICE_IS(dev->dv_parent, "pci") ||
+ DEVICE_IS(dev->dv_parent, "scsibus")) {
+ if (dev->dv_parent->dv_parent != parent)
+ return;
+ } else {
+ if (dev->dv_parent != parent)
+ return;
+ }
/* Get the address part of the current path component. The
* last component of the canonical bootpath may have no
@@ -207,34 +219,35 @@
} else
addr = strtoul(p + 1, &p, 16);
- if (DEVICE_IS(dev, "bandit") || DEVICE_IS(dev, "grackle") ||
- DEVICE_IS(dev, "uninorth")) {
+ if (DEVICE_IS(dev->dv_parent, "mainbus")) {
struct confargs *ca = aux;
+ if (strcmp(ca->ca_name, "ofw") == 0) /* XXX */
+ return;
if (addr != ca->ca_reg[0])
return;
- } else if (DEVICE_IS(parent, "pci")) {
+ } else if (DEVICE_IS(dev->dv_parent, "pci")) {
struct pci_attach_args *pa = aux;
if (addr != pa->pa_device)
return;
- } else if (DEVICE_IS(parent, "obio")) {
+ } else if (DEVICE_IS(dev->dv_parent, "obio")) {
struct confargs *ca = aux;
if (addr != ca->ca_reg[0])
return;
- } else if (DEVICE_IS(parent, "scsibus") ||
- DEVICE_IS(parent, "atapibus")) {
+ } else if (DEVICE_IS(dev->dv_parent, "scsibus") ||
+ DEVICE_IS(dev->dv_parent, "atapibus")) {
struct scsipibus_attach_args *sa = aux;
- if (parent->dv_xname[0] == 's') {
+ if (dev->dv_parent->dv_xname[0] == 's') {
if (addr != sa->sa_sc_link->scsipi_scsi.target)
return;
} else {
if (addr != sa->sa_sc_link->scsipi_atapi.drive)
return;
}
- } else if (DEVICE_IS(parent, "pciide")) {
+ } else if (DEVICE_IS(dev->dv_parent, "pciide")) {
struct ata_atapi_attach *aa = aux;
if (addr != aa->aa_channel)
@@ -251,7 +264,7 @@
return;
if (strtoul(p, &p, 16) != aa->aa_drv_data->drive)
return;
- } else if (DEVICE_IS(parent, "wdc")) {
+ } else if (DEVICE_IS(dev->dv_parent, "wdc")) {
struct ata_atapi_attach *aa = aux;
if (addr != aa->aa_channel)
Home |
Main Index |
Thread Index |
Old Index