View | Details | Raw Unified | Return to bug 203166 | Differences between
and this patch

Collapse All | Expand All

(-)sys/dev/wbwd/wbwd.c (-3 / +17 lines)
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
		unsigned long dob;
767
768
		if (TUNABLE_ULONG_FETCH("hw.wbwd.disable_on_boot", &dob)) {
769
			if (dob > 0) {
770
				error = wb_set_watchdog(sc, 0);
771
				if (error)
772
					return (error);
773
			}
774
		}
775
	}
776
777
	if (bootverbose || wden)
764
		wb_print_state(sc, "After watchdog attach");
778
		wb_print_state(sc, "After watchdog attach");
765
779
766
	return (0);
780
	return (0);

Return to bug 203166