Adapt for wdcattach() prototype change, and deal with atabus in
device_register().
This commit is contained in:
parent
e1e231a488
commit
ce0aaad119
|
@ -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 <sys/cdefs.h>
|
||||
__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 <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -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
|
||||
|
|
|
@ -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 <sys/cdefs.h>
|
||||
__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 <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -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 */
|
||||
|
|
|
@ -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 <sys/cdefs.h>
|
||||
__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 <sys/param.h>
|
||||
#include <sys/conf.h>
|
||||
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue