All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Amitkumar Karwar <akarwar@marvell.com>
Cc: Linux Bluetooth <linux-bluetooth@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Ganapathi Bhat <gbhat@marvell.com>, Cathy Luo <cluo@marvell.com>
Subject: Re: [PATCH v7] Bluetooth: hci_uart: Support firmware download for Marvell
Date: Fri, 22 Apr 2016 14:49:09 +0200	[thread overview]
Message-ID: <E16A47DE-611D-4C65-B407-1D78280308B4@holtmann.org> (raw)
In-Reply-To: <2119fc93636742459899d50f2c1fcb8d@SC-EXCH04.marvell.com>

Hi Amitkumar,

>>>> +
>>>> +static int mrvl_setup(struct hci_uart *hu) {
>>>> +	struct mrvl_data *mrvl = hu->priv;
>>>> +
>>>> +	mrvl_init_fw_data(hu);
>>>> +	set_bit(HCI_UART_DNLD_FW, &mrvl->flags);
>>>> +
>>>> +	return hci_uart_dnld_fw(hu);
>>>> +}
>>> 
>>> So this is clearly the wrong spot. When ->setup is called it is
>>> expected that HCI is ready. You are misusing it here.
>>> 
>> 
>> Sure. We will move this to mrvl_open() where HCI is not yet initialized.
> 
> We tried moving firmware download to mrvl_open(), but it's not feasible. "hu->proto" is not yet initialized at that time. So when the data/ack is received during firmware download, we can't have Marvell specific handling. Also, I can see other vendor's (broadcomm, Intel) have done firmware download in setup handler.

firmware download in ->setup() is fine as long as it uses HCI commands. If it does not use HCI commands, then we need to come up with something new.

The problem here is that for all intense and purposes once ->setup() is called, then assumption is that you are in an HCI capable transport and it is ready.

Regards

Marcel

  reply	other threads:[~2016-04-22 12:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-05  8:34 [PATCH v7] Bluetooth: hci_uart: Support firmware download for Marvell Amitkumar Karwar
2016-04-12 14:57 ` Amitkumar Karwar
2016-04-12 16:17   ` Marcel Holtmann
2016-04-12 16:52     ` Amitkumar Karwar
2016-04-18 10:51     ` Amitkumar Karwar
2016-04-20 13:12 ` Marcel Holtmann
2016-04-20 14:34   ` Amitkumar Karwar
2016-04-20 14:34     ` Amitkumar Karwar
2016-04-20 14:42     ` Marcel Holtmann
2016-04-22 11:24   ` Amitkumar Karwar
2016-04-22 11:24     ` Amitkumar Karwar
2016-04-22 12:49     ` Marcel Holtmann [this message]
2016-04-22 15:01       ` Amitkumar Karwar
2016-04-22 15:01         ` Amitkumar Karwar
2016-04-26 10:39       ` Amitkumar Karwar
2016-04-26 10:39         ` Amitkumar Karwar

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=E16A47DE-611D-4C65-B407-1D78280308B4@holtmann.org \
    --to=marcel@holtmann.org \
    --cc=akarwar@marvell.com \
    --cc=cluo@marvell.com \
    --cc=gbhat@marvell.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@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.