Add a sick little hack to glue old-config-pmax-scsi-stuff into the
alldevs list. This is required for the new machine-independent setroot().
This commit is contained in:
parent
1b341f7e70
commit
08dafb1339
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: device.h,v 1.11 1996/10/01 01:04:50 jonathan Exp $ */
|
/* $NetBSD: device.h,v 1.12 1997/01/31 02:00:56 thorpej Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1992, 1993
|
* Copyright (c) 1992, 1993
|
||||||
|
@ -45,6 +45,7 @@
|
||||||
* different types of controllers.
|
* different types of controllers.
|
||||||
*/
|
*/
|
||||||
struct ScsiCmd;
|
struct ScsiCmd;
|
||||||
|
struct device;
|
||||||
|
|
||||||
struct pmax_driver {
|
struct pmax_driver {
|
||||||
char *d_name; /* device driver name (e.g., "rz") */
|
char *d_name; /* device driver name (e.g., "rz") */
|
||||||
|
@ -88,6 +89,7 @@ struct pmax_scsi_device {
|
||||||
int sd_flags; /* flags */
|
int sd_flags; /* flags */
|
||||||
|
|
||||||
int sd_alive; /* true if init routine succeeded */
|
int sd_alive; /* true if init routine succeeded */
|
||||||
|
struct device *sd_devp; /* new config glue kludge */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Define special unit types used by the config program */
|
/* Define special unit types used by the config program */
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: rz.c,v 1.21 1997/01/15 00:52:17 jonathan Exp $ */
|
/* $NetBSD: rz.c,v 1.22 1997/01/31 02:00:58 thorpej Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1992, 1993
|
* Copyright (c) 1992, 1993
|
||||||
|
@ -59,6 +59,7 @@
|
||||||
#include <sys/uio.h>
|
#include <sys/uio.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/syslog.h>
|
#include <sys/syslog.h>
|
||||||
|
#include <sys/device.h>
|
||||||
|
|
||||||
#include <ufs/ffs/fs.h>
|
#include <ufs/ffs/fs.h>
|
||||||
|
|
||||||
|
@ -144,6 +145,7 @@ struct rzstats {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct rz_softc {
|
struct rz_softc {
|
||||||
|
struct device sc_dev; /* new config glue */
|
||||||
struct pmax_scsi_device *sc_sd; /* physical unit info */
|
struct pmax_scsi_device *sc_sd; /* physical unit info */
|
||||||
pid_t sc_format_pid; /* process using "format" mode */
|
pid_t sc_format_pid; /* process using "format" mode */
|
||||||
short sc_flags; /* see below */
|
short sc_flags; /* see below */
|
||||||
|
@ -156,7 +158,6 @@ struct rz_softc {
|
||||||
#define sc_bopenpart sc_dkdev.dk_bopenmask /* XXX compat */
|
#define sc_bopenpart sc_dkdev.dk_bopenmask /* XXX compat */
|
||||||
#define sc_copenpart sc_dkdev.dk_copenmask /* XXX compat */
|
#define sc_copenpart sc_dkdev.dk_copenmask /* XXX compat */
|
||||||
#define sc_bshift sc_dkdev.dk_blkshift /* XXX compat */
|
#define sc_bshift sc_dkdev.dk_blkshift /* XXX compat */
|
||||||
char sc_xname[8]; /* XXX external name */
|
|
||||||
struct rzstats sc_stats; /* statisic counts */
|
struct rzstats sc_stats; /* statisic counts */
|
||||||
struct buf sc_tab; /* queue of pending operations */
|
struct buf sc_tab; /* queue of pending operations */
|
||||||
struct buf sc_buf; /* buf for doing I/O */
|
struct buf sc_buf; /* buf for doing I/O */
|
||||||
|
@ -356,12 +357,14 @@ rzprobe(xxxsd)
|
||||||
sc->sc_rwcmd.unitNumber = sd->sd_slave;
|
sc->sc_rwcmd.unitNumber = sd->sd_slave;
|
||||||
|
|
||||||
/* XXX set up the external name */
|
/* XXX set up the external name */
|
||||||
bzero(sc->sc_xname, sizeof(sc->sc_xname)); /* XXX */
|
bzero(&sc->sc_dev, sizeof(sc->sc_dev)); /* XXX */
|
||||||
sprintf(sc->sc_xname, "rz%d", sd->sd_unit); /* XXX */
|
sprintf(sc->sc_dev.dv_xname, "rz%d", sd->sd_unit); /* XXX */
|
||||||
|
sc->sc_dev.dv_unit = sd->sd_unit; /* XXX */
|
||||||
|
sc->sc_dev.dv_class = DV_DISK; /* XXX */
|
||||||
|
|
||||||
/* Initialize the disk structure. */
|
/* Initialize the disk structure. */
|
||||||
bzero(&sc->sc_dkdev, sizeof(sc->sc_dkdev));
|
bzero(&sc->sc_dkdev, sizeof(sc->sc_dkdev));
|
||||||
sc->sc_dkdev.dk_name = sc->sc_xname;
|
sc->sc_dkdev.dk_name = sc->sc_dev.dv_xname;
|
||||||
|
|
||||||
/* try to find out what type of device this is */
|
/* try to find out what type of device this is */
|
||||||
sc->sc_format_pid = 1; /* force use of sc_cdb */
|
sc->sc_format_pid = 1; /* force use of sc_cdb */
|
||||||
|
@ -445,6 +448,10 @@ rzprobe(xxxsd)
|
||||||
if (inqbuf.rmb)
|
if (inqbuf.rmb)
|
||||||
sc->sc_flags |= RZF_REMOVEABLE;
|
sc->sc_flags |= RZF_REMOVEABLE;
|
||||||
sc->sc_buf.b_flags = 0;
|
sc->sc_buf.b_flags = 0;
|
||||||
|
|
||||||
|
sd->sd_devp = &sc->sc_dev; /* XXX */
|
||||||
|
TAILQ_INSERT_TAIL(&alldevs, &sc->sc_dev, dv_list); /* XXX */
|
||||||
|
|
||||||
return (1);
|
return (1);
|
||||||
|
|
||||||
bad:
|
bad:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: tz.c,v 1.14 1996/10/13 12:34:20 jonathan Exp $ */
|
/* $NetBSD: tz.c,v 1.15 1997/01/31 02:00:59 thorpej Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1992, 1993
|
* Copyright (c) 1992, 1993
|
||||||
|
@ -57,6 +57,7 @@
|
||||||
#include <sys/proc.h>
|
#include <sys/proc.h>
|
||||||
#include <sys/syslog.h>
|
#include <sys/syslog.h>
|
||||||
#include <sys/tprintf.h>
|
#include <sys/tprintf.h>
|
||||||
|
#include <sys/device.h>
|
||||||
|
|
||||||
#include <sys/conf.h>
|
#include <sys/conf.h>
|
||||||
#include <machine/conf.h>
|
#include <machine/conf.h>
|
||||||
|
@ -77,6 +78,7 @@ struct pmax_driver tzdriver = {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct tz_softc {
|
struct tz_softc {
|
||||||
|
struct device sc_dev; /* new config glue */
|
||||||
struct pmax_scsi_device *sc_sd; /* physical unit info */
|
struct pmax_scsi_device *sc_sd; /* physical unit info */
|
||||||
int sc_flags; /* see below */
|
int sc_flags; /* see below */
|
||||||
int sc_tapeid; /* tape drive id */
|
int sc_tapeid; /* tape drive id */
|
||||||
|
@ -140,6 +142,12 @@ tzprobe(xxxsd)
|
||||||
sc->sc_cmd.flags = 0;
|
sc->sc_cmd.flags = 0;
|
||||||
sc->sc_rwcmd.unitNumber = sd->sd_slave;
|
sc->sc_rwcmd.unitNumber = sd->sd_slave;
|
||||||
|
|
||||||
|
/* XXX set up device info */ /* XXX */
|
||||||
|
bzero(&sc->sc_dev, sizeof(sc->sc_dev)); /* XXX */
|
||||||
|
sprintf(sc->sc_dev.dv_xname, "tz%d", sd->sd_unit); /* XXX */
|
||||||
|
sc->sc_dev.dv_unit = sd->sd_unit; /* XXX */
|
||||||
|
sc->sc_dev.dv_class = DV_TAPE; /* XXX */
|
||||||
|
|
||||||
/* try to find out what type of device this is */
|
/* try to find out what type of device this is */
|
||||||
sc->sc_flags = TZF_ALTCMD; /* force use of sc_cdb */
|
sc->sc_flags = TZF_ALTCMD; /* force use of sc_cdb */
|
||||||
sc->sc_cdb.len = sizeof(ScsiGroup0Cmd);
|
sc->sc_cdb.len = sizeof(ScsiGroup0Cmd);
|
||||||
|
@ -232,6 +240,10 @@ tzprobe(xxxsd)
|
||||||
sc->sc_tapeid = 0;
|
sc->sc_tapeid = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sd->sd_devp = &sc->sc_dev; /* XXX */
|
||||||
|
TAILQ_INSERT_TAIL(&alldevs, &sc->sc_dev, dv_list); /* XXX */
|
||||||
|
|
||||||
return (1);
|
return (1);
|
||||||
|
|
||||||
bad:
|
bad:
|
||||||
|
|
Loading…
Reference in New Issue