summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Matthew <jmatthew@cvs.openbsd.org>2014-01-19 10:30:14 +0000
committerJonathan Matthew <jmatthew@cvs.openbsd.org>2014-01-19 10:30:14 +0000
commitab62182ce6dd872e3c81ba93be81f58f21e52d91 (patch)
tree338a4abb53ef701e50d403e9708482d1d7dbafb2
parent452ccd02f59392747b927a11be229d66586d8b77 (diff)
Better interrupt handler return values. 1 if the chip said it wanted an
interrupt, 0 if it didn't. "makes sense" dlg@
-rw-r--r--sys/dev/ic/qla.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/sys/dev/ic/qla.c b/sys/dev/ic/qla.c
index a94d0e6a9d8..d81709d8e88 100644
--- a/sys/dev/ic/qla.c
+++ b/sys/dev/ic/qla.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: qla.c,v 1.1 2014/01/19 06:04:03 jmatthew Exp $ */
+/* $OpenBSD: qla.c,v 1.2 2014/01/19 10:30:13 jmatthew Exp $ */
/*
* Copyright (c) 2011 David Gwynne <dlg@openbsd.org>
@@ -51,7 +51,7 @@ void qla_scsi_cmd(struct scsi_xfer *);
struct qla_ccb *qla_scsi_cmd_poll(struct qla_softc *);
int qla_scsi_probe(struct scsi_link *);
-int qla_handle_intr(struct qla_softc *, u_int16_t, u_int16_t);
+void qla_handle_intr(struct qla_softc *, u_int16_t, u_int16_t);
u_int16_t qla_read(struct qla_softc *, int);
void qla_write(struct qla_softc *, int, u_int16_t);
@@ -882,16 +882,16 @@ qla_handle_resp(struct qla_softc *sc, u_int16_t id)
return (ccb);
}
-int
+void
qla_handle_intr(struct qla_softc *sc, u_int16_t isr, u_int16_t info)
{
- int rv, i;
+ int i;
u_int16_t rspin;
struct qla_ccb *ccb;
switch (isr) {
case QLA_INT_ASYNC:
- rv = qla_async(sc, info);
+ qla_async(sc, info);
break;
case QLA_INT_RSPQ:
@@ -917,7 +917,6 @@ qla_handle_intr(struct qla_softc *sc, u_int16_t isr, u_int16_t info)
qla_write_queue_ptr(sc, QLA_RESP_QUEUE_OUT,
sc->sc_last_resp_id);
}
- rv = 1;
break;
case QLA_INT_MBOX:
@@ -938,20 +937,14 @@ qla_handle_intr(struct qla_softc *sc, u_int16_t isr, u_int16_t info)
printf("%s: unexpected mbox interrupt: %x\n",
DEVNAME(sc), info);
}
- rv = 1;
- break;
-
- case 0:
- rv = 0;
break;
default:
/* maybe log something? */
- rv = 1;
+ break;
}
qla_clear_isr(sc);
- return (rv);
}
int
@@ -964,7 +957,8 @@ qla_intr(void *xsc)
if (qla_read_isr(sc, &isr, &info) == 0)
return (0);
- return (qla_handle_intr(sc, isr, info));
+ qla_handle_intr(sc, isr, info);
+ return (1);
}
int