aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/isp/ispvar.h
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2017-03-14 08:03:56 +0000
committerAlexander Motin <mav@FreeBSD.org>2017-03-14 08:03:56 +0000
commita1fa02673afaed21473adc4633faac57b554acc0 (patch)
tree17548ba20920729ca4bef84e31cb17e11b357cb7 /sys/dev/isp/ispvar.h
parent3667f39ea3bcb716a7e6dc3ebd973e4cac6980f0 (diff)
Notes
Diffstat (limited to 'sys/dev/isp/ispvar.h')
-rw-r--r--sys/dev/isp/ispvar.h24
1 files changed, 11 insertions, 13 deletions
diff --git a/sys/dev/isp/ispvar.h b/sys/dev/isp/ispvar.h
index caaba7456176..72193d6c4b72 100644
--- a/sys/dev/isp/ispvar.h
+++ b/sys/dev/isp/ispvar.h
@@ -64,8 +64,7 @@ struct ispmdvec {
int (*dv_mbxdma) (ispsoftc_t *);
int (*dv_dmaset) (ispsoftc_t *, XS_T *, void *);
void (*dv_dmaclr) (ispsoftc_t *, XS_T *, uint32_t);
- void (*dv_reset0) (ispsoftc_t *);
- void (*dv_reset1) (ispsoftc_t *);
+ int (*dv_irqsetup) (ispsoftc_t *);
void (*dv_dregs) (ispsoftc_t *, const char *);
const void * dv_ispfw; /* ptr to f/w */
uint16_t dv_conf1;
@@ -105,10 +104,8 @@ struct ispmdvec {
if ((isp)->isp_mdvec->dv_dmaclr) \
(*(isp)->isp_mdvec->dv_dmaclr)((isp), (xs), (hndl))
-#define ISP_RESET0(isp) \
- if ((isp)->isp_mdvec->dv_reset0) (*(isp)->isp_mdvec->dv_reset0)((isp))
-#define ISP_RESET1(isp) \
- if ((isp)->isp_mdvec->dv_reset1) (*(isp)->isp_mdvec->dv_reset1)((isp))
+#define ISP_IRQSETUP(isp) \
+ (((isp)->isp_mdvec->dv_irqsetup) ? (*(isp)->isp_mdvec->dv_irqsetup)(isp) : 0)
#define ISP_DUMPREGS(isp, m) \
if ((isp)->isp_mdvec->dv_dregs) (*(isp)->isp_mdvec->dv_dregs)((isp),(m))
@@ -565,13 +562,9 @@ struct ispsoftc {
* Volatile state
*/
- volatile uint32_t : 8,
- : 2,
- isp_dead : 1,
- : 1,
- isp_mboxbsy : 1, /* mailbox command active */
- isp_state : 3,
- isp_nactive : 16; /* how many commands active */
+ volatile u_int isp_mboxbsy; /* mailbox command active */
+ volatile u_int isp_state;
+ volatile u_int isp_nactive; /* how many commands active */
volatile mbreg_t isp_curmbx; /* currently active mailbox command */
volatile uint32_t isp_reqodx; /* index of last ISP pickup */
volatile uint32_t isp_reqidx; /* index of next request */
@@ -819,6 +812,11 @@ void isp_init(ispsoftc_t *);
int isp_reinit(ispsoftc_t *, int);
/*
+ * Shutdown hardware after use.
+ */
+void isp_shutdown(ispsoftc_t *);
+
+/*
* Internal Interrupt Service Routine
*
* The outer layers do the spade work to get the appropriate status register,