svn commit: r188936 - head/sys/dev/ata

Alexander Motin mav at FreeBSD.org
Mon Feb 23 00:58:30 PST 2009


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;


More information about the svn-src-all mailing list