From owner-freebsd-current@FreeBSD.ORG Fri Sep 24 05:36:29 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA0A916A4CE for ; Fri, 24 Sep 2004 05:36:29 +0000 (GMT) Received: from vbook.fbsd.ru (asplinux.ru [195.133.213.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0C60F43D2D for ; Fri, 24 Sep 2004 05:36:27 +0000 (GMT) (envelope-from vova@vbook.fbsd.ru) Received: from vova by vbook.fbsd.ru with local (Exim 4.42 (FreeBSD)) id 1CAike-0000Gh-V5; Fri, 24 Sep 2004 09:36:13 +0400 From: Vladimir Grebenschikov To: "M. Warner Losh" In-Reply-To: <20040921.183650.28787484.imp@bsdimp.com> References: <20040920.225931.29867687.imp@bsdimp.com> <200409211309.25428.Lutz.Bichler@unibw-muenchen.de> <1095812538.2535.36.camel@RabbitsDen> <20040921.183650.28787484.imp@bsdimp.com> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Organization: SWsoft Date: Fri, 24 Sep 2004 09:36:12 +0400 Message-Id: <1096004172.1000.1.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.0.0FreeBSD GNOME Team Port Sender: Vladimir Grebenschikov cc: "current@freebsd.org" cc: Alex.Kovalenko@verizon.net Subject: Re: Detaching USB stick crashes BETA4/BETA5 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: vova@fbsd.ru List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Sep 2004 05:36:29 -0000 =F7 =D7=D4, 21/09/2004 =D7 18:36 -0600, M. Warner Losh =D0=C9=DB=C5=D4: > Ian Dowse also is having problems in this area. He suggested the > following patch to me. I have some concerns about the patch, but they > are theoretical (what does it mean when a parent is detached, but all > its children are attached?), but given the current state of the newbus > code it will fix the problem for you. Yes, it fix my problem with usb unplug too on recent CURRENT. Please commit. > Warner >=20 > Index: usb_port.h > =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: /dump/FreeBSD-CVS/src/sys/dev/usb/usb_port.h,v > retrieving revision 1.67 > diff -u -r1.67 usb_port.h > --- usb_port.h 15 Aug 2004 23:39:18 -0000 1.67 > +++ usb_port.h 21 Sep 2004 23:46:27 -0000 > @@ -422,6 +422,7 @@ > #define config_detach(dev, flag) \ > do { \ > free(device_get_ivars(dev), M_USB); \ > + device_detach(dev); \ > device_delete_child(device_get_parent(dev), dev); \ > } while (0); > =20 --=20 Vladimir B. Grebenchikov vova@fbsd.ru