Linux-Bluetooth Archive on lore.kernel.org
 help / color / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Sebastian Reichel <sre@kernel.org>
Cc: "Arthur D." <spinal.by@gmail.com>,
	linux-bluetooth@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-wireless@vger.kernel.org
Subject: Re: Droid 4 WiFi firmware loading error
Date: Fri, 14 Feb 2020 09:45:48 -0800
Message-ID: <20200214174548.GC64767@atomide.com> (raw)
In-Reply-To: <20200214161100.b7aqb6wwsrxmx4ab@earth.universe>

* Sebastian Reichel <sre@kernel.org> [200214 17:20]:
> Hi,
> 
> WTF :(
> 
> Right now the BT driver and the WiFi driver are no aware of
> each other. Actually the kernel is not even aware, that both
> drivers are using the same chip. Unfortunately this will be
> tricky to solve properly. Since a system may have two WiLink
> devices, the only solution coming to my mind would be adding
> a link from the BT device to the WiFi device in device tree.
> Additionally we would need something in the WiLink driver to
> check if driver has been initialized properly for a given DT
> node.

Yeah exactly.. I think the best way would be to export something
like wlcore_register_bt/wlcore_unregister_bt.. And then have
wlcore_register_bt return -EAGAIN until wlcore is up.

> On Fri, Feb 14, 2020 at 12:54:50AM +0300, Arthur D. wrote:
> > Hello.
> > 
> > Some users have reported that they have issues with WiFi firmware
> > loading on Droid 4. The fragment of dmesg for the issue follows
> > at the bottom of this mail.
> > 
> > With the help of Tony Lindgren I have found that the root of the
> > issue was Bluetooth firmware loaded before WiFi driver (wlcore).
> > 
> > Now we need to change the kernel to make it load Bluetooth firmware
> > only after WiFi firmware is loaded. So the bug will not be triggered.
> > 
> > Any ideas on how it should be done?
> > 
> > P.S. When I do "rmmod hci_uart" on Droid 4 device, I get something
> > like endless loop of error reporting from kernel. The fragment of
> > dmesg can be downloaded from https://dropmefiles.com/wCPMF
> > I'm not sure where to report this one.

Yup I've seen rmmod hci_uart produce kernel oops, but I just tried
to reproduce it again on v5.5 and it just took a long time to rmmod
with no oops.

Regards,

Tony

8< ---------------
# dmesg -C; modprobe hci_uart; sleep 5; rmmod hci_uart; dmesg -c
[  616.926422] Bluetooth: HCI UART driver ver 2.3
[  616.926422] Bluetooth: HCI UART protocol H4 registered
[  616.926422] Bluetooth: HCI UART protocol BCSP registered
[  616.926513] Bluetooth: HCI UART protocol LL registered
[  616.926635] Bluetooth: HCI UART protocol Three-wire (H5) registered
[  616.927185] Bluetooth: HCI UART protocol Broadcom registered
[  616.927764] hci-ti serial1-0: GPIO lookup for consumer enable
[  616.927764] hci-ti serial1-0: using device tree for GPIO lookup
[  616.927856] of_get_named_gpiod_flags: parsed 'enable-gpios' property of node '/ocp/interconnect@48000000/segment@0/target-module@6e000/serial@0/bluetooth[0]' - status (0)
[  616.927886] gpio gpiochip6: Persistence not supported for GPIO 14
[  624.002838] Bluetooth: hci0: command 0xff05 tx timeout
[  632.572662] Bluetooth: hci0: send command failed
[  632.572814] Bluetooth: hci0: download firmware failed, retrying...
[  634.722991] Bluetooth: hci0: command 0x1001 tx timeout
[  642.812652] Bluetooth: hci0: Reading TI version information failed (-110)
[  642.812652] Bluetooth: hci0: download firmware failed, retrying...
[  644.962707] Bluetooth: hci0: command 0x1001 tx timeout
[  653.043151] Bluetooth: hci0: Reading TI version information failed (-110)
[  653.043182] Bluetooth: hci0: download firmware failed, retrying...
[  655.203582] Bluetooth: hci0: command 0x1001 tx timeout
[  663.294372] Bluetooth: hci0: Reading TI version information failed (-110)
[  663.294464] Bluetooth: hci0: download firmware failed, retrying...

  reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <op.0fudjzcyhxa7s4@supervisor.net28>
     [not found] ` <20200211214705.GD16391@atomide.com>
     [not found]   ` <op.0fuie5cdhxa7s4@supervisor.net28>
     [not found]     ` <20200211232425.GE16391@atomide.com>
     [not found]       ` <op.0fu85owhhxa7s4@supervisor.net28>
     [not found]         ` <20200212150722.GF16391@atomide.com>
     [not found]           ` <20200212162131.GI16391@atomide.com>
     [not found]             ` <op.0fwkyxvihxa7s4@supervisor.net28>
     [not found]               ` <20200213041112.GL16391@atomide.com>
     [not found]                 ` <op.0fw0oas5hxa7s4@supervisor.net28>
     [not found]                   ` <20200213161157.GN16391@atomide.com>
2020-02-13 21:54                     ` Arthur D.
2020-02-14 16:11                       ` Sebastian Reichel
2020-02-14 17:45                         ` Tony Lindgren [this message]
2020-02-14 18:23                           ` Marcel Holtmann
2020-02-18 15:38                             ` Merlijn Wajer

Reply instructions:

You may reply publically 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=20200214174548.GC64767@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=spinal.by@gmail.com \
    --cc=sre@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

Linux-Bluetooth Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-bluetooth/0 linux-bluetooth/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-bluetooth linux-bluetooth/ https://lore.kernel.org/linux-bluetooth \
		linux-bluetooth@vger.kernel.org
	public-inbox-index linux-bluetooth

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-bluetooth


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git