From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757484AbcEEPap (ORCPT ); Thu, 5 May 2016 11:30:45 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:10411 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756147AbcEEPao convert rfc822-to-8bit (ORCPT ); Thu, 5 May 2016 11:30:44 -0400 From: Amitkumar Karwar To: One Thousand Gnomes CC: "linux-bluetooth@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Ganapathi Bhat , Cathy Luo Subject: RE: [PATCH v10 1/3] Bluetooth: hci_uart: add prepare callbacks to hci_uart_proto structure. Thread-Topic: [PATCH v10 1/3] Bluetooth: hci_uart: add prepare callbacks to hci_uart_proto structure. Thread-Index: AQHRpuAkeKchPo+m9kqoSbIIrQy9TZ+q6oUA//+LgRA= Date: Thu, 5 May 2016 15:27:42 +0000 Message-ID: <55b348bd1f384dfaac8d8850127df018@SC-EXCH04.marvell.com> References: <1462460902-25439-1-git-send-email-akarwar@marvell.com> <20160505161906.14267bd0@lxorguk.ukuu.org.uk> In-Reply-To: <20160505161906.14267bd0@lxorguk.ukuu.org.uk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.93.176.43] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-05-05_10:,, signatures=0 X-Proofpoint-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1603290000 definitions=main-1605050221 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 wrote: > > > From: Ganapathi Bhat > > > > 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