2013-07-16 15:25:40

by Ian Abbott

[permalink] [raw]
Subject: [PATCH 0/4] pci_ids, 8250_pci: remove PCI_VENDOR_ID_ADDIDATA_OLD

The 8250_pci driver uses PCI_VENDOR_ID_ADDIDATA_OLD (0x10e8),
PCI_DEVICE_ID_ADDIDATA_APCI7800 (0x818e) to recognize the original
ADDI-DATA APCI-7800 PCI serial card. However vendor ID 0x10e8 was
assigned by PCI-SIG to Applied Micro Circuits Corporation (AMCC) and the
associated device ID 0x818e was assigned by AMCC to ADDI-DATA.

Comedi already defines PCI_VENDOR_ID_AMCC as 0x10e8 in one of its header
files, so that definition can be moved into pci_ids.h and the 8250_pci
driver changed to use it. The PCI_DEVICE_ID_ADDIDATA_APCI7800 define
seems out of place in pci_ids.h since it isn't associated with
ADDI-DATA's vendor ID but with AMCC's vendor ID. It's only used in
8250_pci.c so it can be moved there and renamed to something more
sensible.

1) pci_ids.h: move PCI_VENDOR_ID_AMCC here
2) serial: 8250_pci: replace PCI_VENDOR_ID_ADDIDATA_OLD
3) serial: 8250_pci: use local device ID for ADDI-DATA APCI-7800
4) pci_ids.h: remove PCI_VENDOR_ID_ADDIDATA_OLD and
PCI_DEVICE_ID_ADDIDATA_APCI7800

drivers/staging/comedi/comedidev.h | 1 -
drivers/tty/serial/8250/8250_pci.c | 9 +++++----
include/linux/pci_ids.h | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)


2013-07-16 15:25:43

by Ian Abbott

[permalink] [raw]
Subject: [PATCH 3/4] serial: 8250_pci: use local device ID for ADDI-DATA APCI-7800

The quirks and PCI ID table entries for the original ADDI-DATA APCI-7800
(not the newer APCI-7800-3) use PCI_DEVICE_ID_ADDIDATA_APCI7800 from
<linux/pci_ids.h> but the device ID was actually assigned to ADDI-DATA
by Applied Micro Circuits Corporation (PCI_VENDOR_ID_AMCC). Replace it
locally with #define PCI_DEVICE_ID_AMCC_ADDIDATA_APCI7800.

Signed-off-by: Ian Abbott <[email protected]>
---
drivers/tty/serial/8250/8250_pci.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index 3e3d59b..e9b915c 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -1565,6 +1565,7 @@ pci_wch_ch353_setup(struct serial_private *priv,
#define PCI_DEVICE_ID_COMMTECH_4228PCIE 0x0021
#define PCI_DEVICE_ID_COMMTECH_4222PCIE 0x0022
#define PCI_DEVICE_ID_BROADCOM_TRUMANAGE 0x160a
+#define PCI_DEVICE_ID_AMCC_ADDIDATA_APCI7800 0x818e

#define PCI_VENDOR_ID_SUNIX 0x1fd4
#define PCI_DEVICE_ID_SUNIX_1999 0x1999
@@ -1588,7 +1589,7 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = {
*/
{
.vendor = PCI_VENDOR_ID_AMCC,
- .device = PCI_DEVICE_ID_ADDIDATA_APCI7800,
+ .device = PCI_DEVICE_ID_AMCC_ADDIDATA_APCI7800,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.setup = addidata_apci7800_setup,
@@ -4698,7 +4699,7 @@ static struct pci_device_id serial_pci_tbl[] = {
pbn_b0_1_115200 },

{ PCI_VENDOR_ID_AMCC,
- PCI_DEVICE_ID_ADDIDATA_APCI7800,
+ PCI_DEVICE_ID_AMCC_ADDIDATA_APCI7800,
PCI_ANY_ID,
PCI_ANY_ID,
0,
--
1.8.2.1

2013-07-16 15:25:41

by Ian Abbott

[permalink] [raw]
Subject: [PATCH 2/4] serial: 8250_pci: replace PCI_VENDOR_ID_ADDIDATA_OLD

PCI_VENDOR_ID_ADDIDATA_OLD has the same value (0x10e8) as
PCI_VENDOR_ID_AMCC in <linux/pci_ids.h>. The vender ID is actually
assigned to Applied Micro Circuits Corporation. The 8250_pci driver
uses PCI_VENDOR_ID_ADDIDATA_OLD in the lists of quirks and PCI IDs for
the ADDI-DATA APCI-7800 card. Change it to use the more accurate
PCI_VENDOR_ID_AMCC.

Signed-off-by: Ian Abbott <[email protected]>
---
drivers/tty/serial/8250/8250_pci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index c52948b..3e3d59b 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -1587,7 +1587,7 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = {
* ADDI-DATA GmbH communication cards <[email protected]>
*/
{
- .vendor = PCI_VENDOR_ID_ADDIDATA_OLD,
+ .vendor = PCI_VENDOR_ID_AMCC,
.device = PCI_DEVICE_ID_ADDIDATA_APCI7800,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
@@ -4697,7 +4697,7 @@ static struct pci_device_id serial_pci_tbl[] = {
0,
pbn_b0_1_115200 },

- { PCI_VENDOR_ID_ADDIDATA_OLD,
+ { PCI_VENDOR_ID_AMCC,
PCI_DEVICE_ID_ADDIDATA_APCI7800,
PCI_ANY_ID,
PCI_ANY_ID,
--
1.8.2.1

2013-07-16 15:25:39

by Ian Abbott

[permalink] [raw]
Subject: [PATCH 4/4] pci_ids.h: remove PCI_VENDOR_ID_ADDIDATA_OLD and PCI_DEVICE_ID_ADDIDATA_APCI7800

These two defines are no longer used. They were only used by the PCI
serial driver "8250_pci" to support the original ADDI-DATA APCI-7800
card. In that driver, PCI_VENDOR_ID_ADDIDATA_OLD has been replaced with
PCI_VENDOR_ID_AMCC which has the same value (0x10e8), and
PCI_DEVICE_ID_ADDIDATA_APCI7800 has been replaced with a local #define
PCI_DEVICE_ID_AMCC_ADDIDATA_APCI7800 with the same value (0x818e).

Signed-off-by: Ian Abbott <[email protected]>
---
include/linux/pci_ids.h | 2 --
1 file changed, 2 deletions(-)

diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 9d99119..6dec3d6 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2258,12 +2258,10 @@
/*
* ADDI-DATA GmbH communication cards <[email protected]>
*/
-#define PCI_VENDOR_ID_ADDIDATA_OLD 0x10E8 /* actually AMCC */
#define PCI_VENDOR_ID_ADDIDATA 0x15B8
#define PCI_DEVICE_ID_ADDIDATA_APCI7500 0x7000
#define PCI_DEVICE_ID_ADDIDATA_APCI7420 0x7001
#define PCI_DEVICE_ID_ADDIDATA_APCI7300 0x7002
-#define PCI_DEVICE_ID_ADDIDATA_APCI7800 0x818E
#define PCI_DEVICE_ID_ADDIDATA_APCI7500_2 0x7009
#define PCI_DEVICE_ID_ADDIDATA_APCI7420_2 0x700A
#define PCI_DEVICE_ID_ADDIDATA_APCI7300_2 0x700B
--
1.8.2.1

2013-07-16 15:25:38

by Ian Abbott

[permalink] [raw]
Subject: [PATCH 1/4] pci_ids.h: move PCI_VENDOR_ID_AMCC here

PCI_VENDOR_ID_AMCC is defined locally in
"drivers/staging/comedi/comedidev.h" for a few comedi hardware drivers,
namely "adl_pci9118", "addi_apci_1500" and "addi_apci_3120" (also
"addi_apci_1710" but that is not currently built and will probably be
removed soon). Move the define into "include/linux/pci_ids.h" as it is
shared by several drivers (albeit all comedi drivers currently).

PCI_VENDOR_ID_AMCC happens to have the same value (0x10e8) as
PCI_VENDOR_ID_ADDIDATA_OLD. The vendor ID is actually assigned to
Applied Micro Circuits Corporation and Addi-Data were using device IDs
assigned by AMCC on some of their earlier PCI boards. The
PCI_VENDOR_ID_ADDIDATA_OLD define is still being used by the "8250_pci"
PCI serial board driver.

Signed-off-by: Ian Abbott <[email protected]>
---
drivers/staging/comedi/comedidev.h | 1 -
include/linux/pci_ids.h | 4 +++-
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h
index b75915f..9f4f73f 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -400,7 +400,6 @@ int comedi_driver_unregister(struct comedi_driver *);
*/
#define PCI_VENDOR_ID_KOLTER 0x1001
#define PCI_VENDOR_ID_ICP 0x104c
-#define PCI_VENDOR_ID_AMCC 0x10e8
#define PCI_VENDOR_ID_DT 0x1116
#define PCI_VENDOR_ID_IOTECH 0x1616
#define PCI_VENDOR_ID_CONTEC 0x1221
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 3bed2e8..9d99119 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1311,6 +1311,8 @@
#define PCI_DEVICE_ID_IMS_TT128 0x9128
#define PCI_DEVICE_ID_IMS_TT3D 0x9135

+#define PCI_VENDOR_ID_AMCC 0x10e8
+
#define PCI_VENDOR_ID_INTERG 0x10ea
#define PCI_DEVICE_ID_INTERG_1682 0x1682
#define PCI_DEVICE_ID_INTERG_2000 0x2000
@@ -2256,7 +2258,7 @@
/*
* ADDI-DATA GmbH communication cards <[email protected]>
*/
-#define PCI_VENDOR_ID_ADDIDATA_OLD 0x10E8
+#define PCI_VENDOR_ID_ADDIDATA_OLD 0x10E8 /* actually AMCC */
#define PCI_VENDOR_ID_ADDIDATA 0x15B8
#define PCI_DEVICE_ID_ADDIDATA_APCI7500 0x7000
#define PCI_DEVICE_ID_ADDIDATA_APCI7420 0x7001
--
1.8.2.1

2013-07-19 21:37:48

by Bjorn Helgaas

[permalink] [raw]
Subject: Re: [PATCH 0/4] pci_ids, 8250_pci: remove PCI_VENDOR_ID_ADDIDATA_OLD

On Tue, Jul 16, 2013 at 9:14 AM, Ian Abbott <[email protected]> wrote:
> The 8250_pci driver uses PCI_VENDOR_ID_ADDIDATA_OLD (0x10e8),
> PCI_DEVICE_ID_ADDIDATA_APCI7800 (0x818e) to recognize the original
> ADDI-DATA APCI-7800 PCI serial card. However vendor ID 0x10e8 was
> assigned by PCI-SIG to Applied Micro Circuits Corporation (AMCC) and the
> associated device ID 0x818e was assigned by AMCC to ADDI-DATA.
>
> Comedi already defines PCI_VENDOR_ID_AMCC as 0x10e8 in one of its header
> files, so that definition can be moved into pci_ids.h and the 8250_pci
> driver changed to use it. The PCI_DEVICE_ID_ADDIDATA_APCI7800 define
> seems out of place in pci_ids.h since it isn't associated with
> ADDI-DATA's vendor ID but with AMCC's vendor ID. It's only used in
> 8250_pci.c so it can be moved there and renamed to something more
> sensible.
>
> 1) pci_ids.h: move PCI_VENDOR_ID_AMCC here
> 2) serial: 8250_pci: replace PCI_VENDOR_ID_ADDIDATA_OLD
> 3) serial: 8250_pci: use local device ID for ADDI-DATA APCI-7800
> 4) pci_ids.h: remove PCI_VENDOR_ID_ADDIDATA_OLD and
> PCI_DEVICE_ID_ADDIDATA_APCI7800
>
> drivers/staging/comedi/comedidev.h | 1 -
> drivers/tty/serial/8250/8250_pci.c | 9 +++++----
> include/linux/pci_ids.h | 4 ++--
> 3 files changed, 7 insertions(+), 7 deletions(-)

For patches 1 & 4 (the ones that touch pci_ids.h):

Acked-by: Bjorn Helgaas <[email protected]>

Please merge them along with the 8250 changes.

2013-07-26 23:11:29

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 0/4] pci_ids, 8250_pci: remove PCI_VENDOR_ID_ADDIDATA_OLD

On Fri, Jul 19, 2013 at 03:37:26PM -0600, Bjorn Helgaas wrote:
> On Tue, Jul 16, 2013 at 9:14 AM, Ian Abbott <[email protected]> wrote:
> > The 8250_pci driver uses PCI_VENDOR_ID_ADDIDATA_OLD (0x10e8),
> > PCI_DEVICE_ID_ADDIDATA_APCI7800 (0x818e) to recognize the original
> > ADDI-DATA APCI-7800 PCI serial card. However vendor ID 0x10e8 was
> > assigned by PCI-SIG to Applied Micro Circuits Corporation (AMCC) and the
> > associated device ID 0x818e was assigned by AMCC to ADDI-DATA.
> >
> > Comedi already defines PCI_VENDOR_ID_AMCC as 0x10e8 in one of its header
> > files, so that definition can be moved into pci_ids.h and the 8250_pci
> > driver changed to use it. The PCI_DEVICE_ID_ADDIDATA_APCI7800 define
> > seems out of place in pci_ids.h since it isn't associated with
> > ADDI-DATA's vendor ID but with AMCC's vendor ID. It's only used in
> > 8250_pci.c so it can be moved there and renamed to something more
> > sensible.
> >
> > 1) pci_ids.h: move PCI_VENDOR_ID_AMCC here
> > 2) serial: 8250_pci: replace PCI_VENDOR_ID_ADDIDATA_OLD
> > 3) serial: 8250_pci: use local device ID for ADDI-DATA APCI-7800
> > 4) pci_ids.h: remove PCI_VENDOR_ID_ADDIDATA_OLD and
> > PCI_DEVICE_ID_ADDIDATA_APCI7800
> >
> > drivers/staging/comedi/comedidev.h | 1 -
> > drivers/tty/serial/8250/8250_pci.c | 9 +++++----
> > include/linux/pci_ids.h | 4 ++--
> > 3 files changed, 7 insertions(+), 7 deletions(-)
>
> For patches 1 & 4 (the ones that touch pci_ids.h):
>
> Acked-by: Bjorn Helgaas <[email protected]>
>
> Please merge them along with the 8250 changes.

Thanks, will do.

greg k-h