diff options
| author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-04-26 15:03:15 +0000 |
|---|---|---|
| committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-04-26 15:03:15 +0000 |
| commit | 057b4402bf634907fd03590e2757e09e975d04c7 (patch) | |
| tree | df1bb710ebf946f1a7c1b38464ef836fddfee71c /sys/dev/sym | |
| parent | 768f89e0788ab1ab7ea5df9d57082f53567007ec (diff) | |
Notes
Diffstat (limited to 'sys/dev/sym')
| -rw-r--r-- | sys/dev/sym/sym_hipd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/sym/sym_hipd.c b/sys/dev/sym/sym_hipd.c index 0d0afdf3a377..53c66bbbf085 100644 --- a/sys/dev/sym/sym_hipd.c +++ b/sys/dev/sym/sym_hipd.c @@ -2526,11 +2526,11 @@ static int sym_prepare_setting(hcb_p np, struct sym_nvram *nvram) * Minimum synchronous period factor supported by the chip. * Btw, 'period' is in tenths of nanoseconds. */ - period = (4 * div_10M[0] + np->clock_khz - 1) / np->clock_khz; + period = howmany(4 * div_10M[0], np->clock_khz); if (period <= 250) np->minsync = 10; else if (period <= 303) np->minsync = 11; else if (period <= 500) np->minsync = 12; - else np->minsync = (period + 40 - 1) / 40; + else np->minsync = howmany(period, 40); /* * Check against chip SCSI standard support (SCSI-2,ULTRA,ULTRA2). |
