From patchwork Thu May 16 12:39:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "K, Kiran" X-Patchwork-Id: 797507 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (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 69662145B24 for ; Thu, 16 May 2024 12:25:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715862315; cv=none; b=bbs2CwP92hGzbAj9klrsF6YBIwX3Jdp7uBLOaACvl13i/vlVSzx/oc/XfZ13qacEXvpA/kH+mw8TbK7MMqfM6JGB5/RpYT5NuzKAw5aD3eOB8NYWcuZy0OvNWedp8TUnaZEsIhXAME0pSkFFMOjzSLP8OTnT6xSouLg4vnHSdUk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715862315; c=relaxed/simple; bh=U/lMzK8NoedWxpOGN/VlDqOMEqiFNoK+o4ZS9OkJOMU=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=MOkaxP1NRmy2Rd5+APk+Wnli4XXjGnozKCrXC8+KLNMKG0AYntspYUzxDTXq1nd7VkC9uQ5bE0DNlm1Ao6U3Wa4zKxYjHMAZaMo1IV+GHkH6CNje4zkZJA/eqDpajK8RQAfO07iCbOVcAMyy9BQxYyrzemw+/2Qd3IVnKJTxtTM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=H158PHbZ; arc=none smtp.client-ip=192.198.163.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="H158PHbZ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715862313; x=1747398313; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=U/lMzK8NoedWxpOGN/VlDqOMEqiFNoK+o4ZS9OkJOMU=; b=H158PHbZcNgtkYoRIVXBruMMQgozCg4hbNxBMCnJ66aiBrmOskJjPSvF yKLqOrch9BH2PtyNhqgZdkMaJ5Q7FQPhwz4n8vyS78vFLv0dm1kohpLqz +/iRQBEr1qIyZeqF0PUgjHFA6LvIi/BHnxPgVsIkUz/PxicMSqHp8iWOT 8nwW6LDsvtibzUYzs7DsJ1cMz14qV956VFGT59D/ZB6XjBH4ibxP9HVN5 v0ykMWI/UxDORroHEfiJ7wlsj2U1j2Cf3QA+ctLy/w5apPi43KpQ93FAf b2PMnC02sLsWqIF8lt3Z9d8NxwOvko8N3kWXEwf/q75w27xkL+9Gh6Mne A==; X-CSE-ConnectionGUID: ldcDyEGGRXq/RbVPKJEcBA== X-CSE-MsgGUID: ghjgpovDR3CrJq/sEegFTw== X-IronPort-AV: E=McAfee;i="6600,9927,11074"; a="15790874" X-IronPort-AV: E=Sophos;i="6.08,164,1712646000"; d="scan'208";a="15790874" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 May 2024 05:25:12 -0700 X-CSE-ConnectionGUID: ka5ffwMtSxCjfJJ/G6QWWg== X-CSE-MsgGUID: u6AfX0leTzaZVbBb8G7bog== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,164,1712646000"; d="scan'208";a="62246350" Received: from intel-lenovo-legion-y540-15irh-pg0.iind.intel.com ([10.224.186.95]) by orviesa002.jf.intel.com with ESMTP; 16 May 2024 05:25:10 -0700 From: Kiran K To: linux-bluetooth@vger.kernel.org Cc: ravishankar.srivatsa@intel.com, chethan.tumkur.narayan@intel.com, vijay.satija@intel.com, Kiran Subject: [PATCH v1 1/3] Bluetooth: btintel_pcie: Print Firmware Sequencer information Date: Thu, 16 May 2024 18:09:36 +0530 Message-Id: <20240516123938.891523-1-kiran.k@intel.com> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Kiran Firmware sequencer (FSEQ) is a common code shared across Bluetooth and Wifi. Printing FSEQ will help to debug if there is any mismatch between Bluetooth and Wifi FSEQ. Signed-off-by: Kiran --- drivers/bluetooth/btintel.c | 3 ++- drivers/bluetooth/btintel.h | 5 +++++ drivers/bluetooth/btintel_pcie.c | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c index 0c855c3ee1c1..2c434ff9c47c 100644 --- a/drivers/bluetooth/btintel.c +++ b/drivers/bluetooth/btintel.c @@ -2713,7 +2713,7 @@ void btintel_set_msft_opcode(struct hci_dev *hdev, u8 hw_variant) } EXPORT_SYMBOL_GPL(btintel_set_msft_opcode); -static void btintel_print_fseq_info(struct hci_dev *hdev) +void btintel_print_fseq_info(struct hci_dev *hdev) { struct sk_buff *skb; u8 *p; @@ -2825,6 +2825,7 @@ static void btintel_print_fseq_info(struct hci_dev *hdev) kfree_skb(skb); } +EXPORT_SYMBOL_GPL(btintel_print_fseq_info); static int btintel_setup_combined(struct hci_dev *hdev) { diff --git a/drivers/bluetooth/btintel.h b/drivers/bluetooth/btintel.h index b5fea735e260..796953547932 100644 --- a/drivers/bluetooth/btintel.h +++ b/drivers/bluetooth/btintel.h @@ -244,6 +244,7 @@ int btintel_bootloader_setup_tlv(struct hci_dev *hdev, struct intel_version_tlv *ver); int btintel_shutdown_combined(struct hci_dev *hdev); void btintel_hw_error(struct hci_dev *hdev, u8 code); +void btintel_print_fseq_info(struct hci_dev *hdev); #else static inline int btintel_check_bdaddr(struct hci_dev *hdev) @@ -373,4 +374,8 @@ static inline int btintel_shutdown_combined(struct hci_dev *hdev) static inline void btintel_hw_error(struct hci_dev *hdev, u8 code) { } + +static void btintel_print_fseq_info(struct hci_dev *hdev) +{ +} #endif diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c index 5b6805d87fcf..8d282ee2322c 100644 --- a/drivers/bluetooth/btintel_pcie.c +++ b/drivers/bluetooth/btintel_pcie.c @@ -1197,9 +1197,11 @@ static int btintel_pcie_setup(struct hci_dev *hdev) bt_dev_err(hdev, "Unsupported Intel hw variant (%u)", INTEL_HW_VARIANT(ver_tlv.cnvi_bt)); err = -EINVAL; + goto exit_error; break; } + btintel_print_fseq_info(hdev); exit_error: kfree_skb(skb); From patchwork Thu May 16 12:39:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "K, Kiran" X-Patchwork-Id: 797320 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (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 BC604145FE0 for ; Thu, 16 May 2024 12:25:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715862316; cv=none; b=sBdS/vFhYcHknGhN17PEta4WK6f69AVUXLJVRzHlw50W37XFjfTULGPnFSQTqXcLC5t1VwB26nYtuYpLHI1xGWz6UqtTSX5AmbJtMdzm65AcKqdSDI3vRvFKg8CAhD30i5bcJHyKLzH80igMer9qpPft4/8wMK1nWhsROH6+FDU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715862316; c=relaxed/simple; bh=IUcCbclcqeUC91mwJjsGY1jGJw/BBIqKtTAQ7C6QwHA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=cJfZ20prV+jsByCszy7lMDIDdAxczWkghHQuLyxqQiHJ3BOYFWQDS48c7rD7Dr8RFNIpf9jo5l+Icty1OCXfJdQb4H0a4NSuq9QCFrM2ZGAfL+lk8YsOunOOXvWtH0R/E6fLCh22qCcsQ22eqGY21nwjrHyXwYlUVAbkGpPOt6Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=ikBoOZHK; arc=none smtp.client-ip=192.198.163.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ikBoOZHK" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715862315; x=1747398315; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=IUcCbclcqeUC91mwJjsGY1jGJw/BBIqKtTAQ7C6QwHA=; b=ikBoOZHK0oUC3y0P+rOHWdcNxEmR0ZusZ4nXQCfhsoWtDv1zZ/thfWD7 QBaZsvllaYs9rSmoAfrCdv+r1S0gQb61Ul6Ve+YpCZflzjQ0O94EF6LGM kWEVSWVgthhr6APhgXzWhuzaw/XFk4FE8e5kDHk2xaGb+WvlQpkihR6AP idP+gkrW1wbjGduVZYDYH5hQ04xlbm6L1ARoY/gAZbVnauD2OLHgTHeu5 RnuWFQZN4jkD+Ulr7F8ctGYmMoRCO6nq4dNxeOgBBggI4ANFJ8383iQkA HEz0eiAVrgWss43X3uk6tE3HTczeHsNLnJO1cDp1Hvxc015JuVl1UfQGr A==; X-CSE-ConnectionGUID: X0tCd/y6SFmyX9c8SigeXw== X-CSE-MsgGUID: I400cUfSQ1m6iHIIVCEUyA== X-IronPort-AV: E=McAfee;i="6600,9927,11074"; a="15790875" X-IronPort-AV: E=Sophos;i="6.08,164,1712646000"; d="scan'208";a="15790875" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 May 2024 05:25:14 -0700 X-CSE-ConnectionGUID: eeO+zO5mTaWsFXydAeb4YQ== X-CSE-MsgGUID: HBaHm1PMTsSo7OUKKXmJnA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,164,1712646000"; d="scan'208";a="62246357" Received: from intel-lenovo-legion-y540-15irh-pg0.iind.intel.com ([10.224.186.95]) by orviesa002.jf.intel.com with ESMTP; 16 May 2024 05:25:12 -0700 From: Kiran K To: linux-bluetooth@vger.kernel.org Cc: ravishankar.srivatsa@intel.com, chethan.tumkur.narayan@intel.com, vijay.satija@intel.com, Kiran Subject: [PATCH v1 2/3] Bluetooth: btintel_pcie: Fix irq leak Date: Thu, 16 May 2024 18:09:37 +0530 Message-Id: <20240516123938.891523-2-kiran.k@intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240516123938.891523-1-kiran.k@intel.com> References: <20240516123938.891523-1-kiran.k@intel.com> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Kiran Free irq before releasing irq vector. Signed-off-by: Kiran --- drivers/bluetooth/btintel_pcie.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c index 8d282ee2322c..d8f82e0f6435 100644 --- a/drivers/bluetooth/btintel_pcie.c +++ b/drivers/bluetooth/btintel_pcie.c @@ -1329,6 +1329,12 @@ static void btintel_pcie_remove(struct pci_dev *pdev) data = pci_get_drvdata(pdev); btintel_pcie_reset_bt(data); + for (int i = 0; i < data->alloc_vecs; i++) { + struct msix_entry *msix_entry; + + msix_entry = &data->msix_entries[i]; + free_irq(msix_entry->vector, msix_entry); + } pci_free_irq_vectors(pdev); From patchwork Thu May 16 12:39:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "K, Kiran" X-Patchwork-Id: 797506 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (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 548F24EB30 for ; Thu, 16 May 2024 12:25:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715862318; cv=none; b=ZdwOWR7M89UyJODD/3B6KgBCemBMyHN/6YrxofuWIgdRI5ZrxOGXc7aQtAqOw/44XutwYq8pgbqb1ecVLQ4H6g8eOuR3lzu/Ljrm+i2iKf6LOz2PoZ4XsA+ATYMpXRhXPdhoFJH4+rgd5vVLpPUEVTjco+3lZxKbVUpmvAnjXcM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715862318; c=relaxed/simple; bh=4jiXpxc3j7OALC8V2lVstSau+0Xjp6FbGvkWYtmD7IM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=pYm4kZczoqsYloFv4TpNkL3QNJen/dCCGSUcpnRFx2MGmM2NfiLNYogK/3qTzW+6ggBDAkS4KeRLIGZlUVZbeIqIhckTSUs3K/hzKw+72G+8b/x5S5MxOR7nRXyUrU19nVkZ0zcxgJMg5nSyAv0nE3RORF77tzGOcp1cDkrbMbk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=bFc8EcYL; arc=none smtp.client-ip=192.198.163.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="bFc8EcYL" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715862316; x=1747398316; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4jiXpxc3j7OALC8V2lVstSau+0Xjp6FbGvkWYtmD7IM=; b=bFc8EcYLIckp3ci+ZxTIy+jAZSQBa9K/FNuPnVnuLZfYlaeWuJkXSGnR yXtfA0ELxD6w+re+WHljWmBUqMvPafgF1Q9PWW+WGd7GBBfpIo82grpb0 4gxa3UA+Lr/8f2Jzut6c1DwzobvKyQ1T35p1zD/+hek3kWoI2/t263xKT OSVLOMbS1HzG4pJt1YXLil0N4QdCDvpNWqnZqEQA0THb5DiCbitilg9y9 hgUeq+qNqgVFJZcsTe0YV+kGlP+Ct4jQrpolFvmxVih5+4PRIxkxcwakN 9StzyRQrRb32uMXueRXyetbk/hQp85fuIiKLfY6Ufb4wUiaPkeEXLMRFm g==; X-CSE-ConnectionGUID: uUxuiVNeSgCEB6sQHOVu6Q== X-CSE-MsgGUID: xCXYWiKPTAS7d1iiNvHINQ== X-IronPort-AV: E=McAfee;i="6600,9927,11074"; a="15790878" X-IronPort-AV: E=Sophos;i="6.08,164,1712646000"; d="scan'208";a="15790878" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 May 2024 05:25:16 -0700 X-CSE-ConnectionGUID: IC8UNlyKRc2eF0iB/hNn8Q== X-CSE-MsgGUID: U8PEVWK/QMK70+UKonz4GA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,164,1712646000"; d="scan'208";a="62246365" Received: from intel-lenovo-legion-y540-15irh-pg0.iind.intel.com ([10.224.186.95]) by orviesa002.jf.intel.com with ESMTP; 16 May 2024 05:25:14 -0700 From: Kiran K To: linux-bluetooth@vger.kernel.org Cc: ravishankar.srivatsa@intel.com, chethan.tumkur.narayan@intel.com, vijay.satija@intel.com, Kiran K Subject: [PATCH v1 3/3] Bluetooth: btintel_pcie: Fix REVERSE_INULL issue reported by coverity Date: Thu, 16 May 2024 18:09:38 +0530 Message-Id: <20240516123938.891523-3-kiran.k@intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240516123938.891523-1-kiran.k@intel.com> References: <20240516123938.891523-1-kiran.k@intel.com> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Vijay Satija check pdata return of skb_pull_data, instead of data. Signed-off-by: Vijay Satija Signed-off-by: Kiran K --- drivers/bluetooth/btintel_pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c index d8f82e0f6435..58144c82b1cb 100644 --- a/drivers/bluetooth/btintel_pcie.c +++ b/drivers/bluetooth/btintel_pcie.c @@ -382,7 +382,7 @@ static int btintel_pcie_recv_frame(struct btintel_pcie_data *data, /* The first 4 bytes indicates the Intel PCIe specific packet type */ pdata = skb_pull_data(skb, BTINTEL_PCIE_HCI_TYPE_LEN); - if (!data) { + if (!pdata) { bt_dev_err(hdev, "Corrupted packet received"); ret = -EILSEQ; goto exit_error;