summaryrefslogtreecommitdiffstats
path: root/sys/dev/aha
diff options
context:
space:
mode:
authorsmh <smh@FreeBSD.org>2014-12-21 03:06:11 +0000
committersmh <smh@FreeBSD.org>2014-12-21 03:06:11 +0000
commitf73f068967977545d4d60b36864475974dca2613 (patch)
tree25e0e0aad4faf12d9100173a8b5cb4866ec97cdf /sys/dev/aha
parent4ae371d305e8c60f2e534058d1727f819749b623 (diff)
downloadFreeBSD-src-f73f068967977545d4d60b36864475974dca2613.zip
FreeBSD-src-f73f068967977545d4d60b36864475974dca2613.tar.gz
MFC r274819:
Prevent overflow issues in timeout processing MFC r274852: Fix build with asr driver Sponsored by: Multiplay
Diffstat (limited to 'sys/dev/aha')
-rw-r--r--sys/dev/aha/aha.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/aha/aha.c b/sys/dev/aha/aha.c
index 4efbb32..d3f1f5d 100644
--- a/sys/dev/aha/aha.c
+++ b/sys/dev/aha/aha.c
@@ -1049,8 +1049,8 @@ ahaexecuteccb(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
ccb->ccb_h.status |= CAM_SIM_QUEUED;
LIST_INSERT_HEAD(&aha->pending_ccbs, &ccb->ccb_h, sim_links.le);
- callout_reset(&accb->timer, (ccb->ccb_h.timeout * hz) / 1000,
- ahatimeout, accb);
+ callout_reset_sbt(&accb->timer, SBT_1MS * ccb->ccb_h.timeout, 0,
+ ahatimeout, accb, 0);
/* Tell the adapter about this command */
if (aha->cur_outbox->action_code != AMBO_FREE) {
@@ -1183,9 +1183,9 @@ ahadone(struct aha_softc *aha, struct aha_ccb *accb, aha_mbi_comp_code_t comp_co
ccb_h = LIST_NEXT(ccb_h, sim_links.le);
ahadone(aha, pending_accb, AMBI_ERROR);
} else {
- callout_reset(&pending_accb->timer,
- (ccb_h->timeout * hz) / 1000,
- ahatimeout, pending_accb);
+ callout_reset_sbt(&pending_accb->timer,
+ SBT_1MS * ccb_h->timeout, 0, ahatimeout,
+ pending_accb, 0);
ccb_h = LIST_NEXT(ccb_h, sim_links.le);
}
}
OpenPOWER on IntegriCloud