Skip to content

Commit 2684dd6

Browse files
NeerajSanjayKaleVudentz
authored andcommitted
Bluetooth: btnxpuart: Enable status prints for firmware download
This enables prints for firmware download which can help automation tests to verify firmware download functionality. dmesg logs before: modprobe btnxpuart [ 1999.187264] Bluetooth: MGMT ver 1.22 dmesg logs with this patch: modprobe btnxpuart [16179.758515] Bluetooth: hci0: ChipID: 7601, Version: 0 [16179.764748] Bluetooth: hci0: Request Firmware: nxp/uartspi_n61x_v1.bin.se [16181.217490] Bluetooth: hci0: FW Download Complete: 372696 bytes [16182.701398] Bluetooth: MGMT ver 1.22 Signed-off-by: Neeraj Sanjay Kale <[email protected]> Tested-by: Guillaume Legoupil <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent c68bbf5 commit 2684dd6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

drivers/bluetooth/btnxpuart.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ static int nxp_request_firmware(struct hci_dev *hdev, const char *fw_name)
693693
if (!strlen(nxpdev->fw_name)) {
694694
snprintf(nxpdev->fw_name, MAX_FW_FILE_NAME_LEN, "%s", fw_name);
695695

696-
bt_dev_dbg(hdev, "Request Firmware: %s", nxpdev->fw_name);
696+
bt_dev_info(hdev, "Request Firmware: %s", nxpdev->fw_name);
697697
err = request_firmware(&nxpdev->fw, nxpdev->fw_name, &hdev->dev);
698698
if (err < 0) {
699699
bt_dev_err(hdev, "Firmware file %s not found", nxpdev->fw_name);
@@ -781,7 +781,7 @@ static int nxp_recv_fw_req_v1(struct hci_dev *hdev, struct sk_buff *skb)
781781
}
782782

783783
if (!len) {
784-
bt_dev_dbg(hdev, "FW Downloaded Successfully: %zu bytes",
784+
bt_dev_info(hdev, "FW Download Complete: %zu bytes",
785785
nxpdev->fw->size);
786786
if (nxp_data->helper_fw_name && !nxpdev->helper_downloaded) {
787787
nxpdev->helper_downloaded = true;
@@ -890,6 +890,7 @@ static int nxp_recv_chip_ver_v3(struct hci_dev *hdev, struct sk_buff *skb)
890890

891891
chip_id = le16_to_cpu(req->chip_id);
892892
loader_ver = req->loader_ver;
893+
bt_dev_info(hdev, "ChipID: %04x, Version: %d", chip_id, loader_ver);
893894
if (!nxp_request_firmware(hdev, nxp_get_fw_name_from_chipid(hdev,
894895
chip_id, loader_ver)))
895896
nxp_send_ack(NXP_ACK_V3, hdev);
@@ -934,7 +935,7 @@ static int nxp_recv_fw_req_v3(struct hci_dev *hdev, struct sk_buff *skb)
934935
}
935936

936937
if (req->len == 0) {
937-
bt_dev_dbg(hdev, "FW Downloaded Successfully: %zu bytes",
938+
bt_dev_info(hdev, "FW Download Complete: %zu bytes",
938939
nxpdev->fw->size);
939940
clear_bit(BTNXPUART_FW_DOWNLOADING, &nxpdev->tx_state);
940941
wake_up_interruptible(&nxpdev->fw_dnld_done_wait_q);
@@ -1037,7 +1038,7 @@ static int nxp_setup(struct hci_dev *hdev)
10371038
if (err < 0)
10381039
return err;
10391040
} else {
1040-
bt_dev_dbg(hdev, "FW already running.");
1041+
bt_dev_info(hdev, "FW already running.");
10411042
clear_bit(BTNXPUART_FW_DOWNLOADING, &nxpdev->tx_state);
10421043
}
10431044

0 commit comments

Comments
 (0)