All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] Bluetooth: btusb: Update firmware filename for Intel 9x60 and,later
  2017-09-12 12:55 [PATCH] Bluetooth: btusb: Update firmware filename for Intel 9x60 and,later jaya.p.g
@ 2017-09-12  7:20 ` Marcel Holtmann
  2017-10-30 10:31 ` Johan Hedberg
  1 sibling, 0 replies; 3+ messages in thread
From: Marcel Holtmann @ 2017-09-12  7:20 UTC (permalink / raw)
  To: jaya.p.g
  Cc: linux-bluetooth, An, Tedd, anand.kalyanakrishnan,
	ravishankar.srivatsa, amit.k.bag, sukumar.ghorai

Hi Jaya,

> The format of Intel Bluetooth firmware for bootloader product is
> ibt-<hw_variant>-<device_revision_id>.sfi and .ddc.
> 
> But for the SKU's 9x60, there a 3 variants of FW, which cannot be
> differentiated just with hw_variant and devision_revision_id.
> So to pick the appropriate FW file for 9x60 SKU's, it will be
> differentiated using hw_variant, hw_revision and fw_revision rather
> than hw_variant and device_revision_id only.
> 
> Format will be like this:
> ibt-<hw_variant>-<hw_revision>-<fw_revision>.sfi and .ddc
> 
> Signed-off-by: Jaya P G <jaya.p.g@intel.com>
> ---
> drivers/bluetooth/btusb.c | 40 +++++++++++++++++++++++++++++++---------
> 1 file changed, 31 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> index 7a5c06a..370cc22 100644
> --- a/drivers/bluetooth/btusb.c
> +++ b/drivers/bluetooth/btusb.c
> @@ -2151,20 +2151,36 @@ static int btusb_setup_intel_new(struct hci_dev *hdev)
> 	}
> 
> 	/* With this Intel bootloader only the hardware variant and device
> -	 * revision information are used to select the right firmware.
> +	 * revision information are used to select the right firmware for SfP
> +	 * and WsP.
> 	 *
> 	 * The firmware filename is ibt-<hw_variant>-<dev_revid>.sfi.
> 	 *
> 	 * Currently the supported hardware variants are:
> 	 *   11 (0x0b) for iBT3.0 (LnP/SfP)
> 	 *   12 (0x0c) for iBT3.5 (WsP)
> +	 *
> +	 * For ThP/JfP and for future SKU's, the FW name varies based on HW
> +	 * variant, HW revision and FW revision, as these are dependent on CNVi
> +	 * and RF Combination.
> +	 *
> 	 *   17 (0x11) for iBT3.5 (JfP)
> 	 *   18 (0x12) for iBT3.5 (ThP)
> +	 *
> +	 * The firmware file name for these will be
> +	 * ibt-<hw_variant>-<hw_revision>-<fw_revision>.sfi.
> +	 *
> 	 */

can you send me the btmon binary traces that include the version information. One from bootloader and also from operational firmware. With the firmware issue currently discussed, we need to make sure that we can find the right firmware name based on information provided by the bootloader, but also from operational firmware.

I frankly don’t like including fw_revision in here. We should solely build the name based on hardware information.

Regards

Marcel


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] Bluetooth: btusb: Update firmware filename for Intel 9x60 and,later
@ 2017-09-12 12:55 jaya.p.g
  2017-09-12  7:20 ` Marcel Holtmann
  2017-10-30 10:31 ` Johan Hedberg
  0 siblings, 2 replies; 3+ messages in thread
From: jaya.p.g @ 2017-09-12 12:55 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: jaya.p.g, jaya.p.g, An, Tedd, anand.kalyanakrishnan,
	ravishankar.srivatsa, amit.k.bag, sukumar.ghorai

From: Jaya P G <jaya.p.g@intel.com>
Date: Wed, 6 Sep 2017 19:51:26 +0530
Subject: [PATCH] Bluetooth: btusb: Update firmware filename for Intel 9x60 and
 later

The format of Intel Bluetooth firmware for bootloader product is
ibt-<hw_variant>-<device_revision_id>.sfi and .ddc.

But for the SKU's 9x60, there a 3 variants of FW, which cannot be
differentiated just with hw_variant and devision_revision_id.
So to pick the appropriate FW file for 9x60 SKU's, it will be
differentiated using hw_variant, hw_revision and fw_revision rather
than hw_variant and device_revision_id only.

Format will be like this:
ibt-<hw_variant>-<hw_revision>-<fw_revision>.sfi and .ddc

