Don't check timeout just after booted.
Some transactions could be considered wrongly to be timeout bacause interrupts are disabled during boot process.
This commit is contained in:
parent
0376020649
commit
ad5c39fe2a
@ -338,15 +338,27 @@ firewire_xfer_timeout(struct firewire_comm *fc)
|
||||
splx(s);
|
||||
}
|
||||
|
||||
#define WATCHDOC_HZ 10
|
||||
static void
|
||||
firewire_watchdog(void *arg)
|
||||
{
|
||||
struct firewire_comm *fc;
|
||||
static int watchdoc_clock = 0;
|
||||
|
||||
fc = (struct firewire_comm *)arg;
|
||||
firewire_xfer_timeout(fc);
|
||||
fc->timeout(fc);
|
||||
callout_reset(&fc->timeout_callout, hz / 10,
|
||||
|
||||
/*
|
||||
* At boot stage, the device interrupt is disabled and
|
||||
* We encounter a timeout easily. To avoid this,
|
||||
* ignore clock interrupt for a while.
|
||||
*/
|
||||
if (watchdoc_clock > WATCHDOC_HZ * 15) {
|
||||
firewire_xfer_timeout(fc);
|
||||
fc->timeout(fc);
|
||||
} else
|
||||
watchdoc_clock ++;
|
||||
|
||||
callout_reset(&fc->timeout_callout, hz / WATCHDOC_HZ,
|
||||
(void *)firewire_watchdog, (void *)fc);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user