Messages in this thread | | | From | kernel@street-v ... | Subject | Re: [PATCH] [2.4.20-pre1] Watchdog Stuff (1/4) | Date | Thu, 8 Aug 2002 12:06:44 +0000 (GMT) |
| |
You might cc the driver author...
> > Here are four patches for the watchdog drivers. These patches > are an update to 2.4.20-pre1 of the original set against 2.4.19-pre9. > The first patch (this one) adds WDIOC_SETTIMEOUT support to > wafer5823wdt.c. The second patch adds Matt Domsch's 'nowayout' module > option to the drivers that currently don't have it. The third patch > fixes a bug where most of the "magic close character" capable drivers > don't use get_user(). The fourth patch adds "magic close character" > support to almost all of the remaining drivers. It also adds > WDIOF_MAGICCLOSE to the driver info flags. > > Joel
> + > + case WDIOC_SETTIMEOUT: > + if (get_user(new_margin, (int *)arg)) > + return -EFAULT; > + if ((new_margin < 1) || (new_margin > 255)) > + return -EINVAL; > + wd_margin = new_margin; > + wafwdt_stop(); > + wafwdt_start(); > + /* Fall */ > + case WDIOC_GETTIMEOUT: > + return put_user(wd_margin, (int *)arg);
I really wouldnt do wafwdt_stop(); wafwdt_start(); here. The new timeout will be set on the next watchdog ping anyway, and you need to spin_lock and unlock round this too. Much cleaner just to drop it.
Justin - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |