Skip to content

Commit 535a076

Browse files
andy-shevgregkh
authored andcommitted
serial: 8250_pci: Share WCH IDs with parport_serial driver
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 16076ca commit 535a076

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
@@ -2593,6 +2593,11 @@
25932593

25942594
#define PCI_VENDOR_ID_REDHAT 0x1b36
25952595

2596+
#define PCI_VENDOR_ID_WCHIC 0x1c00
2597+
#define PCI_DEVICE_ID_WCHIC_CH382_0S1P 0x3050
2598+
#define PCI_DEVICE_ID_WCHIC_CH382_2S1P 0x3250
2599+
#define PCI_DEVICE_ID_WCHIC_CH382_2S 0x3253
2600+
25962601
#define PCI_VENDOR_ID_SILICOM_DENMARK 0x1c2c
25972602

25982603
#define PCI_VENDOR_ID_AMAZON_ANNAPURNA_LABS 0x1c36
@@ -2647,6 +2652,12 @@
26472652
#define PCI_VENDOR_ID_AKS 0x416c
26482653
#define PCI_DEVICE_ID_AKS_ALADDINCARD 0x0100
26492654

2655+
#define PCI_VENDOR_ID_WCHCN 0x4348
2656+
#define PCI_DEVICE_ID_WCHCN_CH353_4S 0x3453
2657+
#define PCI_DEVICE_ID_WCHCN_CH353_2S1PF 0x5046
2658+
#define PCI_DEVICE_ID_WCHCN_CH353_1S1P 0x5053
2659+
#define PCI_DEVICE_ID_WCHCN_CH353_2S1P 0x7053
2660+
26502661
#define PCI_VENDOR_ID_ACCESSIO 0x494f
26512662
#define PCI_DEVICE_ID_ACCESSIO_WDG_CSM 0x22c0
26522663

0 commit comments

Comments
 (0)