From ce0aaad1199616c727d2a29d2adfe84d958b6094 Mon Sep 17 00:00:00 2001 From: bouyer Date: Wed, 8 Oct 2003 11:12:36 +0000 Subject: [PATCH] Adapt for wdcattach() prototype change, and deal with atabus in device_register(). --- sys/arch/macppc/dev/kauai.c | 6 +++--- sys/arch/macppc/dev/wdc_obio.c | 6 +++--- sys/arch/macppc/macppc/autoconf.c | 11 ++++++----- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/sys/arch/macppc/dev/kauai.c b/sys/arch/macppc/dev/kauai.c index 0718d20ecde3..f8e83a33ed97 100644 --- a/sys/arch/macppc/dev/kauai.c +++ b/sys/arch/macppc/dev/kauai.c @@ -1,4 +1,4 @@ -/* $NetBSD: kauai.c,v 1.5 2003/09/25 19:29:49 mycroft Exp $ */ +/* $NetBSD: kauai.c,v 1.6 2003/10/08 11:12:36 bouyer Exp $ */ /*- * Copyright (c) 2003 Tsubai Masanari. All rights reserved. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kauai.c,v 1.5 2003/09/25 19:29:49 mycroft Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kauai.c,v 1.6 2003/10/08 11:12:36 bouyer Exp $"); #include #include @@ -180,7 +180,7 @@ kauai_attach(parent, self, aux) chp->wdc = &sc->sc_wdcdev; chp->ch_queue = &sc->wdc_queue; - wdcattach(&sc->sc_wdcdev); + wdcattach(chp); } void diff --git a/sys/arch/macppc/dev/wdc_obio.c b/sys/arch/macppc/dev/wdc_obio.c index 74976c15abfe..a79d1c9f9d7c 100644 --- a/sys/arch/macppc/dev/wdc_obio.c +++ b/sys/arch/macppc/dev/wdc_obio.c @@ -1,4 +1,4 @@ -/* $NetBSD: wdc_obio.c,v 1.28 2003/09/25 19:29:49 mycroft Exp $ */ +/* $NetBSD: wdc_obio.c,v 1.29 2003/10/08 11:12:36 bouyer Exp $ */ /*- * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wdc_obio.c,v 1.28 2003/09/25 19:29:49 mycroft Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wdc_obio.c,v 1.29 2003/10/08 11:12:36 bouyer Exp $"); #include #include @@ -224,7 +224,7 @@ wdc_obio_attach(parent, self, aux) out32rb(OHARE_FEATURE_REG, x); } - wdcattach(&sc->sc_wdcdev); + wdcattach(chp); } /* Multiword DMA transfer timings */ diff --git a/sys/arch/macppc/macppc/autoconf.c b/sys/arch/macppc/macppc/autoconf.c index fb1a7a670e2a..6fd3e1743a2b 100644 --- a/sys/arch/macppc/macppc/autoconf.c +++ b/sys/arch/macppc/macppc/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.38 2003/07/15 02:43:31 lukem Exp $ */ +/* $NetBSD: autoconf.c,v 1.39 2003/10/08 11:12:36 bouyer Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.38 2003/07/15 02:43:31 lukem Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.39 2003/10/08 11:12:36 bouyer Exp $"); #include #include @@ -234,10 +234,11 @@ device_register(dev, aux) return; } if (DEVICE_IS(dev, "atapibus") || DEVICE_IS(dev, "pci") || - DEVICE_IS(dev, "scsibus")) + DEVICE_IS(dev, "scsibus") || DEVICE_IS(dev, "atabus")) return; if (DEVICE_IS(dev->dv_parent, "atapibus") || + DEVICE_IS(dev->dv_parent, "atabus") || DEVICE_IS(dev->dv_parent, "pci") || DEVICE_IS(dev->dv_parent, "scsibus")) { if (dev->dv_parent->dv_parent != parent) @@ -289,7 +290,7 @@ device_register(dev, aux) /* periph_target is target for scsi, drive # for atapi */ if (addr != sa->sa_periph->periph_target) return; - } else if (DEVICE_IS(dev->dv_parent, "pciide")) { + } else if (DEVICE_IS(dev->dv_parent->dv_parent, "pciide")) { struct ata_device *adev = aux; if (addr != adev->adev_drv_data->drive) @@ -306,7 +307,7 @@ device_register(dev, aux) return; if (strtoul(p, &p, 16) != adev->adev_drv_data->drive) return; - } else if (DEVICE_IS(dev->dv_parent, "wdc")) { + } else if (DEVICE_IS(dev->dv_parent->dv_parent, "wdc")) { struct ata_device *adev = aux; if (addr != adev->adev_drv_data->drive)