On Fri, Oct 9, 2009 at 00:49, Zhang, Sonic wrote: > From: Wolfram Sang [mailto:w.sang@xxxxxxxxxxxxxx] >> On Wed, Oct 07, 2009 at 11:38:15PM -0400, Mike Frysinger wrote: >>> From: Sonic Zhang <sonic.zhang@xxxxxxxxxx> >>> >>> There isn't much point in managing our own custom timeout timer when >>> the completion interface already includes support for it. This makes >>> the resulting code much simpler and robust. >> >> This sounds like a good thing to do, but keep in mind that >> adapter->timeout values should be in jiffies (see >> 8a52c6b4d55b2960d93a90a7cf6afd252357fa54). > > Yes, jiffies is used in this patch for timeout value. no it isnt. the commit he refers to does things like: - adap->timeout = 1; + adap->timeout = HZ; ret = wait_event_interruptible_timeout(dev->wq, - !(in_8(&iic->sts) & STS_PT), dev->adap.timeout * HZ); + !(in_8(&iic->sts) & STS_PT), dev->adap.timeout); we need to make the same change as our code is currently wrong: + if (!wait_for_completion_timeout(&iface->complete, + adap->timeout * HZ)) { + p_adap->timeout = 5; -mike -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html