From owner-freebsd-stable@FreeBSD.ORG Tue Oct 7 08:31:02 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3565616A4B3 for ; Tue, 7 Oct 2003 08:31:02 -0700 (PDT) Received: from melusine.cuivre.fr.eu.org (melusine.cuivre.fr.eu.org [62.212.105.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E6AE43FDF for ; Tue, 7 Oct 2003 08:31:00 -0700 (PDT) (envelope-from thomas@FreeBSD.ORG) Received: by melusine.cuivre.fr.eu.org (Postfix, from userid 1000) id A83DD2C3D0; Tue, 7 Oct 2003 17:30:59 +0200 (CEST) Date: Tue, 7 Oct 2003 17:30:59 +0200 From: Thomas Quinot To: Alexandre Kardanev Message-ID: <20031007153059.GA66201@melusine.cuivre.fr.eu.org> References: <20031007142403.GA78073@scylla.towardex.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zYM0uCDKw75PZbzx" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-message-flag: WARNING! Using Outlook can damage your computer. cc: freebsd-stable@freebsd.org Subject: Re: USB code breaks in 4.9-RC1? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2003 15:31:02 -0000 X-List-Received-Date: Tue, 07 Oct 2003 15:31:02 -0000 --zYM0uCDKw75PZbzx Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Le 2003-10-07, Alexandre Kardanev =E9crivait : > 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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 =3D 0x020, DA_FLAG_WENT_IDLE =3D 0x040, DA_FLAG_RETRY_UA =3D 0x080, - DA_FLAG_OPEN =3D 0x100 + DA_FLAG_OPEN =3D 0x100, + DA_FLAG_SCTX_INIT =3D 0x200 } da_flags; =20 typedef enum { @@ -838,7 +839,8 @@ /* * If we can't free the sysctl tree, oh well... */ - if (sysctl_ctx_free(&softc->sysctl_ctx) !=3D 0) { + if ((softc->flags & DA_FLAG_SCTX_INIT) !=3D 0 + && sysctl_ctx_free(&softc->sysctl_ctx) !=3D 0) { xpt_print_path(periph->path); printf("can't remove sysctl context\n"); } @@ -925,6 +927,7 @@ =20 mtx_lock(&Giant); sysctl_ctx_init(&softc->sysctl_ctx); + softc->flags |=3D DA_FLAG_SCTX_INIT; softc->sysctl_tree =3D SYSCTL_ADD_NODE(&softc->sysctl_ctx, SYSCTL_STATIC_CHILDREN(_kern_cam_da), OID_AUTO, tmpstr2, CTLFLAG_RD, 0, tmpstr); --=20 Thomas.Quinot@Cuivre.FR.EU.ORG --zYM0uCDKw75PZbzx Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/gtwyAE1UuDk9JGkRAiAiAJ9NZBy+Nv+03jIbgbx0hmt+0IrDzACcDmxa 5osx+VRnLjdozUQUBbp3aBw= =DH4K -----END PGP SIGNATURE----- --zYM0uCDKw75PZbzx--