From owner-svn-src-all@FreeBSD.ORG Fri Dec 5 04:43:26 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2651D1065675; Fri, 5 Dec 2008 04:43:26 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1584B8FC13; Fri, 5 Dec 2008 04:43:26 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB54hPSg043289; Fri, 5 Dec 2008 04:43:25 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB54hPs8043288; Fri, 5 Dec 2008 04:43:25 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200812050443.mB54hPs8043288@svn.freebsd.org> From: Warner Losh Date: Fri, 5 Dec 2008 04:43:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185622 - head/sys/dev/pccbb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 05 Dec 2008 04:43:26 -0000 Author: imp Date: Fri Dec 5 04:43:25 2008 New Revision: 185622 URL: http://svn.freebsd.org/changeset/base/185622 Log: Implement a method described in NetBSD PR 36652 for coping with the BAD VCC bit. Modified: head/sys/dev/pccbb/pccbb.c Modified: head/sys/dev/pccbb/pccbb.c ============================================================================== --- head/sys/dev/pccbb/pccbb.c Fri Dec 5 00:01:34 2008 (r185621) +++ head/sys/dev/pccbb/pccbb.c Fri Dec 5 04:43:25 2008 (r185622) @@ -837,7 +837,18 @@ cbb_power(device_t brdev, int volts) } if (status & CBB_STATE_BAD_VCC_REQ) { device_printf(sc->dev, "Bad Vcc requested\n"); - /* XXX Do we want to do something to mitigate things here? */ + /* + * Turn off the power, and try again. Retrigger other + * active interrupts via force register. From NetBSD + * PR 36652, coded by me to description there. + */ + sock_ctrl &= ~CBB_SOCKET_CTRL_VCCMASK; + sock_ctrl &= ~CBB_SOCKET_CTRL_VPPMASK; + cbb_set(sc, CBB_SOCKET_CONTROL, sock_ctrl); + status &= ~CBB_STATE_BAD_VCC_REQ; + status &= ~CBB_STATE_DATA_LOST; + status |= CBB_FORCE_CV_TEST; + cbb_set(sc, CBB_SOCKET_FORCE, status); goto done; } if (sc->chipset == CB_TOPIC97) {