From: Borislav Petkov <bbpetkov@yahoo.de>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Lucy McCoy <lucy@keyspan.com>,
Andrew Morton <akpm@linux-foundation.org>,
greg@kroah.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] keyspan: init termios properly
Date: Sun, 2 Dec 2007 18:40:59 +0100 [thread overview]
Message-ID: <20071202174058.GA4445@gollum.tnic> (raw)
In-Reply-To: <20071202135734.323428c5@the-village.bc.nu>
On Sun, Dec 02, 2007 at 01:57:34PM +0000, Alan Cox wrote:
> On Sun, 2 Dec 2007 09:03:40 +0100
> Borislav Petkov <yme@gollum.tnic> wrote:
>
> > On Fri, Nov 30, 2007 at 09:23:43AM -0800, Lucy McCoy wrote:
> > > Hi All,
> > >
> > > I've been too busy to get to this but i'd rather not use the code fragment
> > > i sent Boris to try. It would be better to go ahead with the tty setup if
> > > the pointer is not NULL, otherwise use the defaults and not reference the
> > > NULL pointer. I'll see if I can get to this today.
> > you might also want to take a look at usa90_indat_callback() - there is
> > port->tty accessed again and this time it kills the machine completely when
> > something is sent over the serial line from the other end (through minicom, for
> > example). Oops is at
> >
> > http://www.screenshots.cc/view_image/ab9a1837/cimg00772.jpg
>
> Change it to if (tty && urb->actual_length) in that function and it'll
> probably cure it
yep, this does the trick, however, this is just a brown paper bag over the issue, afaict.
Most of the usb serial drivers do something in the likes of
struct usb_serial_port *port = (struct usb_serial_port *) urb->context;
...
tty = port->tty;
...
tty_insert_flip_{char,string,..}(tty,..)
in their _indat_callback()s.
In the keyspan case the port->tty is being accessed already in the ->open() function
from usb_console_setup(), before setting the termios settings and later again in the
_indat callback. I'm clearly missing the big picture here so what is the proper way
to initialize termios settings correctly in a driver?
--
Regards/Gruß,
Boris.
next prev parent reply other threads:[~2007-12-02 17:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-15 21:10 Lucy McCoy
2007-11-16 6:24 ` Borislav Petkov
2007-11-18 13:11 ` Borislav Petkov
2007-11-26 22:18 ` Andrew Morton
2007-11-30 5:45 ` Borislav Petkov
2007-11-30 17:23 ` Lucy McCoy
2007-12-02 8:03 ` Borislav Petkov
2007-12-02 13:57 ` Alan Cox
2007-12-02 17:40 ` Borislav Petkov [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-11-03 10:03 Borislav Petkov
2007-11-15 17:49 ` Lucy McCoy
2007-11-15 20:09 ` Andrew Morton
2007-11-15 20:28 ` Lucy McCoy
2007-11-15 20:40 ` Borislav Petkov
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=20071202174058.GA4445@gollum.tnic \
--to=bbpetkov@yahoo.de \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lucy@keyspan.com \
/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
Powered by JetHome