From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH]usx2y: prevent oops & dead keyboard on hot usb unplugging Date: Tue, 19 Apr 2005 11:32:30 +0200 Message-ID: References: <20050416003107.68080.qmail@web26501.mail.ukl.yahoo.com> Mime-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <20050416003107.68080.qmail@web26501.mail.ukl.yahoo.com> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: karsten wiese Cc: Clemens Ladisch , Devel Alsa List-Id: alsa-devel@alsa-project.org At Sat, 16 Apr 2005 02:31:06 +0200 (CEST), karsten wiese wrote: > > --- Clemens Ladisch wrote: > > Takashi Iwai wrote: > > > karsten wiese wrote: > > > > (-: You apply my patch now? > > > > > > No, not enough :) This is exactly why > > snd_card_free_in_thread() was > > > introduced. > > > > > > As I asked, please make sure that the files are all > > released before > > > snd_card_free(). Otherwise the disconnect callback > > hangs at this > > > point because of this check. > > > > Most programs close the device file when an error occurs, > > so you have > > to test it with something like this to keep the file > > open: > > > > #include > > int main() > > { > > fopen("/dev/snd/hwC1D0", "rb"); > > getchar(); > > } > > > Tested with it, see attached shell log (copied+pasted). > Any more tests needed? Did you check whether the release fops callback (e.g. snd_hwdep_release) is called? Takashi ------------------------------------------------------- This SF.Net email is sponsored by: New Crystal Reports XI. Version 11 adds new functionality designed to reduce time involved in creating, integrating, and deploying reporting solutions. Free runtime info, new features, or free trial, at: http://www.businessobjects.com/devxi/728