diff options
| author | Hidetoshi Shimokawa <simokawa@FreeBSD.org> | 2003-10-24 07:42:21 +0000 |
|---|---|---|
| committer | Hidetoshi Shimokawa <simokawa@FreeBSD.org> | 2003-10-24 07:42:21 +0000 |
| commit | ad5c39fe2ae4dd67b228a61920690a259790e4a0 (patch) | |
| tree | 15f4cd760ec9a97e8d4d2ddb3cbc8640aa905537 /sys/dev/firewire | |
| parent | 03760206495ab1be484dc14e53ec4b242279ed48 (diff) | |
Notes
Diffstat (limited to 'sys/dev/firewire')
| -rw-r--r-- | sys/dev/firewire/firewire.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/sys/dev/firewire/firewire.c b/sys/dev/firewire/firewire.c index 1fe9052d6722..d75b6ef1d1a3 100644 --- a/sys/dev/firewire/firewire.c +++ b/sys/dev/firewire/firewire.c @@ -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); } |
