From f73f068967977545d4d60b36864475974dca2613 Mon Sep 17 00:00:00 2001 From: smh Date: Sun, 21 Dec 2014 03:06:11 +0000 Subject: MFC r274819: Prevent overflow issues in timeout processing MFC r274852: Fix build with asr driver Sponsored by: Multiplay --- sys/dev/buslogic/bt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sys/dev/buslogic') diff --git a/sys/dev/buslogic/bt.c b/sys/dev/buslogic/bt.c index b24442e..c385a18 100644 --- a/sys/dev/buslogic/bt.c +++ b/sys/dev/buslogic/bt.c @@ -1467,8 +1467,8 @@ btexecuteccb(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error) ccb->ccb_h.status |= CAM_SIM_QUEUED; LIST_INSERT_HEAD(&bt->pending_ccbs, &ccb->ccb_h, sim_links.le); - callout_reset(&bccb->timer, (ccb->ccb_h.timeout * hz) / 1000, - bttimeout, bccb); + callout_reset_sbt(&bccb->timer, SBT_1MS * ccb->ccb_h.timeout, 0, + bttimeout, bccb, 0); /* Tell the adapter about this command */ bt->cur_outbox->ccb_addr = btccbvtop(bt, bccb); @@ -1602,9 +1602,9 @@ btdone(struct bt_softc *bt, struct bt_ccb *bccb, bt_mbi_comp_code_t comp_code) ccb_h = LIST_NEXT(ccb_h, sim_links.le); btdone(bt, pending_bccb, BMBI_ERROR); } else { - callout_reset(&pending_bccb->timer, - (ccb_h->timeout * hz) / 1000, - bttimeout, pending_bccb); + callout_reset_sbt(&pending_bccb->timer, + SBT_1MS * ccb_h->timeout, 0, bttimeout, + pending_bccb, 0); ccb_h = LIST_NEXT(ccb_h, sim_links.le); } } -- cgit v1.1