Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Use PCI_VENDOR_* and PCI_PRODUCT_*. Fixes PR#46303.



details:   https://anonhg.NetBSD.org/src/rev/d58a52b16b59
branches:  trunk
changeset: 780774:d58a52b16b59
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Sun Aug 05 17:42:01 2012 +0000

description:
Use PCI_VENDOR_* and PCI_PRODUCT_*. Fixes PR#46303.

diffstat:

 sys/dev/pci/pucdata.c |  330 +++++++++++++++++++++++++++++--------------------
 1 files changed, 196 insertions(+), 134 deletions(-)

diffs (truncated from 1267 to 300 lines):

diff -r 2719d98239db -r d58a52b16b59 sys/dev/pci/pucdata.c
--- a/sys/dev/pci/pucdata.c     Sun Aug 05 17:40:00 2012 +0000
+++ b/sys/dev/pci/pucdata.c     Sun Aug 05 17:42:01 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pucdata.c,v 1.77 2012/07/27 21:51:31 matt Exp $        */
+/*     $NetBSD: pucdata.c,v 1.78 2012/08/05 17:42:01 msaitoh Exp $     */
 
 /*
  * Copyright (c) 1998, 1999 Christopher G. Demetriou.  All rights reserved.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pucdata.c,v 1.77 2012/07/27 21:51:31 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pucdata.c,v 1.78 2012/08/05 17:42:01 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -117,7 +117,7 @@
         * Uses an AMCC chip as PCI bridge.
         */
        {   "Addi-Data APCI-7800",
-           {   PCI_VENDOR_AMCIRCUITS, 0x818e, 0, 0  },
+           {   PCI_VENDOR_AMCIRCUITS, PCI_PRODUCT_AMCIRCUITS_ADDI7800, 0, 0  },
            {   0xffff, 0xffff, 0, 0  },
            {
                { PUC_PORT_TYPE_COM, 0x14, 0x00, COM_FREQ },
@@ -205,7 +205,8 @@
         * Comtrol
         */
        {   "Comtrol RocketPort 550/8 RJ11 part A",
-           {   PCI_VENDOR_COMTROL, 0x8010, 0, 0 },
+           {   PCI_VENDOR_COMTROL, PCI_PRODUCT_COMTROL_ROCKETPORT550811A,
+               0, 0 },
            {   0xffff, 0xffff, 0,      0 },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ * 4},
@@ -215,7 +216,8 @@
            },
        },
        {   "Comtrol RocketPort 550/8 RJ11 part B",
-           {   PCI_VENDOR_COMTROL, 0x8011, 0, 0 },
+           {   PCI_VENDOR_COMTROL, PCI_PRODUCT_COMTROL_ROCKETPORT550811B,
+               0, 0 },
            {   0xffff, 0xffff, 0,      0 },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ * 4},
@@ -225,7 +227,8 @@
            },
        },
        {   "Comtrol RocketPort 550/8 Octa part A",
-           {   PCI_VENDOR_COMTROL, 0x8012, 0, 0 },
+           {   PCI_VENDOR_COMTROL, PCI_PRODUCT_COMTROL_ROCKETPORT5508OA,
+               0, 0 },
            {   0xffff, 0xffff, 0,      0 },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ * 4},
@@ -235,7 +238,8 @@
            },
        },
        {   "Comtrol RocketPort 550/8 Octa part B",
-           {   PCI_VENDOR_COMTROL, 0x8013, 0, 0 },
+           {   PCI_VENDOR_COMTROL, PCI_PRODUCT_COMTROL_ROCKETPORT5508OB,
+               0, 0 },
            {   0xffff, 0xffff, 0,      0 },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ * 4},
@@ -245,7 +249,7 @@
            },
        },
        {   "Comtrol RocketPort 550/4 RJ45",
-           {   PCI_VENDOR_COMTROL, 0x8014, 0, 0 },
+           {   PCI_VENDOR_COMTROL, PCI_PRODUCT_COMTROL_ROCKETPORT5504, 0, 0 },
            {   0xffff, 0xffff, 0,      0 },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ * 4},
@@ -255,7 +259,7 @@
            },
        },
        {   "Comtrol RocketPort 550/Quad",
-           {   PCI_VENDOR_COMTROL, 0x8015, 0, 0 },
+           {   PCI_VENDOR_COMTROL, PCI_PRODUCT_COMTROL_ROCKETPORT550Q, 0, 0 },
            {   0xffff, 0xffff, 0,      0 },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ * 4},
@@ -265,7 +269,8 @@
            },
        },
        {   "Comtrol RocketPort 550/16 part A",
-           {   PCI_VENDOR_COMTROL, 0x8016, 0, 0 },
+           {   PCI_VENDOR_COMTROL, PCI_PRODUCT_COMTROL_ROCKETPORT55016A,
+               0, 0 },
            {   0xffff, 0xffff, 0,      0 },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ * 4},
