From: Gianluca Anzolin <gianluca@sottospazio.it>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: "Gustavo F. Padovan" <gustavo@padovan.org>,
peter@hurleysoftware.com,
"linux-bluetooth@vger.kernel.org development"
<linux-bluetooth@vger.kernel.org>,
Greg KH <gregkh@linuxfoundation.org>,
jslaby@suse.cz, stable@vger.kernel.org
Subject: Re: [PATCH v2 3/4] rfcomm: always wait for a bt connection on open()
Date: Mon, 6 Jan 2014 20:37:32 +0100 [thread overview]
Message-ID: <20140106193732.GA24137@sottospazio.it> (raw)
In-Reply-To: <4321EF0E-97F4-4236-B763-0D0213BE97A8@holtmann.org>
On Mon, Jan 06, 2014 at 11:17:06AM -0800, Marcel Holtmann wrote:
> don’t do an if-else-else if statement here. Just break.
>
> if (dev->dlc->state == BT_CLOSED) {
> ..
> break;
> }
>
> if (dev->dlc->state == BT_CONNECTED)
> break;
>
> if (signal_pending(..)) {
> ..
> break;
> }
I'll change the code.
> > - rfcomm_tty_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL;
> > + rfcomm_tty_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
>
> Is adding CLOCAL by default intentional?
Yes, I removed it before because I relied on the carrier_raised() tty_port
method. But it turned out it wasn't a good idea because some code (wvdial
for example) set that flag on exit, leaving a non-working tty for subsequent
open() calls.
Now I restored the original flags, even if CLOCAL is actually ignored by the
code.
I will shortly send a third iteration with the fixed if statements.
Thanks,
Gianluca
> > rfcomm_tty_driver->init_termios.c_lflag &= ~ICANON;
> > tty_set_operations(rfcomm_tty_driver, &rfcomm_ops);
>
> Regards
>
> Marcel
>
next prev parent reply other threads:[~2014-01-06 19:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-06 18:43 [PATCH v2 0/4] Regression fixes for rfcomm/tty.c Gianluca Anzolin
2014-01-06 18:43 ` [PATCH v2 1/4] rfcomm: release the port when the last user closes the tty Gianluca Anzolin
2014-01-06 18:43 ` [PATCH v2 2/4] rfcomm: move rfcomm_get_device() before rfcomm_dev_activate() Gianluca Anzolin
2014-01-06 18:43 ` [PATCH v2 3/4] rfcomm: always wait for a bt connection on open() Gianluca Anzolin
2014-01-06 19:17 ` Marcel Holtmann
2014-01-06 19:37 ` Gianluca Anzolin [this message]
2014-01-06 18:43 ` [PATCH v2 4/4] rfcomm: remove rfcomm_carrier_raised() Gianluca Anzolin
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=20140106193732.GA24137@sottospazio.it \
--to=gianluca@sottospazio.it \
--cc=gregkh@linuxfoundation.org \
--cc=gustavo@padovan.org \
--cc=jslaby@suse.cz \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=peter@hurleysoftware.com \
--cc=stable@vger.kernel.org \
/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