From owner-svn-src-all@FreeBSD.ORG Mon Feb 23 08:58:29 2009 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 9E380106566B; Mon, 23 Feb 2009 08:58:29 +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 8D4C48FC0A; Mon, 23 Feb 2009 08:58:29 +0000 (UTC) (envelope-from mav@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 n1N8wTa9019624; Mon, 23 Feb 2009 08:58:29 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1N8wTQw019623; Mon, 23 Feb 2009 08:58:29 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200902230858.n1N8wTQw019623@svn.freebsd.org> From: Alexander Motin Date: Mon, 23 Feb 2009 08:58:29 +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: r188936 - head/sys/dev/ata 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: Mon, 23 Feb 2009 08:58:30 -0000 Author: mav Date: Mon Feb 23 08:58:29 2009 New Revision: 188936 URL: http://svn.freebsd.org/changeset/base/188936 Log: Do not call devices probe/attach if there is nothing new was found. Modified: head/sys/dev/ata/ata-all.c Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Mon Feb 23 08:19:30 2009 (r188935) +++ head/sys/dev/ata/ata-all.c Mon Feb 23 08:58:29 2009 (r188936) @@ -722,6 +722,10 @@ ata_identify(device_t dev) /* Create new devices. */ if (bootverbose) device_printf(dev, "New devices: %08x\n", n); + if (n == 0) { + mtx_unlock(&Giant); + return (0); + } for (i = 0; i < ATA_PM; ++i) { if (n & (((ATA_ATA_MASTER | ATA_ATAPI_MASTER) << i))) { int unit = -1;