mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: micas-opensource <zjianan156@gmail.com>
To: andy@kernel.org, gregkh@linuxfoundation.org, jirislaby@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
	Philo Shao <philo@micasnetworks.com>
Subject: tty/8250: Deactivate the HSUART DMA for the DNV CPU
Date: Tue, 24 Jun 2025 22:14:09 -0500	[thread overview]
Message-ID: <20250625031409.2404219-1-opensource@ruijie.com.cn> (raw)

From: Philo Shao <philo@micasnetworks.com>

Intel DNV CPU reports an error, indicating that there is a possibility of abnormal serial port functionality and the CPU may hang. 
The HSUART DMA will be deactivated for the DNV CPU.

Signed-off-by: Philo Shao<philo@micasnetworks.com>
---
 drivers/tty/serial/8250/8250_mid.c | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_mid.c b/drivers/tty/serial/8250/8250_mid.c
index 2cc78a4bf..e4a5d6358 100644
--- a/drivers/tty/serial/8250/8250_mid.c
+++ b/drivers/tty/serial/8250/8250_mid.c
@@ -321,13 +321,17 @@ static int mid8250_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	if (!uart.port.membase)
 		return -ENOMEM;
 
-	ret = mid->board->setup(mid, &uart.port);
-	if (ret)
-		return ret;
-
-	ret = mid8250_dma_setup(mid, &uart);
-	if (ret)
-		goto err;
+	if (id->device != PCI_DEVICE_ID_INTEL_DNV_UART) {
+		ret = mid->board->setup(mid, &uart.port);
+		if (ret)
+			return ret;
+
+		ret = mid8250_dma_setup(mid, &uart);
+		if (ret)
+			goto err;
+	} else {
+		uart.port.handle_irq = dnv_handle_irq;
+	}
 
 	ret = serial8250_register_8250_port(&uart);
 	if (ret < 0)
-- 
2.25.1


             reply	other threads:[~2025-06-25  3:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-25  3:14 micas-opensource [this message]
2025-06-25  4:33 ` Andy Shevchenko

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=20250625031409.2404219-1-opensource@ruijie.com.cn \
    --to=zjianan156@gmail.com \
    --cc=andy@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=philo@micasnetworks.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

all inboxes | Powered by JetHome®