Date: Tue, 7 Oct 2003 17:30:59 +0200 From: Thomas Quinot <thomas@FreeBSD.ORG> To: Alexandre Kardanev <Alexandre.Kardanev@ihep.su> Cc: freebsd-stable@freebsd.org Subject: Re: USB code breaks in 4.9-RC1? Message-ID: <20031007153059.GA66201@melusine.cuivre.fr.eu.org> In-Reply-To: <Pine.OSF.4.21.0310071842390.231062-201000@Sirius.ihep.su> References: <20031007142403.GA78073@scylla.towardex.com> <Pine.OSF.4.21.0310071842390.231062-201000@Sirius.ihep.su>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Le 2003-10-07, Alexandre Kardanev écrivait :
> After 4.8 prerelease inserting it will immediately crash my Compaq
> Descpro-P400
The patch below, which I just posted to scsi@, should at least prevent
the panic. Please try it and let me know if it indeed helps.
Thomas.
Index: scsi_da.c
===================================================================
RCS file: /home/ncvs/src/sys/cam/scsi/scsi_da.c,v
retrieving revision 1.159
diff -u -r1.159 scsi_da.c
--- scsi_da.c 4 Sep 2003 01:01:20 -0000 1.159
+++ scsi_da.c 7 Oct 2003 14:48:26 -0000
@@ -89,7 +89,8 @@
DA_FLAG_NEED_OTAG = 0x020,
DA_FLAG_WENT_IDLE = 0x040,
DA_FLAG_RETRY_UA = 0x080,
- DA_FLAG_OPEN = 0x100
+ DA_FLAG_OPEN = 0x100,
+ DA_FLAG_SCTX_INIT = 0x200
} da_flags;
typedef enum {
@@ -838,7 +839,8 @@
/*
* If we can't free the sysctl tree, oh well...
*/
- if (sysctl_ctx_free(&softc->sysctl_ctx) != 0) {
+ if ((softc->flags & DA_FLAG_SCTX_INIT) != 0
+ && sysctl_ctx_free(&softc->sysctl_ctx) != 0) {
xpt_print_path(periph->path);
printf("can't remove sysctl context\n");
}
@@ -925,6 +927,7 @@
mtx_lock(&Giant);
sysctl_ctx_init(&softc->sysctl_ctx);
+ softc->flags |= DA_FLAG_SCTX_INIT;
softc->sysctl_tree = SYSCTL_ADD_NODE(&softc->sysctl_ctx,
SYSCTL_STATIC_CHILDREN(_kern_cam_da), OID_AUTO, tmpstr2,
CTLFLAG_RD, 0, tmpstr);
--
Thomas.Quinot@Cuivre.FR.EU.ORG
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)
iD8DBQE/gtwyAE1UuDk9JGkRAiAiAJ9NZBy+Nv+03jIbgbx0hmt+0IrDzACcDmxa
5osx+VRnLjdozUQUBbp3aBw=
=DH4K
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031007153059.GA66201>
