Add proper boot/autoconf support for SDN devices. Take from Hugh Graham;

see http://mail-index.netbsd.org/port-vax/2002/06/28/0005.html
This commit is contained in:
matt 2004-01-06 17:01:48 +00:00
parent e5aceb8c63
commit ecdec9d579
3 changed files with 11 additions and 9 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: conf.c,v 1.10 2000/06/15 19:53:23 ragge Exp $ */
/* $NetBSD: conf.c,v 1.11 2004/01/06 17:01:48 matt Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
* All rights reserved.
@ -58,6 +58,7 @@ struct devsw devsw[]={
SADEV("rom",romstrategy, romopen, nullsys, noioctl),
SADEV("rd",mfmstrategy, mfmopen, nullsys, noioctl),
SADEV("sd",romstrategy, romopen, nullsys, noioctl),
SADEV("sd",romstrategy, romopen, nullsys, noioctl),
SADEV("st",nullsys, nullsys, nullsys, noioctl),
SADEV("le",nostrategy, leopen, leclose, noioctl), /* LANCE */
SADEV("ze",nostrategy, zeopen, zeclose, noioctl), /* SGEC */
@ -75,6 +76,7 @@ int cnvtab[] = {
-1,
BDEV_RD,
BDEV_SD,
BDEV_SDN,
BDEV_ST,
BDEV_LE,
BDEV_ZE,

View File

@ -1,4 +1,4 @@
/* $NetBSD: bootxx.c,v 1.17 2003/08/07 16:30:06 agc Exp $ */
/* $NetBSD: bootxx.c,v 1.18 2004/01/06 17:01:48 matt Exp $ */
/*-
* Copyright (c) 1982, 1986 The Regents of the University of California.
* All rights reserved.
@ -112,8 +112,6 @@ Xmain()
*/
bcopy ((void *)bootregs[11], rpb, sizeof(struct rpb));
bcopy ((void*)rpb->iovec, bqo, rpb->iovecsz);
if (rpb->devtyp == BDEV_SDN)
rpb->devtyp = BDEV_SD; /* XXX until driver fixed */
} else {
bzero(rpb, sizeof(struct rpb));
rpb->devtyp = bootregs[0];

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.79 2003/08/29 13:52:45 ragge Exp $ */
/* $NetBSD: autoconf.c,v 1.80 2004/01/06 17:01:48 matt Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.79 2003/08/29 13:52:45 ragge Exp $");
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.80 2004/01/06 17:01:48 matt Exp $");
#include "opt_compat_netbsd.h"
@ -345,7 +345,8 @@ booted_sd(struct device *dev, void *aux)
struct device *ppdev;
/* Is this a SCSI device? */
if (jmfr("sd", dev, BDEV_SD) && jmfr("cd", dev, BDEV_SD))
if (jmfr("sd", dev, BDEV_SD) && jmfr("sd", dev, BDEV_SDN) &&
jmfr("cd", dev, BDEV_SD) && jmfr("cd", dev, BDEV_SDN))
return 0;
if (sa->sa_periph->periph_channel->chan_bustype->bustype_type !=
@ -359,8 +360,9 @@ booted_sd(struct device *dev, void *aux)
ppdev = dev->dv_parent->dv_parent;
/* VS3100 NCR 53C80 (si) & VS4000 NCR 53C94 (asc) */
if (((jmfr("si", ppdev, BDEV_SD) == 0) || /* new name */
(jmfr("asc", ppdev, BDEV_SD) == 0)) &&
if ((jmfr("si", ppdev, BDEV_SD) == 0 || /* new name */
jmfr("asc", ppdev, BDEV_SD) == 0 ||
jmfr("asc", ppdev, BDEV_SDN) == 0) &&
(ppdev->dv_cfdata->cf_loc[0] == rpb.csrphy))
return 1;