Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Wentong Wu <wentong.wu@intel.com>
To: sakari.ailus@linux.intel.com, tomas.winkler@intel.com,
	gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org, Wentong Wu <wentong.wu@intel.com>,
	stable@vger.kernel.org, Jason Chen <jason.z.chen@intel.com>
Subject: [PATCH v4 1/5] mei: vsc: Enhance IVSC chipset stability during warm reboot
Date: Tue, 25 Jun 2024 16:10:43 +0800	[thread overview]
Message-ID: <20240625081047.4178494-2-wentong.wu@intel.com> (raw)
In-Reply-To: <20240625081047.4178494-1-wentong.wu@intel.com>

During system shutdown, incorporate reset logic to ensure the IVSC
chipset remains in a valid state. This adjustment guarantees that
the IVSC chipset operates in a known state following a warm reboot.

Fixes: 566f5ca97680 ("mei: Add transport driver for IVSC device")
Cc: stable@vger.kernel.org # for 6.8+
Signed-off-by: Wentong Wu <wentong.wu@intel.com>
Tested-by: Jason Chen <jason.z.chen@intel.com>
---
 drivers/misc/mei/vsc-tp.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/misc/mei/vsc-tp.c b/drivers/misc/mei/vsc-tp.c
index e6a98dba8a73..5f3195636e53 100644
--- a/drivers/misc/mei/vsc-tp.c
+++ b/drivers/misc/mei/vsc-tp.c
@@ -568,6 +568,19 @@ static void vsc_tp_remove(struct spi_device *spi)
 	free_irq(spi->irq, tp);
 }
 
+static void vsc_tp_shutdown(struct spi_device *spi)
+{
+	struct vsc_tp *tp = spi_get_drvdata(spi);
+
+	platform_device_unregister(tp->pdev);
+
+	mutex_destroy(&tp->mutex);
+
+	vsc_tp_reset(tp);
+
+	free_irq(spi->irq, tp);
+}
+
 static const struct acpi_device_id vsc_tp_acpi_ids[] = {
 	{ "INTC1009" }, /* Raptor Lake */
 	{ "INTC1058" }, /* Tiger Lake */
@@ -580,6 +593,7 @@ MODULE_DEVICE_TABLE(acpi, vsc_tp_acpi_ids);
 static struct spi_driver vsc_tp_driver = {
 	.probe = vsc_tp_probe,
 	.remove = vsc_tp_remove,
+	.shutdown = vsc_tp_shutdown,
 	.driver = {
 		.name = "vsc-tp",
 		.acpi_match_table = vsc_tp_acpi_ids,
-- 
2.34.1


       reply	other threads:[~2024-06-25  8:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240625081047.4178494-1-wentong.wu@intel.com>
2024-06-25  8:10 ` Wentong Wu [this message]
2024-06-25  8:45   ` [PATCH v4 1/5] mei: vsc: Enhance IVSC chipset stability during warm reboot Sakari Ailus
2024-06-25  8:10 ` [PATCH v4 2/5] mei: vsc: Prevent timeout error with added delay post-firmware download Wentong Wu
2024-06-25  8:45   ` Sakari Ailus
2024-06-25  8:10 ` [PATCH v4 3/5] mei: vsc: Utilize the appropriate byte order swap function Wentong Wu
2024-06-25  8:45   ` Sakari Ailus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240625081047.4178494-2-wentong.wu@intel.com \
    --to=wentong.wu@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jason.z.chen@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=stable@vger.kernel.org \
    --cc=tomas.winkler@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox