From 7064961321d6e05bcece48f1830639ca0b0a1376 Mon Sep 17 00:00:00 2001 From: ad Date: Tue, 28 Sep 1999 23:35:29 +0000 Subject: [PATCH] - Add some profiling gunk. - Add CCB_SYNC for CCBs where data must be written synchronously by the HBA. --- sys/dev/ic/dptvar.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/sys/dev/ic/dptvar.h b/sys/dev/ic/dptvar.h index edf461a6d0d0..27fd377f8a28 100644 --- a/sys/dev/ic/dptvar.h +++ b/sys/dev/ic/dptvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: dptvar.h,v 1.1 1999/09/27 23:41:47 ad Exp $ */ +/* $NetBSD: dptvar.h,v 1.2 1999/09/28 23:35:29 ad Exp $ */ /* * Copyright (c) 1999 Andy Doran @@ -36,6 +36,7 @@ #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 */ @@ -52,6 +53,24 @@ struct dpt_ccb { struct scsipi_xfer *ccb_xs; /* initiating SCSI command */ }; +#ifdef DPT_PROFILE +struct dpt_profile { + int dp_nsync; /* synchronous writes */ + int dp_nasync; /* asynchronous writes */ + int dp_nread; /* reads */ + int dp_maxchargeccb; /* maximum CCB queue charge */ + int dp_maxchargexs; /* maximum SCSI queue charge */ + int dp_curchargeccb; /* current CCB queue charge */ + int dp_curchargexs; /* current SCSI queue charge */ + int dp_ncmds; /* total commands recieved */ + int dp_nsleepccb; /* times sleeping on a CCB */ + int dp_nintr; /* interrupts */ + int dp_nintrloop; /* intrs handled with one h/w intr */ +}; +#endif /* DPT_PROFILE */ + +#ifdef _KERNEL + struct dpt_softc { struct device sc_dv; /* generic device data */ bus_space_handle_t sc_ioh; /* bus space handle */ @@ -82,4 +101,6 @@ struct dpt_softc { int dpt_intr __P((void *)); void dpt_init __P((struct dpt_softc *, const char *)); +#endif /* _KERNEL */ + #endif /* !defined _IC_DPTVAR_H_ */