[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7a96f0ab0acb4b97a4590ba037cc8dd2@SC-EXCH04.marvell.com>
Date: Wed, 4 May 2016 14:40:10 +0000
From: Amitkumar Karwar <akarwar@...vell.com>
To: Marcel Holtmann <marcel@...tmann.org>
CC: "linux-bluetooth@...r.kernel.org" <linux-bluetooth@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Ganapathi Bhat <gbhat@...vell.com>
Subject: RE: [PATCH v9 3/3] Bluetooth: hci_uart: Support firmware download for
Marvell
Hi Marcel,
Thanks for your comments.
We are working to resolve them.
> > +
> > +/* Receive data */
> > +static int mrvl_recv(struct hci_uart *hu, const void *data, int
> > +count) {
> > + struct mrvl_data *mrvl = hu->priv;
> > +
> > + if (test_bit(HCI_UART_DNLD_FW, &mrvl->flags)) {
> > + mrvl->fwdata->skb = mrvl_process_fw_data(hu, mrvl->fwdata-
> >skb,
> > + (u8 *)data, count);
> > + if (IS_ERR(mrvl->fwdata->skb)) {
> > + int err = PTR_ERR(mrvl->fwdata->skb);
> > +
> > + bt_dev_err(hu->hdev,
> > + "Receive firmware data failed (%d)", err);
> > + mrvl->fwdata->skb = NULL;
> > + return err;
> > + }
> > + return 0;
> > + }
>
> So I really want to get rid of this part in the driver ->recv should be
> kept compartmentalized between before HCI is ready and when HCI is
> ready.
>
We already have HCI_UART_REGISTERED bit in "hu->flags". I think, we can use it to know if HCI is ready or not.
We will define two recv handlers. "->recv" and "->recv_for_prepare"
OR let us know if you want us to use single "->recv" and have code under "if (HCI_UART_REGISTERED)" and "else" in our handler.
Regards,
Amitkumar
Powered by blists - more mailing lists