From owner-svn-src-all@freebsd.org Thu Apr 14 12:50:29 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 264F0B0E503; Thu, 14 Apr 2016 12:50:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7CAE1075; Thu, 14 Apr 2016 12:50:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3ECoSdV080654; Thu, 14 Apr 2016 12:50:28 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3ECoSL4080653; Thu, 14 Apr 2016 12:50:28 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201604141250.u3ECoSL4080653@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 14 Apr 2016 12:50:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297963 - head/sys/dev/wbwd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 12:50:29 -0000 Author: mav Date: Thu Apr 14 12:50:27 2016 New Revision: 297963 URL: https://svnweb.freebsd.org/changeset/base/297963 Log: 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. MFC after: 1 month Modified: head/sys/dev/wbwd/wbwd.c Modified: head/sys/dev/wbwd/wbwd.c ============================================================================== --- head/sys/dev/wbwd/wbwd.c Thu Apr 14 12:46:46 2016 (r297962) +++ head/sys/dev/wbwd/wbwd.c Thu Apr 14 12:50:27 2016 (r297963) @@ -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); }