Date: Tue, 3 May 2016 07:49:40 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r298958 - stable/10/sys/dev/wbwd Message-ID: <201605030749.u437neAd038415@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Tue May 3 07:49:40 2016 New Revision: 298958 URL: https://svnweb.freebsd.org/changeset/base/298958 Log: MFC r297963: Remove watchdog timer stop check. There are bunch of reports that this check fails at least on Nuvoton NCT6776 chips. I don't see why this check needed there, and Linux does not have it either. So far this check only made watchdogd unstopable. Modified: stable/10/sys/dev/wbwd/wbwd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/wbwd/wbwd.c ============================================================================== --- stable/10/sys/dev/wbwd/wbwd.c Tue May 3 07:48:52 2016 (r298957) +++ stable/10/sys/dev/wbwd/wbwd.c Tue May 3 07:49:40 2016 (r298958) @@ -505,19 +505,10 @@ wb_set_watchdog(struct wb_softc *sc, uns /* Watchdog is configured as part of LDN 8 (GPIO Port2, Watchdog) */ write_reg(sc, WB_LDN_REG, WB_LDN_REG_LDN8); - /* Disable and validate or arm/reset watchdog. */ if (timeout == 0) { /* Disable watchdog. */ - write_reg(sc, sc->time_reg, 0x00); - sc->reg_timeout = read_reg(sc, sc->time_reg); - (*sc->ext_cfg_exit_f)(sc, 0); - - /* Re-check. */ - if (sc->reg_timeout != 0x00) { - device_printf(sc->dev, "Failed to disable watchdog: " - "0x%02x.\n", sc->reg_timeout); - return (EIO); - } + sc->reg_timeout = 0; + write_reg(sc, sc->time_reg, sc->reg_timeout); } else { /* Read current scaling factor. */ @@ -547,12 +538,12 @@ wb_set_watchdog(struct wb_softc *sc, uns /* Set timer and arm/reset the watchdog. */ write_reg(sc, sc->time_reg, sc->reg_timeout); - (*sc->ext_cfg_exit_f)(sc, 0); } + (*sc->ext_cfg_exit_f)(sc, 0); + if (sc->debug_verbose) wb_print_state(sc, "After watchdog counter (re)load"); - return (0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605030749.u437neAd038415>