Skip to content

Commit 097a9c7

Browse files
andy-shevmehmetb0
authored andcommitted
serial: 8250_pci: Share WCH IDs with parport_serial driver
BugLink: https://bugs.launchpad.net/bugs/2104873 [ Upstream commit 535a076 ] parport_serial driver uses subset of WCH IDs that are present in 8250_pci. Share them via pci_ids.h and switch parport_serial to use defined constants. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20241204031114.1029882-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Noah Wager <noah.wager@canonical.com>
1 parent 50c9b14 commit 097a9c7

File tree

3 files changed

+21
-12
lines changed

3 files changed

+21
-12
lines changed

drivers/parport/parport_serial.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,14 @@ static struct pci_device_id parport_serial_pci_tbl[] = {
266266
{ 0x1409, 0x7168, 0x1409, 0xd079, 0, 0, timedia_9079c },
267267

268268
/* WCH CARDS */
269-
{ 0x4348, 0x5053, PCI_ANY_ID, PCI_ANY_ID, 0, 0, wch_ch353_1s1p},
270-
{ 0x4348, 0x7053, 0x4348, 0x3253, 0, 0, wch_ch353_2s1p},
271-
{ 0x1c00, 0x3050, 0x1c00, 0x3050, 0, 0, wch_ch382_0s1p},
272-
{ 0x1c00, 0x3250, 0x1c00, 0x3250, 0, 0, wch_ch382_2s1p},
269+
{ PCI_VENDOR_ID_WCHCN, PCI_DEVICE_ID_WCHCN_CH353_1S1P,
270+
PCI_ANY_ID, PCI_ANY_ID, 0, 0, wch_ch353_1s1p },
271+
{ PCI_VENDOR_ID_WCHCN, PCI_DEVICE_ID_WCHCN_CH353_2S1P,
272+
0x4348, 0x3253, 0, 0, wch_ch353_2s1p },
273+
{ PCI_VENDOR_ID_WCHIC, PCI_DEVICE_ID_WCHIC_CH382_0S1P,
274+
0x1c00, 0x3050, 0, 0, wch_ch382_0s1p },
275+
{ PCI_VENDOR_ID_WCHIC, PCI_DEVICE_ID_WCHIC_CH382_2S1P,
276+
0x1c00, 0x3250, 0, 0, wch_ch382_2s1p },
273277

274278
/* BrainBoxes PX272/PX306 MIO card */
275279
{ PCI_VENDOR_ID_INTASHIELD, 0x4100,

drivers/tty/serial/8250/8250_pci.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,23 +64,17 @@
6464
#define PCIE_DEVICE_ID_NEO_2_OX_IBM 0x00F6
6565
#define PCI_DEVICE_ID_PLX_CRONYX_OMEGA 0xc001
6666
#define PCI_DEVICE_ID_INTEL_PATSBURG_KT 0x1d3d
67-
#define PCI_VENDOR_ID_WCHCN 0x4348
67+
6868
#define PCI_DEVICE_ID_WCHCN_CH352_2S 0x3253
69-
#define PCI_DEVICE_ID_WCHCN_CH353_4S 0x3453
70-
#define PCI_DEVICE_ID_WCHCN_CH353_2S1PF 0x5046
71-
#define PCI_DEVICE_ID_WCHCN_CH353_1S1P 0x5053
72-
#define PCI_DEVICE_ID_WCHCN_CH353_2S1P 0x7053
7369
#define PCI_DEVICE_ID_WCHCN_CH355_4S 0x7173
70+
7471
#define PCI_VENDOR_ID_AGESTAR 0x5372
7572
#define PCI_DEVICE_ID_AGESTAR_9375 0x6872
7673
#define PCI_DEVICE_ID_BROADCOM_TRUMANAGE 0x160a
7774
#define PCI_DEVICE_ID_AMCC_ADDIDATA_APCI7800 0x818e
7875

79-
#define PCI_VENDOR_ID_WCHIC 0x1c00
80-
#define PCI_DEVICE_ID_WCHIC_CH382_2S1P 0x3250
8176
#define PCI_DEVICE_ID_WCHIC_CH384_4S 0x3470
8277
#define PCI_DEVICE_ID_WCHIC_CH384_8S 0x3853
83-
#define PCI_DEVICE_ID_WCHIC_CH382_2S 0x3253
8478

8579
#define PCI_DEVICE_ID_MOXA_CP102E 0x1024
8680
#define PCI_DEVICE_ID_MOXA_CP102EL 0x1025

include/linux/pci_ids.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2589,6 +2589,11 @@
25892589

25902590
#define PCI_VENDOR_ID_REDHAT 0x1b36
25912591

2592+
#define PCI_VENDOR_ID_WCHIC 0x1c00
2593+
#define PCI_DEVICE_ID_WCHIC_CH382_0S1P 0x3050
2594+
#define PCI_DEVICE_ID_WCHIC_CH382_2S1P 0x3250
2595+
#define PCI_DEVICE_ID_WCHIC_CH382_2S 0x3253
2596+
25922597
#define PCI_VENDOR_ID_SILICOM_DENMARK 0x1c2c
25932598

25942599
#define PCI_VENDOR_ID_AMAZON_ANNAPURNA_LABS 0x1c36
@@ -2643,6 +2648,12 @@
26432648
#define PCI_VENDOR_ID_AKS 0x416c
26442649
#define PCI_DEVICE_ID_AKS_ALADDINCARD 0x0100
26452650

2651+
#define PCI_VENDOR_ID_WCHCN 0x4348
2652+
#define PCI_DEVICE_ID_WCHCN_CH353_4S 0x3453
2653+
#define PCI_DEVICE_ID_WCHCN_CH353_2S1PF 0x5046
2654+
#define PCI_DEVICE_ID_WCHCN_CH353_1S1P 0x5053
2655+
#define PCI_DEVICE_ID_WCHCN_CH353_2S1P 0x7053
2656+
26462657
#define PCI_VENDOR_ID_ACCESSIO 0x494f
26472658
#define PCI_DEVICE_ID_ACCESSIO_WDG_CSM 0x22c0
26482659

0 commit comments

Comments
 (0)