Signed-off-by: Jaya P G <jaya.p.g@intel.com>
---
 drivers/bluetooth/btusb.c | 40 +++++++++++++++++++++++++++++++---------
 1 file changed, 31 insertions(+), 9 deletions(-)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 7a5c06a..370cc22 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -2151,20 +2151,36 @@ static int btusb_setup_intel_new(struct hci_dev *hdev)
 	}
 
 	/* With this Intel bootloader only the hardware variant and device
-	 * revision information are used to select the right firmware.
+	 * revision information are used to select the right firmware for SfP
+	 * and WsP.
 	 *
 	 * The firmware filename is ibt-<hw_variant>-<dev_revid>.sfi.
 	 *
 	 * Currently the supported hardware variants are:
 	 *   11 (0x0b) for iBT3.0 (LnP/SfP)
 	 *   12 (0x0c) for iBT3.5 (WsP)
+	 *
+	 * For ThP/JfP and for future SKU's, the FW name varies based on HW
+	 * variant, HW revision and FW revision, as these are dependent on CNVi
+	 * and RF Combination.
+	 *
 	 *   17 (0x11) for iBT3.5 (JfP)
 	 *   18 (0x12) for iBT3.5 (ThP)
+	 *
+	 * The firmware file name for these will be
+	 * ibt-<hw_variant>-<hw_revision>-<fw_revision>.sfi.
+	 *
 	 */
-	snprintf(fwname, sizeof(fwname), "intel/ibt-%u-%u.sfi",
-		 le16_to_cpu(ver.hw_variant),
-		 le16_to_cpu(params->dev_revid));
-
+	if (ver.hw_variant >= 0x11) {
+		snprintf(fwname, sizeof(fwname), "intel/ibt-%u-%u-%u.sfi",
+			 le16_to_cpu(ver.hw_variant),
+			 le16_to_cpu(ver.hw_revision),
+			 le16_to_cpu(ver.fw_revision));
+	} else {
+		snprintf(fwname, sizeof(fwname), "intel/ibt-%u-%u.sfi",
+			 le16_to_cpu(ver.hw_variant),
+			 le16_to_cpu(params->dev_revid));
+	}
 	err = request_firmware(&fw, fwname, &hdev->dev);
 	if (err < 0) {
 		BT_ERR("%s: Failed to load Intel firmware file (%d)",
@@ -2178,10 +2194,16 @@ static int btusb_setup_intel_new(struct hci_dev *hdev)
 	/* Save the DDC file name for later use to apply once the firmware
 	 * downloading is done.
 	 */
-	snprintf(fwname, sizeof(fwname), "intel/ibt-%u-%u.ddc",
-		 le16_to_cpu(ver.hw_variant),
-		 le16_to_cpu(params->dev_revid));
-
+	if (ver.hw_variant >= 0x11) {
+		snprintf(fwname, sizeof(fwname), "intel/ibt-%u-%u-%u.ddc",
+			 le16_to_cpu(ver.hw_variant),
+			 le16_to_cpu(ver.hw_revision),
+			 le16_to_cpu(ver.fw_revision));
+	} else {
+		snprintf(fwname, sizeof(fwname), "intel/ibt-%u-%u.ddc",
+			 le16_to_cpu(ver.hw_variant),
+			 le16_to_cpu(params->dev_revid));
+	}
 	kfree_skb(skb);
 
 	if (fw->size < 644) {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Bluetooth: btusb: Update firmware filename for Intel 9x60 and,later
  2017-09-12 12:55 [PATCH] Bluetooth: btusb: Update firmware filename for Intel 9x60 and,later jaya.p.g
  2017-09-12  7:20 ` Marcel Holtmann
@ 2017-10-30 10:31 ` Johan Hedberg
  1 sibling, 0 replies; 3+ messages in thread
From: Johan Hedberg @ 2017-10-30 10:31 UTC (permalink / raw)
  To: jaya.p.g
  Cc: linux-bluetooth, An, Tedd, anand.kalyanakrishnan,
	ravishankar.srivatsa, amit.k.bag, sukumar.ghorai

Hi Jaya,

On Tue, Sep 12, 2017, jaya.p.g wrote:
> From: Jaya P G <jaya.p.g@intel.com>
> Date: Wed, 6 Sep 2017 19:51:26 +0530
> Subject: [PATCH] Bluetooth: btusb: Update firmware filename for Intel 9x60 and
>  later
> 
> The format of Intel Bluetooth firmware for bootloader product is
> ibt-<hw_variant>-<device_revision_id>.sfi and .ddc.
> 
> But for the SKU's 9x60, there a 3 variants of FW, which cannot be
> differentiated just with hw_variant and devision_revision_id.
> So to pick the appropriate FW file for 9x60 SKU's, it will be
> differentiated using hw_variant, hw_revision and fw_revision rather
> than hw_variant and device_revision_id only.
> 
> Format will be like this:
> ibt-<hw_variant>-<hw_revision>-<fw_revision>.sfi and .ddc
> 
> Signed-off-by: Jaya P G <jaya.p.g@intel.com>
> ---
>  drivers/bluetooth/btusb.c | 40 +++++++++++++++++++++++++++++++---------
>  1 file changed, 31 insertions(+), 9 deletions(-)

Applied to bluetooth-next. Thanks.

Johan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-10-30 10:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-12 12:55 [PATCH] Bluetooth: btusb: Update firmware filename for Intel 9x60 and,later jaya.p.g
2017-09-12  7:20 ` Marcel Holtmann
2017-10-30 10:31 ` Johan Hedberg

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.