Subject: Re: timeout issue in scsi drivers: mstohz()
To: None <bouyer@antioche.eu.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: tech-kern
Date: 04/03/2002 19:23:53
In article <20020402205606.GA10346@antioche.eu.org>
bouyer@antioche.eu.org wrote:

> cleaning up my mail I re-read the thread from june 2001 "problems with ahc vs.
> format command" (http://mail-index.netbsd.org/tech-kern/2001/06/).
 :
> I implemented it this evening, and converted the SCSI drivers.
 :
> Comments ?

Looks good, but one question:

> #define mstohz(ms) \
> 	(__predict_false((ms) >= 100000)) ? \
> 	    (((ms) / 1000 + 1) * hz) : \
                          ^^^
What does this "+1" means?

> 	    (((ms) * hz) / 1000)

This should be (((ms) * hz) / 1000 + 1) instead?
---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp