On Wed, 14 Jun 2006 16:28:09 +0100
Russell King <[EMAIL PROTECTED]> wrote:

| On Tue, Jun 13, 2006 at 07:28:29PM -0300, Luiz Fernando N. Capitulino wrote:
| >  I took a look in the Serial Core code and didn't see why set_termios()
| > and break_ctl() (plus tx_empty()) are not allowed to sleep: they doesn't
| > seem to run in atomic context. So, are they allowed to sleep? Isn't the
| > documentation out of date? I've even submitted a patch to fix it [2].
| 
| You are correct - and I will eventually apply your patch.  At the
| moment, I'm throttling back on applying patches so that 2.6.17 can
| finally appear (I don't want to be responsible for Linus saying
| again "too many changes for -final, let's do another -rc".)

 Oh, ok, no worries.

| >  For get_mctrl() and set_mctrl() it seems possible to switch from a
| > spinlock to a mutex, as they are not called from an interrupt context.
| > Is this really possible? Would you agree with this change?
| 
| I don't know - that depends whether the throttle/unthrottle driver
| methods are ever called from interrupt context or not.
| 
| What we could do is put a WARN_ON() or might_sleep() in there and
| find out over time if they are called from non-process context.

 I think BUG_ON(in_interrupt()) does the job. I'll try it here, and
if it doesn't trigger I'll submit a patch to Andrew only for
testing porpuses (ie, not for mainline).

 Thanks a lot for the feedback, Russell.

-- 
Luiz Fernando N. Capitulino


_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to