Skip to content

Commit 44da908

Browse files
authored
C3000 deactivate the HSUART DMA (#508)
<!-- Please make sure you've read and understood our contributing guidelines: https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md failure_prs.log skip_prs.log Make sure all your commits include a signature generated with `git commit -s` ** If this is a bug fix, make sure your description includes "fixes #xxxx", or "closes #xxxx" or "resolves #xxxx" Please provide the following information: --> #### Why I did it Intel C3000 CPU report a err,there is a possibility that the serial port function will be abnormal and the CPU will hang. ##### Work item tracking - Microsoft ADO **(number only)**: - After the merge, Microsoft will be asked to cherry-pick to the 202411 branch. #### How I did it C3000 deactivate the HSUART DMA #### How to verify it <!-- If PR needs to be backported, then the PR must be tested against the base branch and the earliest backport release branch and provide tested image version on these two branches. For example, if the PR is requested for master, 202211 and 202012, then the requester needs to provide test results on master and 202012. --> #### Which release branch to backport (provide reason below if selected) <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 - [ ] 202205 - [ ] 202211 - [ ] 202305 - [x] 202505 #### Tested branch (Please provide the tested image version) <!-- - Please provide tested image version - e.g. - [x] 20201231.100 --> - [ ] <!-- image version 1 --> - [ ] <!-- image version 2 --> #### Description for the changelog <!-- Write a short (one line) summary that describes the changes in this pull request for inclusion in the changelog: --> <!-- Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU. --> #### Link to config_db schema for YANG module changes <!-- Provide a link to config_db schema for the table for which YANG model is defined Link should point to correct section on https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md --> #### A picture of a cute animal (not mandatory but encouraged)
1 parent a0644a7 commit 44da908

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
From b63977b0e1421c641495940fafab9502a2a6d659 Mon Sep 17 00:00:00 2001
2+
From: Philo Shao <[email protected]>
3+
Date: Thu, 17 Apr 2025 02:17:18 -0500
4+
Subject: tty/8250: Deactivate the HSUART DMA for the DNV CPU
5+
6+
Intel DNV CPU reports an error, indicating that there is a possibility of abnormal serial port functionality and the CPU may hang.
7+
The HSUART DMA will be deactivated for the DNV CPU.
8+
9+
Signed-off-by: Philo Shao <[email protected]>
10+
---
11+
drivers/tty/serial/8250/8250_mid.c | 18 +++++++++++-------
12+
1 file changed, 11 insertions(+), 7 deletions(-)
13+
14+
diff --git a/drivers/tty/serial/8250/8250_mid.c b/drivers/tty/serial/8250/8250_mid.c
15+
index 2cc78a4bf..e4a5d6358 100644
16+
--- a/drivers/tty/serial/8250/8250_mid.c
17+
+++ b/drivers/tty/serial/8250/8250_mid.c
18+
@@ -321,13 +321,17 @@ static int mid8250_probe(struct pci_dev *pdev, const struct pci_device_id *id)
19+
if (!uart.port.membase)
20+
return -ENOMEM;
21+
22+
- ret = mid->board->setup(mid, &uart.port);
23+
- if (ret)
24+
- return ret;
25+
-
26+
- ret = mid8250_dma_setup(mid, &uart);
27+
- if (ret)
28+
- goto err;
29+
+ if (id->device != PCI_DEVICE_ID_INTEL_DNV_UART) {
30+
+ ret = mid->board->setup(mid, &uart.port);
31+
+ if (ret)
32+
+ return ret;
33+
+
34+
+ ret = mid8250_dma_setup(mid, &uart);
35+
+ if (ret)
36+
+ goto err;
37+
+ } else {
38+
+ uart.port.handle_irq = dnv_handle_irq;
39+
+ }
40+
41+
ret = serial8250_register_8250_port(&uart);
42+
if (ret < 0)
43+
--
44+
2.25.1
45+

patch/series

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ cisco-npu-disable-other-bars.patch
229229

230230
# Micas patches
231231
0001-fix-os-crash-caused-by-optoe-when-class-switch.patch
232+
0001-tty-8250-HSUART-DMA-be-deactivated-for-DNV-CPU.patch
232233

233234
# Fix to avoid kernel panic on Kernel 6.1.94
234235
# https://github.com/sonic-net/sonic-buildimage/issues/20901

0 commit comments

Comments
 (0)