Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Sep 2004 09:36:12 +0400
From:      Vladimir Grebenschikov <vova@fbsd.ru>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        Alex.Kovalenko@verizon.net
Subject:   Re: Detaching USB stick crashes BETA4/BETA5
Message-ID:  <1096004172.1000.1.camel@localhost>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
=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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1096004172.1000.1.camel>