summaryrefslogtreecommitdiffstats
path: root/sys/dev/buslogic
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/buslogic
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/buslogic')
-rw-r--r--sys/dev/buslogic/bt.c10
1 files changed, 5 insertions, 5 deletions
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);
}
}
OpenPOWER on IntegriCloud