Lines 689-695
Link Here
|
689 |
struct sysctl_ctx_list *sctx; |
689 |
struct sysctl_ctx_list *sctx; |
690 |
struct sysctl_oid *soid; |
690 |
struct sysctl_oid *soid; |
691 |
unsigned long timeout; |
691 |
unsigned long timeout; |
692 |
int error; |
692 |
int error, wden; |
693 |
|
693 |
|
694 |
error = wb_probe_enable(dev, 0); |
694 |
error = wb_probe_enable(dev, 0); |
695 |
if (error > 0) |
695 |
if (error > 0) |
Lines 716-722
Link Here
|
716 |
sc->reg_2 = read_efdr_1(sc, 0); |
716 |
sc->reg_2 = read_efdr_1(sc, 0); |
717 |
|
717 |
|
718 |
/* Print current state if bootverbose or watchdog already enabled. */ |
718 |
/* Print current state if bootverbose or watchdog already enabled. */ |
719 |
if (bootverbose || (sc->reg_timeout > 0x00)) |
719 |
wden = (sc->reg_timeout > 0x00) ? 1 : 0; |
|
|
720 |
if (bootverbose || wden) |
720 |
wb_print_state(sc, "Before watchdog attach"); |
721 |
wb_print_state(sc, "Before watchdog attach"); |
721 |
|
722 |
|
722 |
/* |
723 |
/* |
Lines 760-766
Link Here
|
760 |
sc->ev_tag = EVENTHANDLER_REGISTER(watchdog_list, wb_watchdog_fn, sc, |
761 |
sc->ev_tag = EVENTHANDLER_REGISTER(watchdog_list, wb_watchdog_fn, sc, |
761 |
0); |
762 |
0); |
762 |
|
763 |
|
763 |
if (bootverbose) |
764 |
/* Disable until watchdogd(8) re-enables, if it's already enabled. */ |
|
|
765 |
if (wden) { |
766 |
error = wb_set_watchdog(sc, 0); |
767 |
if (error) |
768 |
return (error); |
769 |
} |
770 |
|
771 |
if (bootverbose || wden) |
764 |
wb_print_state(sc, "After watchdog attach"); |
772 |
wb_print_state(sc, "After watchdog attach"); |
765 |
|
773 |
|
766 |
return (0); |
774 |
return (0); |