Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Prepare a little for the addition of an interface...
details: https://anonhg.NetBSD.org/src/rev/68346faf063f
branches: trunk
changeset: 477595:68346faf063f
user: ad <ad%NetBSD.org@localhost>
date: Sat Oct 23 16:26:32 1999 +0000
description:
Prepare a little for the addition of an interface to user-space.
diffstat:
sys/dev/ic/dpt.c | 29 ++++-------------------------
sys/dev/ic/dptvar.h | 21 +++++++++++++++++++--
2 files changed, 23 insertions(+), 27 deletions(-)
diffs (109 lines):
diff -r a74e283dc0c2 -r 68346faf063f sys/dev/ic/dpt.c
--- a/sys/dev/ic/dpt.c Sat Oct 23 14:56:05 1999 +0000
+++ b/sys/dev/ic/dpt.c Sat Oct 23 16:26:32 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dpt.c,v 1.11 1999/10/20 12:27:38 ad Exp $ */
+/* $NetBSD: dpt.c,v 1.12 1999/10/23 16:26:33 ad Exp $ */
/*-
* Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc.
@@ -69,7 +69,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dpt.c,v 1.11 1999/10/20 12:27:38 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dpt.c,v 1.12 1999/10/23 16:26:33 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -126,27 +126,6 @@
NULL, "unknown adapter, please report using send-pr(1)",
};
-void dpt_shutdown __P((void *));
-void dpt_timeout __P((void *));
-void dpt_minphys __P((struct buf *));
-int dpt_scsi_cmd __P((struct scsipi_xfer *));
-int dpt_wait __P((struct dpt_softc *, u_int8_t, u_int8_t, int));
-int dpt_poll __P((struct dpt_softc *, struct dpt_ccb *));
-int dpt_cmd __P((struct dpt_softc *, struct eata_cp *, u_int32_t, int, int));
-void dpt_hba_inquire __P((struct dpt_softc *, struct eata_inquiry_data **));
-
-void dpt_reset_ccb __P((struct dpt_softc *, struct dpt_ccb *));
-void dpt_free_ccb __P((struct dpt_softc *, struct dpt_ccb *));
-void dpt_done_ccb __P((struct dpt_softc *, struct dpt_ccb *));
-int dpt_init_ccb __P((struct dpt_softc *, struct dpt_ccb *));
-int dpt_create_ccbs __P((struct dpt_softc *, struct dpt_ccb *, int));
-
-struct dpt_ccb *dpt_alloc_ccb __P((struct dpt_softc *, int));
-
-#if 0 && defined(DEBUG)
-static void dpt_dump_sp __P((struct eata_sp *));
-#endif
-
/*
* Handle an interrupt from the HBA.
*/
@@ -1084,11 +1063,11 @@
splx(s);
}
-#if 0 && defined(DEBUG)
+#ifdef DEBUG
/*
* Dump the contents of an EATA status packet.
*/
-static void
+void
dpt_dump_sp(sp)
struct eata_sp *sp;
{
diff -r a74e283dc0c2 -r 68346faf063f sys/dev/ic/dptvar.h
--- a/sys/dev/ic/dptvar.h Sat Oct 23 14:56:05 1999 +0000
+++ b/sys/dev/ic/dptvar.h Sat Oct 23 16:26:32 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dptvar.h,v 1.4 1999/10/04 23:57:32 thorpej Exp $ */
+/* $NetBSD: dptvar.h,v 1.5 1999/10/23 16:26:32 ad Exp $ */
/*
* Copyright (c) 1999 Andy Doran <ad%NetBSD.org@localhost>
@@ -37,7 +37,6 @@
#define CCB_ABORT 0x02 /* abort has been issued on this CCB */
#define CCB_INTR 0x04 /* HBA interrupted for this CCB */
#define CCB_PRIVATE 0x08 /* ours; don't talk to scsipi when done */
-#define CCB_SYNC 0x10 /* write data synchronously */
struct dpt_ccb {
struct eata_cp ccb_eata_cp; /* EATA command packet */
@@ -75,6 +74,7 @@
u_int32_t sc_scrpa; /* scratch area physical address */
int sc_hbaid[3]; /* ID of HBA on each channel */
int sc_nccbs; /* number of CCBs available */
+ int sc_open; /* device is open */
TAILQ_HEAD(, dpt_ccb) sc_free_ccb;/* free ccb list */
TAILQ_HEAD(, scsipi_xfer) sc_queue;/* pending commands */
};
@@ -82,6 +82,23 @@
int dpt_intr __P((void *));
int dpt_readcfg __P((struct dpt_softc *));
void dpt_init __P((struct dpt_softc *, const char *));
+void dpt_shutdown __P((void *));
+void dpt_timeout __P((void *));
+void dpt_minphys __P((struct buf *));
+int dpt_scsi_cmd __P((struct scsipi_xfer *));
+int dpt_wait __P((struct dpt_softc *, u_int8_t, u_int8_t, int));
+int dpt_poll __P((struct dpt_softc *, struct dpt_ccb *));
+int dpt_cmd __P((struct dpt_softc *, struct eata_cp *, u_int32_t, int, int));
+void dpt_hba_inquire __P((struct dpt_softc *, struct eata_inquiry_data **));
+void dpt_reset_ccb __P((struct dpt_softc *, struct dpt_ccb *));
+void dpt_free_ccb __P((struct dpt_softc *, struct dpt_ccb *));
+void dpt_done_ccb __P((struct dpt_softc *, struct dpt_ccb *));
+int dpt_init_ccb __P((struct dpt_softc *, struct dpt_ccb *));
+int dpt_create_ccbs __P((struct dpt_softc *, struct dpt_ccb *, int));
+struct dpt_ccb *dpt_alloc_ccb __P((struct dpt_softc *, int));
+#ifdef DEBUG
+void dpt_dump_sp __P((struct eata_sp *));
+#endif
#endif /* _KERNEL */
#endif /* !defined _IC_DPTVAR_H_ */
Home |
Main Index |
Thread Index |
Old Index