From: Ian Abbott Date: Fri, 27 Feb 2015 15:07:35 +0000 (+0000) Subject: staging: comedi: adl_pci6208: combine PCI-6208 and PCI-6216 support X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=cd6b76604d1df088409856fade41b26675d5952e;p=linux-beck.git staging: comedi: adl_pci6208: combine PCI-6208 and PCI-6216 support This module's PCI device table has separate PCI device IDs for PCI-6208 and PCI-6216, but in reality, both boards and their cPCI and PCIe variants seem to have the same PCI device ID: 0x6208. The PCI subdevice ID doesn't seem to help either. It shouldn't do any harm to claim 16 AO channels for all devices supported by this driver. The original PCI-6216 is just a PCI-6208 with a daughter board providing the extra DACs. The data is clocked out to the DACs serially with no acknowledgment. I assume this would still happen when the DACs for the upper 8 channels are missing. Therefore, change the driver to support a single board type with 16 AO channels, and remove the suspicious PCI device ID for the PCI-6216. Evidence about lack of a separate PCI device ID for PCI-6216 follows.... 1. Jesus Vasquez reports the following lspci output for a PCIe-6216 on his Ubuntu 12.04 system: lspci -n -vvv 07:00.0 1180: 144a:6208 (rev 02) Subsystem: 144a:6208 Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/adl_pci6208.c b/drivers/staging/comedi/drivers/adl_pci6208.c index a3ea4b7c18dd..6fb41d47f891 100644 --- a/drivers/staging/comedi/drivers/adl_pci6208.c +++ b/drivers/staging/comedi/drivers/adl_pci6208.c @@ -19,12 +19,16 @@ /* * Driver: adl_pci6208 * Description: ADLink PCI-6208/6216 Series Multi-channel Analog Output Cards - * Devices: [ADLink] PCI-6208 (adl_pci6208), PCI-6216 (adl_pci6216) + * Devices: [ADLink] PCI-6208 (adl_pci6208), PCI-6216 * Author: nsyeow - * Updated: Fri, 30 Jan 2004 14:44:27 +0800 + * Updated: Wed, 11 Feb 2015 11:37:18 +0000 * Status: untested * * Configuration Options: not applicable, uses PCI auto config + * + * All supported devices share the same PCI device ID and are treated as a + * PCI-6216 with 16 analog output channels. On a PCI-6208, the upper 8 + * channels exist in registers, but don't go to DAC chips. */ #include @@ -47,7 +51,6 @@ enum pci6208_boardid { BOARD_PCI6208, - BOARD_PCI6216, }; struct pci6208_board { @@ -58,11 +61,7 @@ struct pci6208_board { static const struct pci6208_board pci6208_boards[] = { [BOARD_PCI6208] = { .name = "adl_pci6208", - .ao_chans = 8, - }, - [BOARD_PCI6216] = { - .name = "adl_pci6216", - .ao_chans = 16, + .ao_chans = 16, /* Only 8 usable on PCI-6208 */ }, }; @@ -218,7 +217,6 @@ static int adl_pci6208_pci_probe(struct pci_dev *dev, static const struct pci_device_id adl_pci6208_pci_table[] = { { PCI_VDEVICE(ADLINK, 0x6208), BOARD_PCI6208 }, - { PCI_VDEVICE(ADLINK, 0x6216), BOARD_PCI6216 }, { 0 } }; MODULE_DEVICE_TABLE(pci, adl_pci6208_pci_table);