RE: PROBLEM: kernel oops with g_serial USB gadget on 2.6.30



Hello,

On Tuesday, June 23, 2009 9:23 AM, David Brownell wrote:

Like, oh, changing a spinlock to a mutex.   You might change the
low_latency setting and review how that's now supposed to behave.

In in gs_open() function in drivers/usb/gadget/u_serial.c, after the
line 780 I've added:

tty->low_latency = 1;

That's already how it's set. Try instead *REMOVING* the line
which sets that flag.

My fault. I didn't notice that a few lines lower the low_latency flag is
alredy set and I thought I should set it. After removing that, g_serial
started working. :) Thanks a lot.

I noticed that there is also a comment:
/* low_latency means ldiscs work in tasklet context, without
* needing a workqueue schedule ... easier to keep up.
*/

So in low latency mode calls are made from a tasklet. This is not true in
my case, as the S3C OTG UDC driver does all its job in interrupts. This
way also a (usb) packet_done callback is done from an interrupt. I expect
that g_serial driver interacts with tty layer in that packet_done callback,
so this is the source of the problems. I noticed that some other UDC
drivers also does all its job from an interrupt, so they also might be
affected. How this bug should be properly resolved?

Best regards
--
Marek Szyprowski
Samsung Poland R&D Center


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: Thread in driver
    ... And the driver is able to do the callback ... whenever there is an interrupt. ... This kind of solution will work only if your callback is inside ... If you need to implement such a mechanism, use a named event and set ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Thread in driver
    ... is a classic IPC issue and could be replicated without a driver. ... break from Callback as well. ... Valter Minutewww.fortechembeddedlabs.it ... the number once they got an interrupt. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Thread in driver
    ... And the driver is able to do the callback ... whenever there is an interrupt. ... This kind of solution will work only if your callback is inside ... If you need to implement such a mechanism, use a named event and set ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Interrupt Synchronization at PASSIVE_LEVEL
    ... This also applies to regular spinlocks but avoid them, ... Im working on Sdio2com driver development for WinXP.I have registered ... Im not creating interrupt object for the interrupt.For sdio we will get only ... interrupt callback routine.My driver is running in PASSIVE_LEVEL,so i cannot ...
    (microsoft.public.development.device.drivers)
  • Re: 2.6.19 and up to 2.6.20-rc2 Ethernet problems x86_64
    ... If the system fails in ACPI mode, but works in non-ACPI mode, ... Using ACPI for SMP configuration information ... Using IOAPIC for interrupt routing ... Non-volatile memory driver v1.2 ...
    (Linux-Kernel)