Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2217549/?format=api
{ "id": 2217549, "url": "http://patchwork.ozlabs.org/api/patches/2217549/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260330063842.1121545-1-chandrashekar.devegowda@intel.com/", "project": { "id": 28, "url": "http://patchwork.ozlabs.org/api/projects/28/?format=api", "name": "Linux PCI development", "link_name": "linux-pci", "list_id": "linux-pci.vger.kernel.org", "list_email": "linux-pci@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260330063842.1121545-1-chandrashekar.devegowda@intel.com>", "list_archive_url": null, "date": "2026-03-30T06:38:41", "name": "[v1] Bluetooth: btintel_pcie:Support Product level reset.", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "30872f3f24a72ea483b9a675e77a5b152a990506", "submitter": { "id": 90156, "url": "http://patchwork.ozlabs.org/api/people/90156/?format=api", "name": "Chandrashekar Devegowda", "email": "chandrashekar.devegowda@intel.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260330063842.1121545-1-chandrashekar.devegowda@intel.com/mbox/", "series": [ { "id": 497964, "url": "http://patchwork.ozlabs.org/api/series/497964/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=497964", "date": "2026-03-30T06:38:41", "name": "[v1] Bluetooth: btintel_pcie:Support Product level reset.", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/497964/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2217549/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2217549/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-pci+bounces-51411-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-pci@vger.kernel.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256\n header.s=Intel header.b=Rhcsv21U;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-pci+bounces-51411-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com\n header.b=\"Rhcsv21U\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=198.175.65.14", "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=intel.com", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=intel.com" ], "Received": [ "from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fkhYs60H4z1xrn\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 30 Mar 2026 17:44:33 +1100 (AEDT)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id D913B3028023\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 30 Mar 2026 06:39:39 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 10D59393DF7;\n\tMon, 30 Mar 2026 06:39:39 +0000 (UTC)", "from mgamail.intel.com (mgamail.intel.com [198.175.65.14])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id E8B9737D121;\n\tMon, 30 Mar 2026 06:39:36 +0000 (UTC)", "from fmviesa007.fm.intel.com ([10.60.135.147])\n by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 29 Mar 2026 23:39:30 -0700", "from weba0957.iind.intel.com (HELO WEBA0932.iind.intel.com)\n ([10.224.186.34])\n by fmviesa007.fm.intel.com with ESMTP; 29 Mar 2026 23:39:23 -0700" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774852779; cv=none;\n b=C/q6r/XuEGShAKNaRpTTkkgFv9xwieh2GhVEFfXoLmsMZubptWb2W90+MbnaTFQ5Dxuj2EyC+TcmnX8casCRJBLeWAnfYra64B2uYLB4I1Y53eHNIct+ULdmf68+K+rHncD2cK8/ScZNfXI6kTOTfLZo0oQck5Tc/Qzd8ejOB1Q=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774852779; c=relaxed/simple;\n\tbh=tmYiyZorA0z4TjfSrT93Sw2Vmxyiubwxlrt4sweRxmw=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=l6oWnrn5SUSvvENkTEWvJMjIbyaiCJmZnAFcdkiTQrTpCwhuBjEzEr0JTp6WmlaaAVsbZyYpawsf8eoJl12KU9vaQOa0lPEa/TnMqrNSXVCo1X77lFQSbSrg/SoKhzj8wwnfhnn8COfcRSimC1eqImQm4jgzt4qXf+6t+oAu/HQ=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=intel.com;\n spf=pass smtp.mailfrom=intel.com;\n dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com\n header.b=Rhcsv21U; arc=none smtp.client-ip=198.175.65.14", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1774852777; x=1806388777;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=tmYiyZorA0z4TjfSrT93Sw2Vmxyiubwxlrt4sweRxmw=;\n b=Rhcsv21UbiYMjBJsLwrvAIm+OM8yIcX37UqOjQUyIXhApQDwcrBpZxj3\n 0kSN3QgmngJOzSCYBZspUPdjJ59PEnWaaLhV5os75WlSybt9sy9xvXfVU\n CsRbzaxHO4z8EHxvzuBj3Yw9DOYooBiLxdacA9J6yZt0ydIE7MQPTZ8Dx\n 3uc2M5IA1DegQvNjU0a74HWkO8AzzIoWP61NxV7eaAUn71EuSEcRE9c48\n ndaR/Ds2HluK/LvKseYN7E6CoAKGn/AVT9n/LW5fYMu3HwDo8xpUSRT3/\n ZfAaeCwwbbGtJ1iQBBTMUf/cJYFczq9rwIxGWWpJea6V0eaJS1Ot5RqWv\n Q==;", "X-CSE-ConnectionGUID": [ "huXMy3gpRKWFmkYVTM5x8A==", "tAKsGNzHRwmgAAMe9qbaWg==" ], "X-CSE-MsgGUID": [ "n8V19QxaSCuZGcAHQU7KvQ==", "zmsKSNbKRtOa7FlX6Xlgkg==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6800,10657,11743\"; a=\"79700630\"", "E=Sophos;i=\"6.23,149,1770624000\";\n d=\"scan'208\";a=\"79700630\"", "E=Sophos;i=\"6.23,149,1770624000\";\n d=\"scan'208\";a=\"222646418\"" ], "X-ExtLoop1": "1", "From": "Chandrashekar Devegowda <chandrashekar.devegowda@intel.com>", "To": "linux-bluetooth@vger.kernel.org", "Cc": "linux-pci@vger.kernel.org,\n\tbhelgaas@google.com,\n\travishankar.srivatsa@intel.com,\n\tchethan.tumkur.narayan@intel.com,\n\tChandrashekar Devegowda <chandrashekar.devegowda@intel.com>", "Subject": "[PATCH v1] Bluetooth: btintel_pcie:Support Product level reset.", "Date": "Mon, 30 Mar 2026 12:08:41 +0530", "Message-ID": "<20260330063842.1121545-1-chandrashekar.devegowda@intel.com>", "X-Mailer": "git-send-email 2.43.0", "Precedence": "bulk", "X-Mailing-List": "linux-pci@vger.kernel.org", "List-Id": "<linux-pci.vger.kernel.org>", "List-Subscribe": "<mailto:linux-pci+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-pci+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit" }, "content": "When driver encounters a TOP exception, ACPI methods will be called\nfor Product level reset since Wifi and BT share the same TOP, BT driver\nwill first reprobe the wifi driver and then reprobe BT.\n\nTested by:\n1) Simulating TOP exception: sudo hcitool cmd 3f 4d 0A 00\nAnd verified that the device went through PLDR by checking the ACPI\ndebug logs.\n2) Toggle of sysfs attribute for BT reset for FLR i.e\necho 1 > /sys/class/bluetooth/hci0/reset\n\nSigned-off-by: Chandrashekar Devegowda <chandrashekar.devegowda@intel.com>\n---\n drivers/bluetooth/btintel.c | 6 +-\n drivers/bluetooth/btintel.h | 7 ++\n drivers/bluetooth/btintel_pcie.c | 163 +++++++++++++++++++++++++++++--\n drivers/bluetooth/btintel_pcie.h | 6 ++\n 4 files changed, 171 insertions(+), 11 deletions(-)", "diff": "diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c\nindex dcaaa4ca02b9..4426327ebc61 100644\n--- a/drivers/bluetooth/btintel.c\n+++ b/drivers/bluetooth/btintel.c\n@@ -67,9 +67,10 @@ static struct {\n \tu32 fw_build_num;\n } coredump_info;\n \n-static const guid_t btintel_guid_dsm =\n+const guid_t btintel_guid_dsm =\n \tGUID_INIT(0xaa10f4e0, 0x81ac, 0x4233,\n \t\t 0xab, 0xf6, 0x3b, 0x2a, 0xc5, 0x0e, 0x28, 0xd9);\n+EXPORT_SYMBOL_GPL(btintel_guid_dsm);\n \n int btintel_check_bdaddr(struct hci_dev *hdev)\n {\n@@ -2624,7 +2625,7 @@ static void btintel_set_ppag(struct hci_dev *hdev, struct intel_version_tlv *ver\n \tkfree_skb(skb);\n }\n \n-static int btintel_acpi_reset_method(struct hci_dev *hdev)\n+int btintel_acpi_reset_method(struct hci_dev *hdev)\n {\n \tint ret = 0;\n \tacpi_status status;\n@@ -2663,6 +2664,7 @@ static int btintel_acpi_reset_method(struct hci_dev *hdev)\n \tkfree(buffer.pointer);\n \treturn ret;\n }\n+EXPORT_SYMBOL_GPL(btintel_acpi_reset_method);\n \n static void btintel_set_dsm_reset_method(struct hci_dev *hdev,\n \t\t\t\t\t struct intel_version_tlv *ver_tlv)\ndiff --git a/drivers/bluetooth/btintel.h b/drivers/bluetooth/btintel.h\nindex 0e9ca99aaaae..70d812ad36a2 100644\n--- a/drivers/bluetooth/btintel.h\n+++ b/drivers/bluetooth/btintel.h\n@@ -79,6 +79,8 @@ struct intel_tlv {\n #define BTINTEL_HWID_SCP2\t0x20\t/* Scorpius Peak2 - Nova Lake */\n #define BTINTEL_HWID_BZRIW\t0x22\t/* BlazarIW - Wildcat Lake */\n \n+extern const guid_t btintel_guid_dsm;\n+\n struct intel_version_tlv {\n \tu32\tcnvi_top;\n \tu32\tcnvr_top;\n@@ -289,6 +291,7 @@ int btintel_bootloader_setup_tlv(struct hci_dev *hdev,\n int btintel_shutdown_combined(struct hci_dev *hdev);\n void btintel_hw_error(struct hci_dev *hdev, u8 code);\n void btintel_print_fseq_info(struct hci_dev *hdev);\n+int btintel_acpi_reset_method(struct hci_dev *hdev);\n #else\n \n static inline int btintel_check_bdaddr(struct hci_dev *hdev)\n@@ -422,4 +425,8 @@ static inline void btintel_hw_error(struct hci_dev *hdev, u8 code)\n static inline void btintel_print_fseq_info(struct hci_dev *hdev)\n {\n }\n+static inline int btintel_acpi_reset_method(struct hci_dev *hdev)\n+{\n+\treturn -ENODEV;\n+}\n #endif\ndiff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c\nindex 05f82bc3f0d7..abac1ae5df8f 100644\n--- a/drivers/bluetooth/btintel_pcie.c\n+++ b/drivers/bluetooth/btintel_pcie.c\n@@ -15,6 +15,7 @@\n #include <linux/wait.h>\n #include <linux/delay.h>\n #include <linux/interrupt.h>\n+#include <linux/acpi.h>\n \n #include <linux/unaligned.h>\n #include <linux/devcoredump.h>\n@@ -100,6 +101,22 @@ enum {\n \tBTINTEL_PCIE_D3\n };\n \n+enum {\n+\tBTINTEL_PCIE_DSM_SET_RESET_TIMING = 1,\n+\tBTINTEL_PCIE_DSM_GET_RESET_TIMING = 2,\n+\tBTINTEL_PCIE_DSM_BT_PLDR_CONFIG = 3,\n+\tBTINTEL_PCIE_DSM_GET_RESET_TYPE = 4,\n+\tBTINTEL_PCIE_DSM_DYNAMIC_PLDR = 5,\n+\tBTINTEL_PCIE_DSM_GET_RESET_METHOD = 6,\n+\tBTINTEL_PCIE_DSM_SET_PLDR_DELAY = 7,\n+};\n+\n+enum btintel_dsm_internal_product_reset_mode {\n+\tBTINTEL_PCIE_DSM_PLDR_MODE_EN_PROD_RESET\t= BIT(0),\n+\tBTINTEL_PCIE_DSM_PLDR_MODE_EN_WIFI_FLR\t\t= BIT(1),\n+\tBTINTEL_PCIE_DSM_PLDR_MODE_EN_BT_OFF_ON\t\t= BIT(2),\n+};\n+\n /* Structure for dbgc fragment buffer\n * @buf_addr_lsb: LSB of the buffer's physical address\n * @buf_addr_msb: MSB of the buffer's physical address\n@@ -126,6 +143,11 @@ struct btintel_pcie_dbgc_ctxt {\n \tstruct btintel_pcie_dbgc_ctxt_buf bufs[BTINTEL_PCIE_DBGC_BUFFER_COUNT];\n };\n \n+/* structure for reset and recovery\n+ * @pdev: The pci_dev for controller\n+ * @work: work struct for reset\n+ * @reset type: Reset can be FLR or PLDR\n+ */\n struct btintel_pcie_removal {\n \tstruct pci_dev *pdev;\n \tstruct work_struct work;\n@@ -2254,6 +2276,112 @@ static void btintel_pcie_inc_recovery_count(struct pci_dev *pdev,\n }\n \n static int btintel_pcie_setup_hdev(struct btintel_pcie_data *data);\n+static void btintel_pcie_reset(struct hci_dev *hdev);\n+\n+static int btintel_pcie_acpi_reset_method(struct btintel_pcie_data *data)\n+{\n+\tunion acpi_object *obj, argv4;\n+\tacpi_handle handle;\n+\tint ret;\n+\tstruct pldr_mode {\n+\t\tu16\tcmd_type;\n+\t\tu16\tcmd_payload;\n+\t} __packed;\n+\n+\t/* set 1 for _PRR mode\n+\t * Product Reset (PLDR Abort flow)\n+\t */\n+\tstatic const struct pldr_mode mode = {\n+\t\t.cmd_type = 1,\n+\t\t.cmd_payload = BTINTEL_PCIE_DSM_PLDR_MODE_EN_PROD_RESET |\n+\t\t\t BTINTEL_PCIE_DSM_PLDR_MODE_EN_WIFI_FLR,\n+\t};\n+\tstruct hci_dev *hdev = data->hdev;\n+\n+\thandle = ACPI_HANDLE(GET_HCIDEV_DEV(data->hdev));\n+\tif (!handle) {\n+\t\tbt_dev_dbg(data->hdev, \"No support for bluetooth device in ACPI firmware\");\n+\t\treturn -EACCES;\n+\t}\n+\n+\tif (!acpi_has_method(handle, \"_PRR\")) {\n+\t\tbt_dev_dbg(data->hdev, \"No support for _PRR ACPI method, falling back to FLR\");\n+\t\tbtintel_pcie_reset(data->hdev);\n+\t\treturn -ENODEV;\n+\t}\n+\n+\targv4.buffer.type = ACPI_TYPE_BUFFER;\n+\targv4.buffer.length = sizeof(mode);\n+\targv4.buffer.pointer = (void *)&mode;\n+\n+\tobj = acpi_evaluate_dsm(handle, &btintel_guid_dsm, 0,\n+\t\t\t\tBTINTEL_PCIE_DSM_DYNAMIC_PLDR, &argv4);\n+\tif (!obj) {\n+\t\tbt_dev_err(data->hdev, \"Failed to call dsm to set reset method\");\n+\t\treturn -EIO;\n+\t}\n+\tACPI_FREE(obj);\n+\n+\tpci_dev_lock(data->pdev);\n+\tpci_save_state(data->pdev);\n+\tret = btintel_acpi_reset_method(hdev);\n+\tif (ret)\n+\t\tbt_dev_err(data->hdev, \"ACPI _PRR reset failed (%d),PLDR incomplete\",\n+\t\t\t ret);\n+\tpci_restore_state(data->pdev);\n+\tpci_dev_unlock(data->pdev);\n+\treturn ret;\n+}\n+\n+static void btintel_pcie_perform_pldr(struct btintel_pcie_removal *removal)\n+{\n+\tstruct pci_dev *pdev = removal->pdev;\n+\tstruct pci_dev *wifi = NULL;\n+\tstruct pci_bus *bus;\n+\tstruct btintel_pcie_data *data;\n+\t/* on integrated we have to look up by ID (same bus) */\n+\tstatic const struct pci_device_id wifi_device_ids[] = {\n+\t#define WIFI_DEV(_id) { PCI_DEVICE(PCI_VENDOR_ID_INTEL, _id) }\n+\t\tWIFI_DEV(0xA840), /* LNL */\n+\t\tWIFI_DEV(0xE440), /* PTL-P */\n+\t\tWIFI_DEV(0xE340), /* PTL-H */\n+\t\tWIFI_DEV(0xD340), /* NVL-H */\n+\t\tWIFI_DEV(0x6E70), /* NVL-S */\n+\t\tWIFI_DEV(0x4D40), /* WCL */\n+\t\tWIFI_DEV(0xD240), /* RZL-H */\n+\t\tWIFI_DEV(0x6C40), /* RZL-M */\n+\t\t{}\n+\t};\n+\tstruct pci_dev *tmp = NULL;\n+\n+\tdata = pci_get_drvdata(pdev);\n+\n+\tbus = pdev->bus;\n+\tif (!bus)\n+\t\treturn;\n+\n+\t/* If ACPI reset fell back to FLR or failed, skip reprobe to avoid\n+\t * racing with the FLR work already scheduled.\n+\t */\n+\tif (btintel_pcie_acpi_reset_method(data))\n+\t\treturn;\n+\n+\tlist_for_each_entry(tmp, &bus->devices, bus_list) {\n+\t\tif (pci_match_id(wifi_device_ids, tmp)) {\n+\t\t\twifi = pci_dev_get(tmp);\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\n+\tif (wifi) {\n+\t\tif (device_reprobe(&wifi->dev))\n+\t\t\tBT_ERR(\"WiFi reprobe failed for BDF:%s\", pci_name(wifi));\n+\t\tpci_dev_put(wifi);\n+\t}\n+\n+\tif (device_reprobe(&pdev->dev))\n+\t\tBT_ERR(\"BT reprobe failed for BDF:%s\", pci_name(pdev));\n+}\n \n static void btintel_pcie_removal_work(struct work_struct *wk)\n {\n@@ -2266,9 +2394,13 @@ static void btintel_pcie_removal_work(struct work_struct *wk)\n \tpci_lock_rescan_remove();\n \n \tif (!pdev->bus)\n-\t\tgoto error;\n+\t\tgoto out;\n \n \tdata = pci_get_drvdata(pdev);\n+\tif (!data) {\n+\t\tBT_WARN(\"PCI driver data is NULL, aborting removal work\");\n+\t\tgoto out;\n+\t}\n \n \tbtintel_pcie_disable_interrupts(data);\n \tbtintel_pcie_synchronize_irqs(data);\n@@ -2276,12 +2408,16 @@ static void btintel_pcie_removal_work(struct work_struct *wk)\n \tflush_work(&data->rx_work);\n \n \tbt_dev_dbg(data->hdev, \"Release bluetooth interface\");\n+\tif (data->reset_type == BTINTEL_PCIE_IOSF_PRR_PLDR) {\n+\t\tbtintel_pcie_perform_pldr(removal);\n+\t\tgoto out;\n+\t}\n \tbtintel_pcie_release_hdev(data);\n \n \terr = pci_reset_function(pdev);\n \tif (err) {\n \t\tBT_ERR(\"Failed resetting the pcie device (%d)\", err);\n-\t\tgoto error;\n+\t\tgoto out;\n \t}\n \n \tbtintel_pcie_enable_interrupts(data);\n@@ -2291,7 +2427,7 @@ static void btintel_pcie_removal_work(struct work_struct *wk)\n \tif (err) {\n \t\tBT_ERR(\"Failed to enable bluetooth hardware after reset (%d)\",\n \t\t err);\n-\t\tgoto error;\n+\t\tgoto out;\n \t}\n \n \tbtintel_pcie_reset_ia(data);\n@@ -2301,9 +2437,9 @@ static void btintel_pcie_removal_work(struct work_struct *wk)\n \terr = btintel_pcie_setup_hdev(data);\n \tif (err) {\n \t\tBT_ERR(\"Failed registering hdev (%d)\", err);\n-\t\tgoto error;\n+\t\tgoto out;\n \t}\n-error:\n+out:\n \tpci_dev_put(pdev);\n \tpci_unlock_rescan_remove();\n \tkfree(removal);\n@@ -2339,15 +2475,19 @@ static void btintel_pcie_hw_error(struct hci_dev *hdev, u8 code)\n \tstruct pci_dev *pdev = dev_data->pdev;\n \ttime64_t retry_window;\n \n-\tif (code == 0x13) {\n-\t\tbt_dev_err(hdev, \"Encountered top exception\");\n-\t\treturn;\n-\t}\n+\tbtintel_pcie_dump_debug_registers(hdev);\n \n \tdata = btintel_pcie_get_recovery(pdev, &hdev->dev);\n \tif (!data)\n \t\treturn;\n \n+\tif (code == 0x13)\n+\t\tdev_data->reset_type = BTINTEL_PCIE_IOSF_PRR_PLDR;\n+\telse\n+\t\tdev_data->reset_type = BTINTEL_PCIE_IOSF_PRR_FLR;\n+\n+\tbt_dev_err(hdev, \"Encountered exception err:0x%x triggering: %s\", code,\n+\t\t dev_data->reset_type == BTINTEL_PCIE_IOSF_PRR_PLDR ? \"PLDR\" : \"FLR\");\n \tretry_window = ktime_get_boottime_seconds() - data->last_error;\n \n \tif (retry_window < BTINTEL_PCIE_RESET_WINDOW_SECS &&\n@@ -2503,6 +2643,10 @@ static int btintel_pcie_probe(struct pci_dev *pdev,\n \n \tdata->boot_stage_cache = 0x00;\n \tdata->img_resp_cache = 0x00;\n+\t/* FLR can be invoked by echoing to debugfs path, so explicitly\n+\t * initialized\n+\t */\n+\tdata->reset_type = BTINTEL_PCIE_IOSF_PRR_FLR;\n \n \terr = btintel_pcie_config_pcie(pdev, data);\n \tif (err)\n@@ -2701,6 +2845,7 @@ static int btintel_pcie_resume(struct device *dev)\n \tif (data->pm_sx_event == PM_EVENT_FREEZE ||\n \t data->pm_sx_event == PM_EVENT_HIBERNATE) {\n \t\tset_bit(BTINTEL_PCIE_CORE_HALTED, &data->flags);\n+\t\tdata->reset_type = BTINTEL_PCIE_IOSF_PRR_FLR;\n \t\tbtintel_pcie_reset(data->hdev);\n \t\treturn 0;\n \t}\ndiff --git a/drivers/bluetooth/btintel_pcie.h b/drivers/bluetooth/btintel_pcie.h\nindex e3d941ffef4a..856673fb2bd7 100644\n--- a/drivers/bluetooth/btintel_pcie.h\n+++ b/drivers/bluetooth/btintel_pcie.h\n@@ -144,6 +144,11 @@ enum msix_mbox_int_causes {\n \tBTINTEL_PCIE_CSR_MBOX_STATUS_MBOX4 = BIT(3), /* cause MBOX4 */\n };\n \n+enum btintel_pcie_reset_type {\n+\tBTINTEL_PCIE_IOSF_PRR_FLR = 0,\n+\tBTINTEL_PCIE_IOSF_PRR_PLDR = 1,\n+};\n+\n #define BTINTEL_PCIE_MSIX_NON_AUTO_CLEAR_CAUSE\tBIT(7)\n \n /* Minimum and Maximum number of MSI-X Vector\n@@ -514,6 +519,7 @@ struct btintel_pcie_data {\n \tstruct txq\ttxq;\n \tstruct rxq\trxq;\n \tu32\talive_intr_ctxt;\n+\tenum btintel_pcie_reset_type\treset_type;\n \tstruct btintel_pcie_dbgc\tdbgc;\n \tstruct btintel_pcie_dump_header dmp_hdr;\n \tu8\tpm_sx_event;\n", "prefixes": [ "v1" ] }