Module Name: src Committed By: dyoung Date: Fri May 29 23:27:08 UTC 2009
Modified Files: src/sys/kern: subr_autoconf.c Log Message: In config_detach(9), if device deactivation fails with EOPNOTSUPP, don't treat it as an error. This should stop the kernel from panicking in config_detach(9) when sd(4)/wd(4) detach. To generate a diff of this commit: cvs rdiff -u -r1.176 -r1.177 src/sys/kern/subr_autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/subr_autoconf.c diff -u src/sys/kern/subr_autoconf.c:1.176 src/sys/kern/subr_autoconf.c:1.177 --- src/sys/kern/subr_autoconf.c:1.176 Sun May 24 12:27:50 2009 +++ src/sys/kern/subr_autoconf.c Fri May 29 23:27:08 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_autoconf.c,v 1.176 2009/05/24 12:27:50 ad Exp $ */ +/* $NetBSD: subr_autoconf.c,v 1.177 2009/05/29 23:27:08 dyoung Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.176 2009/05/24 12:27:50 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.177 2009/05/29 23:27:08 dyoung Exp $"); #include "opt_ddb.h" #include "drvctl.h" @@ -1511,8 +1511,8 @@ (flags & (DETACH_SHUTDOWN|DETACH_FORCE)) == DETACH_SHUTDOWN && (dev->dv_flags & DVF_DETACH_SHUTDOWN) == 0) { rv = EBUSY; /* XXX EOPNOTSUPP? */ - } else if (ca->ca_activate != NULL) - rv = config_deactivate(dev); + } else if ((rv = config_deactivate(dev)) == EOPNOTSUPP) + rv = 0; /* Do not treat EOPNOTSUPP as an error */ /* * Try to detach the device. If that's not possible, then