mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: "'David Brownell'" <david-b@pacbell.net>
Cc: "'Alan Stern'" <stern@rowland.harvard.edu>,
	"'Peter Korsgaard'" <jacmet@sunsite.dk>,
	"'USB list'" <linux-usb@vger.kernel.org>,
	"'Kernel development list'" <linux-kernel@vger.kernel.org>,
	kyungmin.park@samsung.com,
	"'Marek Szyprowski'" <m.szyprowski@samsung.com>
Subject: RE: PROBLEM: kernel oops with g_serial USB gadget on 2.6.30
Date: Tue, 23 Jun 2009 10:37:23 +0200	[thread overview]
Message-ID: <002001c9f3dd$d7a24df0$86e6e9d0$%szyprowski@samsung.com> (raw)
In-Reply-To: <200906230022.39040.david-b@pacbell.net>

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



  reply	other threads:[~2009-06-23  8:38 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-22 12:04 Marek Szyprowski
2009-06-22 12:33 ` Peter Korsgaard
2009-06-22 13:55   ` Marek Szyprowski
2009-06-22 14:06     ` Peter Korsgaard
2009-06-22 14:06     ` Alan Stern
2009-06-22 14:12       ` Marek Szyprowski
2009-06-22 15:02         ` Alan Stern
2009-06-23  3:26         ` David Brownell
2009-06-23  6:41           ` Marek Szyprowski
2009-06-23  7:22             ` David Brownell
2009-06-23  8:37               ` Marek Szyprowski [this message]
2009-06-23  9:21                 ` Alan Cox
2009-06-23  9:33                   ` Marek Szyprowski
2009-06-23  9:54                     ` Alan Cox
2009-06-23 15:00                       ` Marek Szyprowski
2009-06-23 16:47                         ` David Brownell
2009-06-23 16:52                 ` David Brownell
2009-06-24  7:07                   ` Marek Szyprowski
2009-06-24  8:42                     ` Alan Cox
2009-06-24  8:54                       ` David Brownell
2009-06-24  8:49                     ` David Brownell
2009-06-24 10:30                       ` Marek Szyprowski
2009-06-24 23:43                         ` David Brownell

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='002001c9f3dd$d7a24df0$86e6e9d0$%szyprowski@samsung.com' \
    --to=m.szyprowski@samsung.com \
    --cc=david-b@pacbell.net \
    --cc=jacmet@sunsite.dk \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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

all inboxes | Powered by JetHome®