@@ -275,7 +280,8 @@
            },
        },
        {   "Comtrol RocketPort 550/16 part B",
-           {   PCI_VENDOR_COMTROL, 0x8017, 0, 0 },
+           {   PCI_VENDOR_COMTROL, PCI_PRODUCT_COMTROL_ROCKETPORT55016B,
+               0, 0 },
            {   0xffff, 0xffff, 0,      0 },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ * 4},
@@ -293,7 +299,8 @@
            },
        },
        {   "Comtrol RocketPort 550/8 part A",
-           {   PCI_VENDOR_COMTROL, 0x8018, 0, 0 },
+           {   PCI_VENDOR_COMTROL, PCI_PRODUCT_COMTROL_ROCKETPORT5508A,
+               0, 0 },
            {   0xffff, 0xffff, 0,      0 },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ * 4},
@@ -303,7 +310,8 @@
            },
        },
        {   "Comtrol RocketPort 550/8 part B",
-           {   PCI_VENDOR_COMTROL, 0x8019, 0, 0 },
+           {   PCI_VENDOR_COMTROL, PCI_PRODUCT_COMTROL_ROCKETPORT5508B,
+               0, 0 },
            {   0xffff, 0xffff, 0,      0 },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ * 4},
@@ -383,7 +391,7 @@
        },
 
        {   "EXAR XR17D152",
-           {   PCI_VENDOR_EXAR, 0x0152, 0,      0       },
+           {   PCI_VENDOR_EXAR, PCI_PRODUCT_EXAR_XR17D152, 0,      0       },
            {   0xffff, 0xffff, 0,      0       },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x0000, COM_FREQ * 8 },
@@ -391,7 +399,7 @@
            },
        },
        {   "EXAR XR17D154",
-           {   PCI_VENDOR_EXAR, 0x0154, 0,      0       },
+           {   PCI_VENDOR_EXAR, PCI_PRODUCT_EXAR_XR17D154, 0,      0       },
            {   0xffff, 0xffff, 0,      0       },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x0000, COM_FREQ * 8 },
@@ -407,7 +415,7 @@
         * config EEPROM.
         */
        {   "Multi-Tech ISI5634PCI/4",
-           {   PCI_VENDOR_EXAR, 0x0158, 0x2205,      0x2003       },
+           {   PCI_VENDOR_EXAR, PCI_PRODUCT_EXAR_XR17D158, 0x2205,      0x2003       },
            {   0xffff, 0xffff, 0xffff,      0xffff       },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x0000, COM_FREQ * 8 },
@@ -418,7 +426,7 @@
        },
 
        {   "EXAR XR17D158",
-           {   PCI_VENDOR_EXAR, 0x0158, 0,      0       },
+           {   PCI_VENDOR_EXAR, PCI_PRODUCT_EXAR_XR17D158, 0,      0       },
            {   0xffff, 0xffff, 0,      0       },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x0000, COM_FREQ * 8 },
