All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Hurley <peter@hurleysoftware.com>
To: Frederic Danis <frederic.danis@linux.intel.com>
Cc: linux-bluetooth@vger.kernel.org, gregkh@linuxfoundation.org,
	jslaby@suse.cz
Subject: Re: [RFC 3/5] Bluetooth: hci_uart: Add HCIUARTSETBAUDRATE ioctl
Date: Fri, 03 Apr 2015 09:45:43 -0400	[thread overview]
Message-ID: <551E9987.9050800@hurleysoftware.com> (raw)
In-Reply-To: <551E8C6A.8040009@linux.intel.com>

On 04/03/2015 08:49 AM, Frederic Danis wrote:
> [ +cc GregKH, JiriS ]
> 
> On 03/04/2015 12:54, Peter Hurley wrote:
>> On 04/02/2015 10:37 AM, Frederic Danis wrote:
>>> This allows user space application to set final speed requested for UART
>>> device. UART port is open at init speed by user space application.
>>
>> If userspace opened the tty and knows this is a UART, why can it not
>> use the for-purpose tty ioctls to change the line rate?
> 
> The purpose of this Bluetooth set of patches is to move device setup for Bluetooth UART devices into the kernel.
> The idea is that userspace only needs to open the tty at initial speed and set correct line discipline, then userspace has no more to do, its up to HCI UART driver to manage the device (including firmware loading, bluetooth address and device speed setup).
> 
> However the driver may want to modify device speed (by using vendor specific HCI commands) to operate at full speed. Moreover, in case of firmware loading, some devices reset their speed to the default one, which will imply to change UART host speed to be able to continue communication.
> 
> Userspace can not know when all those speed changes occur.

The line discipline is always notified of line rate changes
via the set_termios() method, so if you add that to the hci_ldisc,
you'll be able to keep the BT device in sync with your
vendor-specific commands.

I'd like to be able to help out with the firmware download problem
but it's not clear to me at what point that is being executed since
the patch that adds a setup() method to the protocol doesn't compile:

/home/peter/src/kernels/mainline/drivers/bluetooth/hci_ldisc.c: In function ‘hci_uart_set_proto’:
/home/peter/src/kernels/mainline/drivers/bluetooth/hci_ldisc.c:485:11: error: ‘struct hci_uart_proto’ has no member named ‘setup’
  hu->proto->setup = NULL;
           ^
/home/peter/src/kernels/mainline/drivers/bluetooth/hci_ldisc.c:488:13: error: ‘struct hci_uart_proto’ has no member named ‘setup’
    hu->proto->setup = devtypes[i].setup;
             ^
make[3]: *** [drivers/bluetooth/hci_ldisc.o] Error 1

Regards,
Peter Hurley


  reply	other threads:[~2015-04-03 13:45 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-02 14:37 [RFC 0/5] Move HCI UART vendor specific setup to kernel Frederic Danis
2015-04-02 14:37 ` [RFC 1/5] Bluetooth: hci_uart: Add HCIUARTSETDEVTYPE ioctl Frederic Danis
2015-04-02 14:57   ` Marcel Holtmann
2015-04-02 14:37 ` [RFC 2/5] Bluetooth: hci_uart: Add BCM specific setup function Frederic Danis
2015-04-02 14:37 ` [RFC 3/5] Bluetooth: hci_uart: Add HCIUARTSETBAUDRATE ioctl Frederic Danis
2015-04-02 15:12   ` Marcel Holtmann
2015-04-03 10:54   ` Peter Hurley
2015-04-03 12:49     ` Frederic Danis
2015-04-03 13:45       ` Peter Hurley [this message]
2015-04-03 13:56         ` Peter Hurley
2015-04-03 14:18         ` Loic Poulain
2015-04-03 15:45           ` Peter Hurley
2015-04-03 17:39             ` Marcel Holtmann
2015-04-04 23:05               ` Peter Hurley
2015-04-04 23:35                 ` Marcel Holtmann
2015-04-05  1:22                   ` Peter Hurley
2015-04-05  2:29                     ` Marcel Holtmann
2015-04-10 12:07                       ` Peter Hurley
2015-04-10 16:07                         ` Marcel Holtmann
2015-04-10 16:45                           ` Peter Hurley
2015-04-10 16:58                             ` Marcel Holtmann
2015-04-02 14:37 ` [RFC 4/5] tty: Re-add external interface for tty_set_termios() Frederic Danis
2015-04-02 15:08   ` Marcel Holtmann
2015-04-02 14:37 ` [RFC 5/5] Bluetooth: hci_uart: Add BCM specific UART speed management Frederic Danis

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=551E9987.9050800@hurleysoftware.com \
    --to=peter@hurleysoftware.com \
    --cc=frederic.danis@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-bluetooth@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.