Subject: Re: problems with ahc vs. format command
To: None <bouyer@antioche.lip6.fr>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: tech-kern
Date: 06/12/2001 05:46:00
In <20010611215421.A337@antioche.eu.org>
bouyer@antioche.lip6.fr wrote:
> --- ncr53c9x.c.orig Mon Jun 11 21:43:40 2001
> +++ ncr53c9x.c Mon Jun 11 21:47:46 2001
> @@ -636,14 +636,8 @@
> * always possible that the interrupt may never happen.
> */
> if ((ecb->xs->xs_control & XS_CTL_POLL) == 0) {
> - int timeout = ecb->timeout;
> -
> - if (hz > 100 && timeout > 1000)
> - timeout = (timeout / 1000) * hz;
> - else
> - timeout = (timeout * hz) / 1000;
> -
> - callout_reset(&ecb->xs->xs_callout, timeout,
> + callout_reset(&ecb->xs->xs_callout,
> + ((u_int64_t)ecb->timeout * (u_int64_t)hz) / 1000,
> ncr53c9x_timeout, ecb);
> }
How about the code in osiop.c?
int timeout = acb->xs->timeout;
/* start expire timer */
timeout = (timeout > 100000) ?
timeout / 1000 * hz : timeout * hz / 1000;
if (timeout == 0)
timeout = 1;
callout_reset(&xs->xs_callout, timeout,
osiop_timeout, acb);
I'm not sure which is better to use u_int64_t or conditional, though..
---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp