summaryrefslogtreecommitdiff
path: root/sys/arch/hp300/dev/ppi.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-14 05:29:32 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-14 05:29:32 +0000
commit86b4fdd623d3c50d7bfd9427c2c9208454cd0da7 (patch)
tree5d95abcaf58d01703a30c7ab600537d3b8f67989 /sys/arch/hp300/dev/ppi.c
parente2cd6c399798843e13e76f49dc8ee048b51f99f1 (diff)
update from netbsd (verbatim)
Diffstat (limited to 'sys/arch/hp300/dev/ppi.c')
-rw-r--r--sys/arch/hp300/dev/ppi.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/sys/arch/hp300/dev/ppi.c b/sys/arch/hp300/dev/ppi.c
index 62a41b89493..d34eb549453 100644
--- a/sys/arch/hp300/dev/ppi.c
+++ b/sys/arch/hp300/dev/ppi.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ppi.c,v 1.6 1994/10/26 07:24:46 cgd Exp $ */
+/* $NetBSD: ppi.c,v 1.7 1995/12/02 18:22:08 thorpej Exp $ */
/*
* Copyright (c) 1982, 1990, 1993
@@ -51,10 +51,10 @@
#include <hp300/dev/device.h>
#include <hp300/dev/ppiioctl.h>
-int ppiattach(), ppistart();
-void ppitimo();
+int ppimatch(), ppistart();
+void ppiattach(), ppitimo();
struct driver ppidriver = {
- ppiattach, "ppi", ppistart,
+ ppimatch, ppiattach, "ppi", ppistart,
};
struct ppi_softc {
@@ -84,7 +84,8 @@ int ppidebug = 0x80;
#define PDB_NOCHECK 0x80
#endif
-ppiattach(hd)
+int
+ppimatch(hd)
register struct hp_device *hd;
{
register struct ppi_softc *sc = &ppi_softc[hd->hp_unit];
@@ -98,14 +99,25 @@ ppiattach(hd)
* a cs80 disk or tape for a ppi device.
*/
if (hpibid(hd->hp_ctlr, hd->hp_slave) & 0x200)
- return(0);
+ return (0);
+
+ sc->sc_hd = hd;
+ return (1);
+}
+
+void
+ppiattach(hd)
+ register struct hp_device *hd;
+{
+ struct ppi_softc *sc = &ppi_softc[hd->hp_unit];
+
+ printf("\n");
+
sc->sc_flags = PPIF_ALIVE;
sc->sc_dq.dq_ctlr = hd->hp_ctlr;
sc->sc_dq.dq_unit = hd->hp_unit;
sc->sc_dq.dq_slave = hd->hp_slave;
sc->sc_dq.dq_driver = &ppidriver;
- sc->sc_hd = hd;
- return(1);
}
ppiopen(dev, flags)