pts/gnurabbit: added timeout in case of wait for IRQ.

The timeout was setup to 1 second (HZ constant in jiffies) to fix a problem
in the test/spec/python/test07.py.

This test file was always waiting for the IRQ from the first DMA.

The DMA transfer was properly finished but the IRQ doesn't arrive. It seems
that the problem behind is a wrong initialization (reset?) of the corresponding
DMA core in the Firmware.

This is a workaround of the problem.
parent 06d9a55b
......@@ -551,7 +551,8 @@ static long rr_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
ret = -EAGAIN; /* already happened */
break;
}
wait_event_interruptible(dev->q, count != dev->irqcount);
/* IRQ timeout of 1 second */
wait_event_interruptible_timeout(dev->q, count != dev->irqcount, HZ);
if (signal_pending(current))
ret = -ERESTARTSYS;
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment