public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: "An, Tedd" <tedd.an@intel.com>
To: "marcel@holtmann.org" <marcel@holtmann.org>
Cc: "hj.tedd.an@gmail.com" <hj.tedd.an@gmail.com>,
	"linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>
Subject: Re: [RFC PATCH v2] Bluetooth: btintel: Fix broken LED quirk for legacy ROM devices
Date: Sat, 25 Dec 2021 01:18:10 +0000	[thread overview]
Message-ID: <20f68eb75538796fb0e69b45543e151b3fd04bae.camel@intel.com> (raw)
In-Reply-To: <6EBC0BA5-E39D-4C9F-849D-C7972BDD9582@holtmann.org>

Hi Marcel,

On Thu, 2021-12-23 at 22:24 +0100, Marcel Holtmann wrote:
> 
> but we succeed with HCI_Intel_Read_Version on a cold boot. So that means it is just that we have to make this one flag persistent. So it is valid even when no HCI_Intel_Read_Version is read. Or just
> make it a bool variable in the btintel internal struct.
> 

Yes, there is no problem with cold boot. The problem is warm boot. Here are the log after making the changes with some debug messages.

[COLD BOOT]

Dec 24 16:16:27 han1-XPS-13-9350 kernel: microcode: microcode updated early to revision 0xea, date = 2021-01-25
Dec 24 16:16:27 han1-XPS-13-9350 kernel: Linux version 5.16.0-rc1+ (han1@han1-XPS-13-9350) (gcc (Ubuntu 11.2.0-7ubuntu2) 11.2.0, GNU ld (GNU Binutils for Ubuntu) 2.37) #1 SMP PREEMPT Thu Dec 23
20:52:12 PST 2021

Dec 24 16:16:27 han1-XPS-13-9350 kernel: usb 1-3: new full-speed USB device number 2 using xhci_hcd
Dec 24 16:16:27 han1-XPS-13-9350 kernel: usb 1-3: New USB device found, idVendor=8087, idProduct=0a2a, bcdDevice= 0.01
Dec 24 16:16:27 han1-XPS-13-9350 kernel: usb 1-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0

Dec 24 16:16:28 han1-XPS-13-9350 kernel: Bluetooth: Core ver 2.22

Dec 24 16:16:28 han1-XPS-13-9350 kernel: Bluetooth: >>>>> btusb_probe: intf 00000000074889f5 id 00000000c09ad578
Dec 24 16:16:28 han1-XPS-13-9350 kernel: Bluetooth: >>>>> Allocate hci_dev=00000000a477ec45
Dec 24 16:16:28 han1-XPS-13-9350 kernel: Bluetooth: >>>>> Set hci_set_drvdata(hdev=00000000a477ec45, data=0000000077ec88bc)
Dec 24 16:16:28 han1-XPS-13-9350 kernel: usbcore: registered new interface driver btusb
Dec 24 16:16:28 han1-XPS-13-9350 kernel: Bluetooth: >>>>> btintel_setup_combined(hdev=00000000a477ec45)
Dec 24 16:16:28 han1-XPS-13-9350 kernel: Bluetooth: >>>>> Test flag(hdev=00000000a477ec45, INTEL_SHUTDOWN_EXECUTED)
Dec 24 16:16:28 han1-XPS-13-9350 kernel: Bluetooth: >>>>>      INTEL_SHUTDOWN_EXECUTED is NOT SET
Dec 24 16:16:28 han1-XPS-13-9350 kernel: Bluetooth: hci0: Legacy ROM 2.5 revision 1.0 build 3 week 17 2014
Dec 24 16:16:28 han1-XPS-13-9350 kernel: Bluetooth: hci0: Intel Bluetooth firmware file: intel/ibt-hw-37.8.10-fw-1.10.3.11.e.bseq
Dec 24 16:16:28 han1-XPS-13-9350 kernel: Bluetooth: hci0: unexpected event 0xff length: 2 > 0
Dec 24 16:16:28 han1-XPS-13-9350 kernel: Bluetooth: hci0: Intel BT fw patch 0x32 completed & activated

[HCI DOWN]

Dec 24 16:17:19 han1-XPS-13-9350 kernel: Bluetooth: >>>>> btintel_shutdown_combined(hdev=00000000a477ec45)
Dec 24 16:17:19 han1-XPS-13-9350 kernel: Bluetooth: >>>>> Send HCI_Intel_SWRFKILL
Dec 24 16:17:19 han1-XPS-13-9350 kernel: Bluetooth: >>>>> Set INTEL_SHUTDOWN_EXECUTED

Dec 24 16:17:35 han1-XPS-13-9350 systemd-shutdown[1]: Sending SIGTERM to remaining processes...

[REBOOT...]

Dec 24 16:18:40 han1-XPS-13-9350 kernel: usb 1-3: new full-speed USB device number 2 using xhci_hcd
Dec 24 16:18:40 han1-XPS-13-9350 kernel: usb 1-3: New USB device found, idVendor=8087, idProduct=0a2a, bcdDevice= 0.01
Dec 24 16:18:40 han1-XPS-13-9350 kernel: usb 1-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0

Dec 24 16:18:41 han1-XPS-13-9350 kernel: Bluetooth: Core ver 2.22

Dec 24 16:18:41 han1-XPS-13-9350 kernel: Bluetooth: >>>>> btusb_probe: intf 0000000016d7e789 id 0000000058418b5d
Dec 24 16:18:41 han1-XPS-13-9350 kernel: Bluetooth: >>>>> Allocate hci_dev=0000000052758830
Dec 24 16:18:41 han1-XPS-13-9350 kernel: Bluetooth: >>>>> Set hci_set_drvdata(hdev=0000000052758830, data=0000000074e43445)
Dec 24 16:18:41 han1-XPS-13-9350 kernel: usbcore: registered new interface driver btusb
Dec 24 16:18:41 han1-XPS-13-9350 kernel: Bluetooth: >>>>> btintel_setup_combined(hdev=0000000052758830)
Dec 24 16:18:41 han1-XPS-13-9350 kernel: Bluetooth: >>>>> Test flag(hdev=0000000052758830, INTEL_SHUTDOWN_EXECUTED)
Dec 24 16:18:41 han1-XPS-13-9350 kernel: Bluetooth: >>>>>      INTEL_SHUTDOWN_EXECUTED is NOT SET

Dec 24 16:18:43 han1-XPS-13-9350 kernel: Bluetooth: hci0: Reading Intel version command failed (-110)
Dec 24 16:18:43 han1-XPS-13-9350 kernel: Bluetooth: hci0: command tx timeout


After [REBOOT], the INTEL_SHUTDOWN_EXECUTED flag that was set before the reboot is gone. 
So, how can I make the flag persisten between rebooting the system?

> I am failing to see why this wouldn’t work. And I fully realize that I am pedantic here, but I really want to confine these things to internal handling and not have them bleed into the driver.
> 
> Regards
> 
> Marcel
> 


  reply	other threads:[~2021-12-25  1:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-16 21:09 [RFC PATCH v2] Bluetooth: btintel: Fix broken LED quirk for legacy ROM devices Tedd Ho-Jeong An
2021-12-17  0:47 ` Luiz Augusto von Dentz
2021-12-17  2:47   ` An, Tedd
2021-12-17 19:31     ` Luiz Augusto von Dentz
2021-12-22  8:06 ` Marcel Holtmann
2021-12-22 22:52   ` An, Tedd
2021-12-22 23:08     ` Marcel Holtmann
2021-12-23  7:03       ` An, Tedd
2021-12-23  8:36         ` Marcel Holtmann
2021-12-23 20:30           ` An, Tedd
2021-12-23 21:24             ` Marcel Holtmann
2021-12-25  1:18               ` An, Tedd [this message]
2022-01-06 20:57                 ` Marcel Holtmann
2022-01-06 21:02 ` Marcel Holtmann

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=20f68eb75538796fb0e69b45543e151b3fd04bae.camel@intel.com \
    --to=tedd.an@intel.com \
    --cc=hj.tedd.an@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox