Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1395191

RE: [PATCH v10 1/3] Bluetooth: hci_uart: add prepare callbacks to hci_uart_proto structure.

From Amitkumar Karwar <akarwar@marvell.com>
Newsgroups linux.kernel
Subject RE: [PATCH v10 1/3] Bluetooth: hci_uart: add prepare callbacks to hci_uart_proto structure.
Date 2016-05-05 17:40 +0200
Message-ID <rvtxE-2sD-9@gated-at.bofh.it> (permalink)
References <rvt4C-2cn-21@gated-at.bofh.it> <rvtei-2h4-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Alan,

> From: linux-bluetooth-owner@vger.kernel.org [mailto:linux-bluetooth-
> owner@vger.kernel.org] On Behalf Of One Thousand Gnomes
> Sent: Thursday, May 05, 2016 8:49 PM
> To: Amitkumar Karwar
> Cc: linux-bluetooth@vger.kernel.org; linux-kernel@vger.kernel.org;
> Ganapathi Bhat
> Subject: Re: [PATCH v10 1/3] Bluetooth: hci_uart: add prepare callbacks
> to hci_uart_proto structure.
> 
> On Thu, 5 May 2016 08:08:20 -0700
> Amitkumar Karwar <akarwar@marvell.com> wrote:
> 
> > From: Ganapathi Bhat <gbhat@marvell.com>
> >
> > The new callback is used to prepare the device before HCI becomes
> > ready. One can use this to download firmware if the download process
> > doesn't use HCI commands. Also recv_for_prepare callback is introduced
> > for receiving data from devices during prepare phase.
> 
> If your device is not speaking HCI protocol then instead of hackig up
> the HCI ldisc would it not make more sense to have a tiny ldisc for your
> firmware loader instead of adding crap to the fast paths of what is
> currently a clean properly separated out interface ?
> 

Below is the code change. It won't add any overhead for existing receive path. 

-       if (!test_bit(HCI_UART_PROTO_READY, &hu->flags))
+       if (!test_bit(HCI_UART_PROTO_READY, &hu->flags)) {
+               if (hu->proto->recv_for_prepare)
+                       hu->proto->recv_for_prepare(hu, data, count);
                return;
+       }

Regards,
Amitkumar

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v10 1/3] Bluetooth: hci_uart: add prepare callbacks to hci_uart_proto structure. Amitkumar Karwar <akarwar@marvell.com> - 2016-05-05 17:10 +0200
  [PATCH v10 2/3] Bluetooth: hci_uart: check if hdev is present before using it Amitkumar Karwar <akarwar@marvell.com> - 2016-05-05 17:10 +0200
  Re: [PATCH v10 1/3] Bluetooth: hci_uart: add prepare callbacks to  hci_uart_proto structure. One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> - 2016-05-05 17:20 +0200
    RE: [PATCH v10 1/3] Bluetooth: hci_uart: add prepare callbacks to  hci_uart_proto structure. Amitkumar Karwar <akarwar@marvell.com> - 2016-05-05 17:40 +0200
  [PATCH v10 3/3] Bluetooth: hci_uart: Support firmware download for Marvell Amitkumar Karwar <akarwar@marvell.com> - 2016-05-05 17:20 +0200
    Re: [PATCH v10 3/3] Bluetooth: hci_uart: Support firmware download  for Marvell One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> - 2016-05-05 17:30 +0200
      RE: [PATCH v10 3/3] Bluetooth: hci_uart: Support firmware download  for Marvell Amitkumar Karwar <akarwar@marvell.com> - 2016-05-05 17:40 +0200

csiph-web