summaryrefslogtreecommitdiffstats
path: root/sys/dev/asr
diff options
context:
space:
mode:
authorgjb <gjb@FreeBSD.org>2013-09-25 01:48:45 +0000
committergjb <gjb@FreeBSD.org>2013-09-25 01:48:45 +0000
commitd965f28ba1171a60f27bd8b0e21de9412e2640f2 (patch)
tree4ba80487d8d5ba6364f0f8d1bdf5ad85102180c3 /sys/dev/asr
parent85074aa18eb69e2ea599def9d5b8a5bbb5addf8b (diff)
downloadFreeBSD-src-d965f28ba1171a60f27bd8b0e21de9412e2640f2.zip
FreeBSD-src-d965f28ba1171a60f27bd8b0e21de9412e2640f2.tar.gz
Revert r255853 pending fixes to build errors in usr.bin/kdump
Approved by: re (implicit)
Diffstat (limited to 'sys/dev/asr')
-rw-r--r--sys/dev/asr/asr.c33
1 files changed, 9 insertions, 24 deletions
diff --git a/sys/dev/asr/asr.c b/sys/dev/asr/asr.c
index 1e4f1a6..8909d0c 100644
--- a/sys/dev/asr/asr.c
+++ b/sys/dev/asr/asr.c
@@ -385,21 +385,6 @@ typedef struct Asr_softc {
static STAILQ_HEAD(, Asr_softc) Asr_softc_list =
STAILQ_HEAD_INITIALIZER(Asr_softc_list);
-static __inline void
-set_ccb_timeout_ch(union asr_ccb *ccb, struct callout_handle ch)
-{
- ccb->ccb_h.sim_priv.entries[0].ptr = ch.callout;
-}
-
-static __inline struct callout_handle
-get_ccb_timeout_ch(union asr_ccb *ccb)
-{
- struct callout_handle ch;
-
- ch.callout = ccb->ccb_h.sim_priv.entries[0].ptr;
- return ch;
-}
-
/*
* Prototypes of the routines we have in this object.
*/
@@ -812,8 +797,8 @@ ASR_ccbAdd(Asr_softc_t *sc, union asr_ccb *ccb)
*/
ccb->ccb_h.timeout = 6 * 60 * 1000;
}
- set_ccb_timeout_ch(ccb, timeout(asr_timeout, (caddr_t)ccb,
- (ccb->ccb_h.timeout * hz) / 1000));
+ ccb->ccb_h.timeout_ch = timeout(asr_timeout, (caddr_t)ccb,
+ (ccb->ccb_h.timeout * hz) / 1000);
}
splx(s);
} /* ASR_ccbAdd */
@@ -827,7 +812,7 @@ ASR_ccbRemove(Asr_softc_t *sc, union asr_ccb *ccb)
int s;
s = splcam();
- untimeout(asr_timeout, (caddr_t)ccb, get_ccb_timeout_ch(ccb));
+ untimeout(asr_timeout, (caddr_t)ccb, ccb->ccb_h.timeout_ch);
LIST_REMOVE(&(ccb->ccb_h), sim_links.le);
splx(s);
} /* ASR_ccbRemove */
@@ -1337,9 +1322,9 @@ asr_timeout(void *arg)
cam_sim_unit(xpt_path_sim(ccb->ccb_h.path)), s);
if (ASR_reset (sc) == ENXIO) {
/* Try again later */
- set_ccb_timeout_ch(ccb, timeout(asr_timeout,
+ ccb->ccb_h.timeout_ch = timeout(asr_timeout,
(caddr_t)ccb,
- (ccb->ccb_h.timeout * hz) / 1000));
+ (ccb->ccb_h.timeout * hz) / 1000);
}
return;
}
@@ -1353,9 +1338,9 @@ asr_timeout(void *arg)
if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_CMD_TIMEOUT) {
debug_asr_printf (" AGAIN\nreinitializing adapter\n");
if (ASR_reset (sc) == ENXIO) {
- set_ccb_timeout_ch(ccb, timeout(asr_timeout,
+ ccb->ccb_h.timeout_ch = timeout(asr_timeout,
(caddr_t)ccb,
- (ccb->ccb_h.timeout * hz) / 1000));
+ (ccb->ccb_h.timeout * hz) / 1000);
}
splx(s);
return;
@@ -1364,8 +1349,8 @@ asr_timeout(void *arg)
/* If the BUS reset does not take, then an adapter reset is next! */
ccb->ccb_h.status &= ~CAM_STATUS_MASK;
ccb->ccb_h.status |= CAM_CMD_TIMEOUT;
- set_ccb_timeout_ch(ccb, timeout(asr_timeout, (caddr_t)ccb,
- (ccb->ccb_h.timeout * hz) / 1000));
+ ccb->ccb_h.timeout_ch = timeout(asr_timeout, (caddr_t)ccb,
+ (ccb->ccb_h.timeout * hz) / 1000);
ASR_resetBus (sc, cam_sim_bus(xpt_path_sim(ccb->ccb_h.path)));
xpt_async (AC_BUS_RESET, ccb->ccb_h.path, NULL);
splx(s);
OpenPOWER on IntegriCloud