@@ -446,7 +454,7 @@
 
        /* I-O DATA RSA-PCI: 2S */
        {   "I-O DATA RSA-PCI 2-port serial",
-           {   PCI_VENDOR_IODATA, 0x0007, 0, 0 },
+           {   PCI_VENDOR_IODATA, PCI_PRODUCT_IODATA_RSAPCI, 0, 0 },
            {   0xffff, 0xffff, 0, 0 },
            {
                { PUC_PORT_TYPE_COM, 0x14, 0x00, COM_FREQ },
@@ -456,7 +464,7 @@
  
        /* Lava Computers 2SP-PCI */
        {   "Lava Computers 2SP-PCI parallel port",
-           {   PCI_VENDOR_LAVA,        0x8000, 0,      0       },
+           {   PCI_VENDOR_LAVA,        PCI_PRODUCT_LAVA_TWOSP_1P, 0, 0 },
            {   0xffff, 0xffff, 0,      0       },
            {
                { PUC_PORT_TYPE_LPT, 0x10, 0x00, 0x00 },
@@ -465,7 +473,7 @@
 
        /* Lava Computers 2SP-PCI and Quattro-PCI serial ports */
        {   "Lava Computers dual serial port",
-           {   PCI_VENDOR_LAVA,        0x0100, 0,      0       },
+           {   PCI_VENDOR_LAVA,        PCI_PRODUCT_LAVA_TWOSP_2S, 0, 0 },
            {   0xffff, 0xfffc, 0,      0       },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
@@ -475,7 +483,7 @@
 
        /* Lava Computers 2SP-PCI and Quattro-PCI serial ports */
        {   "Lava Computers Quattro A",
-           {   PCI_VENDOR_LAVA,        0x0101, 0,      0       },
+           {   PCI_VENDOR_LAVA,        PCI_PRODUCT_LAVA_QUATTRO_AB, 0, 0 },
            {   0xffff, 0xfffc, 0,      0       },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
@@ -485,7 +493,7 @@
 
        /* Lava Computers 2SP-PCI and Quattro-PCI serial ports */
        {   "Lava Computers Quattro B",
-           {   PCI_VENDOR_LAVA,        0x0102, 0,      0       },
+           {   PCI_VENDOR_LAVA,        PCI_PRODUCT_LAVA_QUATTRO_CD, 0, 0 },
            {   0xffff, 0xfffc, 0,      0       },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
@@ -495,7 +503,7 @@
 
        /* Lava Computers DSerial PCI serial ports */
        {   "Lava Computers serial port",
-           {   PCI_VENDOR_LAVA,        0x0110, 0,      0       },
+           {   PCI_VENDOR_LAVA,        PCI_PRODUCT_LAVA_IOFLEX_2S_0, 0, 0 },
            {   0xffff, 0xfffc, 0,      0       },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
@@ -504,7 +512,7 @@
 
        /* Lava Computers Quattro-PCI serial ports */
        {   "Lava Quattro-PCI A 4-port serial",
-           {   PCI_VENDOR_LAVA, 0x0120, 0,     0       },
+           {   PCI_VENDOR_LAVA, PCI_PRODUCT_LAVA_QUATTRO_AB2, 0, 0 },
            {   0xffff, 0xfffc, 0,      0       },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
@@ -514,7 +522,7 @@
 
        /* Lava Computers Quattro-PCI serial ports */
        {   "Lava Quattro-PCI B 4-port serial",
-           {   PCI_VENDOR_LAVA, 0x0121, 0,     0       },
+           {   PCI_VENDOR_LAVA, PCI_PRODUCT_LAVA_QUATTRO_CD2, 0, 0 },
            {   0xffff, 0xfffc, 0,      0       },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
@@ -524,7 +532,7 @@
 
        /* Lava Computers Octopus-550 serial ports */
        {   "Lava Computers Octopus-550 8-port serial",
-           {   PCI_VENDOR_LAVA,        0x0180, 0,      0       },
+           {   PCI_VENDOR_LAVA,        PCI_PRODUCT_LAVA_OCTOPUS550_0, 0, 0 },
            {   0xffff, 0xfffc, 0,      0       },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
@@ -536,7 +544,7 @@
 
        /* Lava Computers Octopus-550 serial ports */
        {   "Lava Computers Octopus-550 B 8-port serial",
-           {   PCI_VENDOR_LAVA,        0x0181, 0,      0       },
+           {   PCI_VENDOR_LAVA,        PCI_PRODUCT_LAVA_OCTOPUS550_1, 0, 0 },
            {   0xffff, 0xfffc, 0,      0       },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
@@ -548,7 +556,8 @@
 
        /* Actiontec  56K PCI Master */
        {   "Actiontec 56K PCI Master",
-           {   PCI_VENDOR_LUCENT,      0x0480, 0x0,    0x0     },
+           {   PCI_VENDOR_LUCENT,      PCI_PRODUCT_LUCENT_VENUSMODEM,
+               0x0, 0x0 },
            {   0xffff, 0xffff, 0x0,    0x0     },
            {
                { PUC_PORT_TYPE_COM,    0x14,   0x00, COM_FREQ },
@@ -560,7 +569,8 @@
         * uses a PCI interface implemented in FPGA.
         */
        {   "Middle Digital, Inc. Weasel serial port",
-           {   PCI_VENDOR_MIDDLE_DIGITAL,      0x9051, 0,      0       },
+           {   PCI_VENDOR_MIDDLE_DIGITAL,
+               PCI_PRODUCT_MIDDLE_DIGITAL_WEASEL_SERIAL, 0, 0 },
            {   0xffff, 0xffff, 0,      0       },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
@@ -569,7 +579,7 @@
 
        /* Moxa Technologies Co., Ltd. PCI I/O Card 2S RS232 */
        {   "Moxa Technologies, SmartIO CP-102/PCI",
-           {   PCI_VENDOR_MOXA,        0x1022, 0,      0       },
+           {   PCI_VENDOR_MOXA,        PCI_PRODUCT_MOXA_CP102U, 0, 0 },
            {   0xffff, 0xffff, 0,      0       },
            {
                { PUC_PORT_TYPE_COM, 0x18, 0x00, COM_FREQ * 8 },
@@ -579,7 +589,7 @@
 
        /* Moxa Technologies Co., Ltd. PCI I/O Card 4S RS232/422/485 */
        {   "Moxa Technologies, SmartIO C104H/PCI",
-           {   PCI_VENDOR_MOXA,        0x1040, 0,      0       },
+           {   PCI_VENDOR_MOXA,        PCI_PRODUCT_MOXA_C104H, 0, 0 },
            {   0xffff, 0xffff, 0,      0       },
            {
                { PUC_PORT_TYPE_COM, 0x18, 0x00, COM_FREQ * 8 },
@@ -591,7 +601,7 @@
 
        /* Moxa Technologies Co., Ltd. PCI I/O Card 4S RS232 */
        {   "Moxa Technologies, SmartIO CP-104/PCI",
-           {   PCI_VENDOR_MOXA,        0x1041, 0,      0       },
+           {   PCI_VENDOR_MOXA,        PCI_PRODUCT_MOXA_CP104, 0, 0 },
            {   0xffff, 0xffff, 0,      0       },
            {
                { PUC_PORT_TYPE_COM, 0x18, 0x00, COM_FREQ * 8 },
@@ -603,7 +613,7 @@
 



Home | Main Index | Thread Index | Old Index