From: Takashi Iwai <tiwai@suse.de>
To: Jaroslav Kysela <perex@suse.cz>
Cc: Clemens Ladisch <clemens@ladisch.de>,
"alsa-devel@lists.sourceforge.net"
<alsa-devel@lists.sourceforge.net>
Subject: Re: trying out usb hotplugs
Date: Fri, 29 Nov 2002 15:14:28 +0100 [thread overview]
Message-ID: <s5hhee0bgzf.wl@alsa2.suse.de> (raw)
In-Reply-To: <Pine.LNX.4.33.0211291454330.532-100000@pnote.perex-int.cz>
At Fri, 29 Nov 2002 15:05:21 +0100 (CET),
Jaroslav wrote:
>
> On Fri, 29 Nov 2002, Takashi Iwai wrote:
>
> > Hi,
> >
> > the attached is my latest patch.
> > could you check it?
>
> Let's go and make things more complicated (like in my tree on disc):
>
> 1) waiting for time when all disconnected applications have closed
> all file descriptors is a bit problem, because no new/other USB devices
> can be connected/disconnected; in my tree, I use thread to postpone
> freeing of snd_card_t structure
right. i didn't touch this part at all.
another possible solution is to put the pending card instance into
a stale linked-list like in pcmcia drivers.
the pending objects are released at the time when a new device is
registered and when the module is removed.
but if a kernel-thread can work well, it's better, because it will
release the resources asap.
> 2) replace file->f_op with fake operations which allows only original
> release() callback in snd_card_disconnect(); this point makes things
> more and more simple than your code (check all accesses), because we
> need to count only open/release calls
yes, that's a better solution.
> 3) the unfinished problem is still: how to behave, if the disconnect event
> comes in the middle of some code; you're right at this point, the
> lowlevel driver must handle it
>
> Please, remove from your code any checks from ioctl(), poll(), read() /
> write(). Then commit and I'll merge my tree with yours.
ok.
Takashi
-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T
handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
next prev parent reply other threads:[~2002-11-29 14:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-28 0:27 trying out usb hotplugs Martin Langer
2002-11-28 12:11 ` Takashi Iwai
2002-11-29 7:52 ` Clemens Ladisch
2002-11-29 9:06 ` Takashi Iwai
2002-11-29 9:39 ` Jaroslav Kysela
2002-11-29 10:07 ` Takashi Iwai
2002-11-29 11:24 ` Jaroslav Kysela
2002-11-29 11:42 ` Takashi Iwai
2002-11-29 12:12 ` Takashi Iwai
2002-11-29 14:05 ` Jaroslav Kysela
2002-11-29 14:14 ` Takashi Iwai [this message]
2002-11-29 14:52 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5hhee0bgzf.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@lists.sourceforge.net \
--cc=clemens@ladisch.de \
--cc=perex@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox