From patchwork Thu May 16 13:15:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "K, Kiran" X-Patchwork-Id: 797505 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.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 F190714658E for ; Thu, 16 May 2024 13:00:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715864454; cv=none; b=Yi6vWdCfYeRl6HSojVgFEkAZAOvI5kHnNs5erC0W9LvjCShrh6hBtT1KQunRSgETr9HZTtAcGNzxH6BBrFsVf58iVIFC5tZvr935LksXTvafnqwol3ah75DOkMmgK5CpO1hyOM6tvKfoXGtzfl4wKDfqeemvQu7HX3pDEcRJjeU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715864454; c=relaxed/simple; bh=U/lMzK8NoedWxpOGN/VlDqOMEqiFNoK+o4ZS9OkJOMU=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=nAq47IFz+rMw49ItLNSbA2FGiMJ5hWqEywzRyu3XBLuqlNkJVIobkEjSSAgM90Y8aCcV/JCFED4vNEFooO7KJ7WFvO1IHomikXTPQ3/b3Oi2PR0n3Sl+7cjEuSxAeKep8PRUnc66tyCo5iMVyFlErLAm8pkTNfdZ9fqTLFuVops= 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=eVPR439U; arc=none smtp.client-ip=198.175.65.13 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="eVPR439U" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715864453; x=1747400453; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=U/lMzK8NoedWxpOGN/VlDqOMEqiFNoK+o4ZS9OkJOMU=; b=eVPR439UWzSjq4jUJfVXWKk0ZzejE4iXxz9cjr12LmsiNYm7GSstQOXh q+iLay35DwkNchdddCnxwr/4TR73gRl9MP/ioprNUD6tO0QAoQOhjfQH1 neMbT3BYUXF7zpZbz6x0I0WWl6Z6DYMYVPoW9QtoW8SFPa0calyVwhK7z MHtrKAxTLJrcR9eWJPlFKWJyZBfmukedux8HzR8Zd87KF9Mv7xeI9JzWa nSzRANyDVfm3lPFbg91LSjlVnoESaWuaj9CMwX+gtCHaO+nY2dqw2z16m rbt0qQpTonhZAv9Lw7Y90TqoHPeFoyDaorBUBPyD+2TyJVCxyDAv1m74G Q==; X-CSE-ConnectionGUID: pffcZDMXThijHV0Tij4HpQ== X-CSE-MsgGUID: GeVmGFD/T6Oi0V5gvj0pmw== X-IronPort-AV: E=McAfee;i="6600,9927,11074"; a="23108528" X-IronPort-AV: E=Sophos;i="6.08,164,1712646000"; d="scan'208";a="23108528" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 May 2024 06:00:52 -0700 X-CSE-ConnectionGUID: giRgRybtRkOUInuYIqJtuA== X-CSE-MsgGUID: 3AdWsTqbS62NaSTJpp8XXw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,164,1712646000"; d="scan'208";a="54623611" Received: from intel-lenovo-legion-y540-15irh-pg0.iind.intel.com ([10.224.186.95]) by fmviesa002.fm.intel.com with ESMTP; 16 May 2024 06:00:50 -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 v2 1/3] Bluetooth: btintel_pcie: Print Firmware Sequencer information Date: Thu, 16 May 2024 18:45:08 +0530 Message-Id: <20240516131510.904787-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 13:15:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "K, Kiran" X-Patchwork-Id: 797319 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.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 568281465A3 for ; Thu, 16 May 2024 13:00:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715864456; cv=none; b=iG0mdar1URGaTEod0pun7lB7MAM3Ye/8WeyjieUFz/ZKeilBOyuLMGIlJlMuXyuU6mqxk3b7jGDTTLcmI1oqD7rtCH+wZJ6eM6fMFcJZO7thEM1Fa7EAGIWKtXOO5ZztDr5pPOw+nsxFg7D4wviupKtDT7zCukXEpQ24yRoLGkw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715864456; c=relaxed/simple; bh=nkCyRO4jkYn3c8ngYpJkV5ohAAjLZ1vlieH2SqDDF18=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=itCbGAWl0uBmrXRehn+ePzoCFz1IOiQIc0N0idiSIRS0Vev0pGlzmLPWE28xcsYCDA7GjVTBEzf+Jvum9NLPmPI2JpKxSe3XT+ILJ7sOWgceVDnj+jK3/srWyF6unLND6L+AMBYOR5Y89FMYAmtsSR2/S5nOONlhlpKHHmtguxw= 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=ihMqfx2N; arc=none smtp.client-ip=198.175.65.13 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="ihMqfx2N" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715864454; x=1747400454; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=nkCyRO4jkYn3c8ngYpJkV5ohAAjLZ1vlieH2SqDDF18=; b=ihMqfx2NtguPcRMeqJyrsvbUMMnbImmM+FDXkw0rcfyfoRUij+qjK66e F/gz059eBIg0NfmJlMVRdeGtZ4mAoZfG+Etm8YhKciYuGS8WKuBpNbihf AMqqKwwKFVFFCPUzFAlVLbVepi7MNqj1rNaG/kofpmH8bDu7WLnFF+pAx +msC7xu1gpOTs80xxzaDSNt65q5njnQ6AKhPDs1PcB+MhLx5VpxALRhyZ fKF3C8GTOAIwHzafGzJBxcYyUdDD7+Ghy3wJjmEaC+uxr/L6Khr8Xd/tH j4IRacX9KR80b9eRa0aI5J0BicSqRti6cn2/Rrmu54mLJPk1jJPmAFDLs Q==; X-CSE-ConnectionGUID: 1QJ1p/YtT6CItqc4u+/JRg== X-CSE-MsgGUID: T32O36tXRYu2ja1gsqkf6Q== X-IronPort-AV: E=McAfee;i="6600,9927,11074"; a="23108539" X-IronPort-AV: E=Sophos;i="6.08,164,1712646000"; d="scan'208";a="23108539" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 May 2024 06:00:53 -0700 X-CSE-ConnectionGUID: xJ6SNpgiR1qQ8HbkWFCWYQ== X-CSE-MsgGUID: NstKWZ2nQ8K9ojxbwE78LQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,164,1712646000"; d="scan'208";a="54623616" Received: from intel-lenovo-legion-y540-15irh-pg0.iind.intel.com ([10.224.186.95]) by fmviesa002.fm.intel.com with ESMTP; 16 May 2024 06:00:52 -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 v2 2/3] Bluetooth: btintel_pcie: Fix irq leak Date: Thu, 16 May 2024 18:45:09 +0530 Message-Id: <20240516131510.904787-2-kiran.k@intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240516131510.904787-1-kiran.k@intel.com> References: <20240516131510.904787-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. Fixes: c2b636b3f788 ("Bluetooth: btintel_pcie: Add support for PCIe transport") 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 13:15:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "K, Kiran" X-Patchwork-Id: 797504 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.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 DA11414658E for ; Thu, 16 May 2024 13:00:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715864457; cv=none; b=PNkSimwEUi+fYBhqUHseqLv4JRtwrnmxxAdtToGaC81+OtZg2w38qB2C5HdRov/j5tZyLW6IkxcBNReTSBAAaDidxSNd83ieU25YwrgpPDnFxxC4BlxW7kAHEt212QWefbBYODoFIwyqfXdSSz6/n1WD7J9bbXlpoYGiTFmC/MA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715864457; c=relaxed/simple; bh=UelzzseOVEb5xnEvTVZqUl1Wg2Y8s5/14CVh7FmByKc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=XssINKF4DoaslMBQV8ATBPato9tdq5rgFW++2N6yFsmLtpbzNHW9Zzjcy1a4/t8O2z3l8DvPVHlNGBh7Gj0SO7oWJGTU/ZGFASP61xcU7fOt4IYupFliYVzgc1wS+hVYH7P14BDIyerErGi5KsYKyBWzQS4q9oM064Ue3TIm3EU= 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=NcwFgYsr; arc=none smtp.client-ip=198.175.65.13 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="NcwFgYsr" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715864455; x=1747400455; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UelzzseOVEb5xnEvTVZqUl1Wg2Y8s5/14CVh7FmByKc=; b=NcwFgYsrBtpqE4Fv4rPFhZK0l6n29kFx672ro0SSTmnZebAn6sZ1P0Nh ClIShpOKHM46HNk7meVQx2gD0chNOQVEhB0jxGdPpuG8X1eN6jqIioYiT Aq/XZe3yMNM8gJiJJVIylgU1Rn/ymLaSskFGqsEAgJ4z6pMqY7or06RMj sLPOaaTt3SbSWZD4Z0Yl+k/ICqXWrSBKxThF0QefK26zPXrhcNLf1zvEf QoyVmbRY3fLa4QpUHkhTKP8+uFU2RtzgJGGhcFjnXJov8fsoHWq2427rB DJDLnKBMw2GugqTKzx9Lp3RE8pN1SeFGEAUe0v+Ya7nOT96pc6JyeeKii Q==; X-CSE-ConnectionGUID: Vxx1uErKSBW3oUO+I3U3EQ== X-CSE-MsgGUID: L9t4BmECQRiMCD6IuSsK9w== X-IronPort-AV: E=McAfee;i="6600,9927,11074"; a="23108551" X-IronPort-AV: E=Sophos;i="6.08,164,1712646000"; d="scan'208";a="23108551" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 May 2024 06:00:55 -0700 X-CSE-ConnectionGUID: OU6ZoC5eRz2okfKmOYXb/A== X-CSE-MsgGUID: iEXJhYNPQoS5zrrSmid/8Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,164,1712646000"; d="scan'208";a="54623627" Received: from intel-lenovo-legion-y540-15irh-pg0.iind.intel.com ([10.224.186.95]) by fmviesa002.fm.intel.com with ESMTP; 16 May 2024 06:00:53 -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 v2 3/3] Bluetooth: btintel_pcie: Fix REVERSE_INULL issue reported by coverity Date: Thu, 16 May 2024 18:45:10 +0530 Message-Id: <20240516131510.904787-3-kiran.k@intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240516131510.904787-1-kiran.k@intel.com> References: <20240516131510.904787-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. Fixes: c2b636b3f788 ("Bluetooth: btintel_pcie: Add support for PCIe transport") 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;