From owner-svn-src-all@FreeBSD.ORG Thu Jul 1 18:59:06 2010 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 0F21B1065675; Thu, 1 Jul 2010 18:59:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F2CDE8FC12; Thu, 1 Jul 2010 18:59:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o61Ix5LB056166; Thu, 1 Jul 2010 18:59:05 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o61Ix558056163; Thu, 1 Jul 2010 18:59:05 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007011859.o61Ix558056163@svn.freebsd.org> From: Alexander Motin Date: Thu, 1 Jul 2010 18:59:05 +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: r209635 - head/sys/x86/isa 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: Thu, 01 Jul 2010 18:59:06 -0000 Author: mav Date: Thu Jul 1 18:59:05 2010 New Revision: 209635 URL: http://svn.freebsd.org/changeset/base/209635 Log: Allow attimer to be hinted at ISA if not reported by ISA PNP or ACPI. Rephrase respective atrtc code same way to be more readable. Modified: head/sys/x86/isa/atrtc.c head/sys/x86/isa/clock.c Modified: head/sys/x86/isa/atrtc.c ============================================================================== --- head/sys/x86/isa/atrtc.c Thu Jul 1 18:51:18 2010 (r209634) +++ head/sys/x86/isa/atrtc.c Thu Jul 1 18:59:05 2010 (r209635) @@ -231,13 +231,13 @@ atrtc_probe(device_t dev) { int result; - device_set_desc(dev, "AT Real Time Clock"); result = ISA_PNP_PROBE(device_get_parent(dev), dev, atrtc_ids); - /* ENXIO if wrong PnP-ID, ENOENT ifno PnP-ID, zero if good PnP-iD */ - if (result != ENOENT) - return(result); - /* All PC's have an RTC, and we're hosed without it, so... */ - return (BUS_PROBE_LOW_PRIORITY); + /* ENOENT means no PnP-ID, device is hinted. */ + if (result == ENOENT) { + device_set_desc(dev, "AT realtime clock"); + return (BUS_PROBE_LOW_PRIORITY); + } + return (result); } static int Modified: head/sys/x86/isa/clock.c ============================================================================== --- head/sys/x86/isa/clock.c Thu Jul 1 18:51:18 2010 (r209634) +++ head/sys/x86/isa/clock.c Thu Jul 1 18:59:05 2010 (r209635) @@ -511,7 +511,12 @@ attimer_probe(device_t dev) int result; result = ISA_PNP_PROBE(device_get_parent(dev), dev, attimer_ids); - return(result); + /* ENOENT means no PnP-ID, device is hinted. */ + if (result == ENOENT) { + device_set_desc(dev, "AT timer"); + return (BUS_PROBE_LOW_PRIORITY); + } + return (result); } static int