Linux Kernel: udelay() returns too early?
I have a driver which requires microsecond delays. To create this delay, my driver is using the kernel's udelay function. Specifically, there is one call to udelay(90): iowrite32(data, addr + DATA_OFFSET); iowrite32(trig, addr + CONTROL_OFFSET); udelay(30); trig |= 1; iowrite32(trig, addr + CONTROL_OFFSET); udelay(90); // This is the problematic call We had reliability issues with the device. After a lot of debugging, we traced the problem to the driver resuming before 90us has passed. (See "proof" below.) I am running kernel version 2.6.38-11-generic SMP (Kubuntu 11.04, x86_64) on an Intel