From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Dharm Date: Thu, 18 Dec 2003 18:04:20 +0000 Subject: Re: Problem hotplugging USB flashdrive (race?) MIME-Version: 1 Content-Type: multipart/mixed; boundary="qDbXVdCdHGoSgWSk" Message-Id: List-Id: References: In-Reply-To: To: linux-hotplug@vger.kernel.org --qDbXVdCdHGoSgWSk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 18, 2003 at 09:53:03AM +0100, Oliver Neukum wrote: > Am Mittwoch, 17. Dezember 2003 18:47 schrieb Greg KH: > > On Wed, Dec 17, 2003 at 06:28:13PM +0100, Bertrik Sikken wrote: > > > >Exactly. Try putting a sleep before reading the file, or loop on the > > > >file for a bit before reading it. > > >=20 > > > I can confirm that the sleep works (added a sleep 1 at the start > > > of the script). Does this suggest an issue in the kernel? > >=20 > > No, it's not a problem with the kernel, it's just something that you > > need to be aware of in your hotplug scripts. >=20 > Technically, it is a race condition. > You need to make sure that user space loses the race. Shouldn't this actually be two separate hotplug events? One when the unit is physically attached, to load the usb-storage driver. The second when the SCSI layer has initalized the device, to run the scsi.agent? Matt --=20 Matthew Dharm Home: mdharm-usb@one-eyed-alien.= net=20 Maintainer, Linux USB Mass Storage Driver A female who groks UNIX? My universe is collapsing. -- Mike User Friendly, 10/11/1998 --qDbXVdCdHGoSgWSk Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/4ewkIjReC7bSPZARAolyAKDBegy9puVQ64zYWDd537bFwBkjNwCgqvrL +xLp6YuoPQhbRL0MGkq1pQs= =ExDL -----END PGP SIGNATURE----- --qDbXVdCdHGoSgWSk-- ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel