Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp3135648lqo; Wed, 15 May 2024 00:09:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWEB1t6Aao0oRbwKMcNdDe2HM8SXZBeY35YrjAatNtX4LkVeSbMZiFk+odvMt0MHc4imtVepwJE9JcjLyaCN46hrz9wn+LFBwoL92uOmw== X-Google-Smtp-Source: AGHT+IGm7MJRgWe5EndaGqCNLdLEuuos1D+mkGICni3nxj+TQZToEg21bYU7nTFc3FN8yZoW5nLq X-Received: by 2002:a05:6214:448c:b0:69b:a42:5c85 with SMTP id 6a1803df08f44-6a16819ef55mr178665546d6.30.1715756960242; Wed, 15 May 2024 00:09:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715756960; cv=pass; d=google.com; s=arc-20160816; b=KyWkP8rDESfbNNwvllv/a/dANW1pmFsG7HGwPDe/1OVfBqxMCWNg+7HyV7PXkT8lWv tsD9ztsgGuR6kYj9j4iTWJthR9j/WdmR35lvKXc6mDKFEC9zL3mQIZuiGSm4GwpksX/8 bmXoqes71dafwFZrJQN5F7qb3FMtHRDKCqhIrt89AE2jD6YNkg5Mut8gLMFUsypc8WX0 kJ80wnuyQj8cvhDyqO/KVAp4Ck0/NDr+9Fuav5ZjgC5DupkJs4xKWpJ4dMlCBFa3RIz4 CWtW6CtA3dtchKjttZJUYHby8SlvNgsF1N0INkLu5chyq/C+ajBP1fujA6Q7XnGzZBXL vXMQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=OhIbEhfKxticw8rrSftDqptSaq6z4bY9MR0So+PCiwo=; fh=OAAB7yCKw6RAEYmoRWACZMm4UlKNgD8SI87JHwO9WZk=; b=Qxl69fw4+VBePKBefAarBIqmBHGFEo3PV+t1YgQhKdrCAs4U8ofKZQPe5QEAq24x0J AzIb2FYU+20Md1mSy7D0yWsPtfHCHxqeZ55P2K290Gz2NKRFZmQQ1Gpb96giH7erWmhl eRa5ouxBNWja/6FfODIaqJKmTt1TvVizde8e2os7lJzikomj9uDXCdcLVhH31oTOYkil i1gASQhh41yG37KfOGJ4ljzshrTbPlD+ymwF7Akt09M/nJJz+WZpuqYL3wcuE7DCZJTa 6PW4nx2GxeOUCMtqAZ4C37+tJiEU4qKHaD1TY5z7knWHYY0VWldkZSoO5iJoosbtJcCw PNeA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-bluetooth+bounces-4636-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4636-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f2b721esi137117246d6.407.2024.05.15.00.09.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 00:09:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-4636-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-bluetooth+bounces-4636-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4636-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id F18E61C21B82 for ; Wed, 15 May 2024 07:09:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DA85C4503B; Wed, 15 May 2024 07:09:04 +0000 (UTC) X-Original-To: linux-bluetooth@vger.kernel.org Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA5DB4437D; Wed, 15 May 2024 07:09:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=92.121.34.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715756944; cv=none; b=LELa5L3idU2amkLvMHV69QHv7aNejEXyiETnDZ5Cu1Dlf8qbNIVDsAeWfeoZVZ3+CBS5TqMCCBLeturUmOQDunSo6yV83tgTOm7/4yrZKIztF20z2dPcVSfTaX9yqkzFKEabZMKDCPUe2CoCsNCJ3OCTTalzbYuosg2IitQUTA0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715756944; c=relaxed/simple; bh=6AUHB010gIMdAQfAKcUP+WZtCSfx5bX4hBjphhoQI+8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FYMiIkaoTqpkMzgYBgPZU30xEZ2HdDXP29CyU9VTY3kk9V8RbtYIfaRCTEYHAQJ8MA6jcToCnR7xo8/4QnNJBcZWTTorJTl4MWNUyL7lF4vL11VNBX+1KVWJ6FL/YUGfCvUuXNAVTmJ8VUL5d1kQvjMNFiUIhdDq9fZdcqg/QEI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; arc=none smtp.client-ip=92.121.34.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 072041A1F66; Wed, 15 May 2024 09:09:01 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id B5EC51A1F51; Wed, 15 May 2024 09:09:00 +0200 (CEST) Received: from pe-lt8779.in-pnq01.nxp.com (pe-lt8779.in-pnq01.nxp.com [10.17.104.141]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id F1CD7180222C; Wed, 15 May 2024 15:08:58 +0800 (+08) From: Neeraj Sanjay Kale To: marcel@holtmann.org, luiz.dentz@gmail.com Cc: linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, amitkumar.karwar@nxp.com, rohit.fule@nxp.com, neeraj.sanjaykale@nxp.com, sherry.sun@nxp.com, ziniu.wang_1@nxp.com, haibo.chen@nxp.com, LnxRevLi@nxp.com, guillaume.legoupil@nxp.com, salim.chebbo@nxp.com Subject: [PATCH v1 2/3] Bluetooth: btnxpuart: Enable status prints for firmware download Date: Wed, 15 May 2024 12:36:56 +0530 Message-Id: <20240515070657.85132-3-neeraj.sanjaykale@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240515070657.85132-1-neeraj.sanjaykale@nxp.com> References: <20240515070657.85132-1-neeraj.sanjaykale@nxp.com> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP 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 Tested-by: Guillaume Legoupil --- drivers/bluetooth/btnxpuart.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c index 0677b48a456e..c22f2ad7d751 100644 --- a/drivers/bluetooth/btnxpuart.c +++ b/drivers/bluetooth/btnxpuart.c @@ -693,7 +693,7 @@ static int nxp_request_firmware(struct hci_dev *hdev, const char *fw_name) if (!strlen(nxpdev->fw_name)) { snprintf(nxpdev->fw_name, MAX_FW_FILE_NAME_LEN, "%s", fw_name); - bt_dev_dbg(hdev, "Request Firmware: %s", nxpdev->fw_name); + bt_dev_info(hdev, "Request Firmware: %s", nxpdev->fw_name); err = request_firmware(&nxpdev->fw, nxpdev->fw_name, &hdev->dev); if (err < 0) { 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) } if (!len) { - bt_dev_dbg(hdev, "FW Downloaded Successfully: %zu bytes", + bt_dev_info(hdev, "FW Download Complete: %zu bytes", nxpdev->fw->size); if (nxp_data->helper_fw_name && !nxpdev->helper_downloaded) { nxpdev->helper_downloaded = true; @@ -890,6 +890,7 @@ static int nxp_recv_chip_ver_v3(struct hci_dev *hdev, struct sk_buff *skb) chip_id = le16_to_cpu(req->chip_id); loader_ver = req->loader_ver; + bt_dev_info(hdev, "ChipID: %04x, Version: %d", chip_id, loader_ver); if (!nxp_request_firmware(hdev, nxp_get_fw_name_from_chipid(hdev, chip_id, loader_ver))) 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) } if (req->len == 0) { - bt_dev_dbg(hdev, "FW Downloaded Successfully: %zu bytes", + bt_dev_info(hdev, "FW Download Complete: %zu bytes", nxpdev->fw->size); clear_bit(BTNXPUART_FW_DOWNLOADING, &nxpdev->tx_state); wake_up_interruptible(&nxpdev->fw_dnld_done_wait_q); @@ -1037,7 +1038,7 @@ static int nxp_setup(struct hci_dev *hdev) if (err < 0) return err; } else { - bt_dev_dbg(hdev, "FW already running."); + bt_dev_info(hdev, "FW already running."); clear_bit(BTNXPUART_FW_DOWNLOADING, &nxpdev->tx_state); } -- 2.34.1