Skip to contentSkip to conversation

Adding driver for MCS9865 to the kernel sources

DISCUSSION Karsten Malcher 3 participants 4 messages Feb 18, 2014 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

Hello,

i just want to ask why there is no working driver for the serial PCI chips MCS9865?
http://www.asix.com.tw/products.php?op=pItemdetail&PItemID=125;74;111&PLine=74

Because serial interfaces are not standard on mainboards any more, the relevance of such interface cards has increased.

It is not easy to get the driver working - e.g. on my running Debian wheezy the driver is loaded but not working. When the driver would be integrated into the kernel sources i see a good chance that it will run in the distributions.

Best regards
Karsten

#1 lore raw

Вторник, 18 февраля 2014, 11:26 +01:00 от Karsten Malcher <[email protected]>:

Quoted 9 lines

Hello,

i just want to ask why there is no working driver for the serial PCI chips MCS9865?
http://www.asix.com.tw/products.php?op=pItemdetail&PItemID=125;74;111&PLine=74

Because serial interfaces are not standard on mainboards any more, the relevance of such interface cards has increased.

It is not easy to get the driver working - e.g. on my running Debian wheezy the driver is loaded but not working. When the driver would be integrated into the kernel sources i see a good chance that it will run in the distributions.

At least for my 9835, its works without any 3rd-party drivers.

#lspci -vv
...
01:02.0 Communication controller: MosChip Semiconductor Technology Ltd. PCI 9835 Multi-I/O Controller (rev 01)
Subsystem: LSI Logic / Symbios Logic 1P2S
Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Interrupt: pin A routed to IRQ 23
Region 0: I/O ports at 8800 [size=8]
Region 1: I/O ports at 8400 [size=8]
Region 2: I/O ports at 8000 [size=8]
Region 3: I/O ports at 7800 [size=8]
Region 4: I/O ports at 7400 [size=8]
Region 5: I/O ports at 7000 [size=16]
Kernel driver in use: parport_serial
Kernel modules: parport_serial

# cat /proc/tty/driver/serial
serinfo:1.0 driver revision:
0: uart:16550A port:000003F8 irq:4 tx:11 rx:4131 brk:6 RTS|DTR
1: uart:16550A port:00008800 irq:23 tx:0 rx:0
2: uart:16550A port:00008400 irq:23 tx:21097 rx:330518 RTS

---

#2 lore raw

Am 18.02.2014 11:43, schrieb Alexander Shiyan:

Quoted 3 lines

At least for my 9835, its works without any 3rd-party drivers.

In the history it was working with older kernels previous version 3.0.

When you open the README you find this description:

To build driver on kernels from v2.6.34 till latest:
----------------------------------------------------
Since the device ID 9865 is included (as built-in) with kernel versions
starts from v2.6.34 and above, the following procedure is required to follow to detect MCS9865 devices.

b) Open file "8250_pci.c".

    - find for the macro PCI_DEVICE_ID_NETMOS_9865.  It will be found in two places,
        1) In the struct definition "serial_pci_tbl[]"
          - Comment the below lines,

        "
                {       PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865,
                        0xA000, 0x1000,
                        0, 0, pbn_b0_1_115200 },

                {       PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865,
                        0xA000, 0x3004,
                        0, 0, pbn_b0_bt_4_115200 },
        "

---------------------------------------------------------------------------------------------------

This seems to be the problem.
At least you must recompile parts of the kernel to get it running. So you can't work with the standard kernel of a distribution!

It would be very helpful if this driver would be part of the standard kernel sources.

#3 lore raw
Quoted 9 lines · Karsten Malcher

Am 18.02.2014 11:43, schrieb Alexander Shiyan:

Quoted 3 lines

At least for my 9835, its works without any 3rd-party drivers.

In the history it was working with older kernels previous version 3.0.

When you open the README you find this description:

This is the vendor readme, so it may not be the best advice. They only want to disable the in-kernel driver so that their own driver can load.

Quoted 26 lines

To build driver on kernels from v2.6.34 till latest:
----------------------------------------------------
Since the device ID 9865 is included (as built-in) with kernel versions
starts from v2.6.34 and above, the following procedure is required to follow to detect MCS9865 devices.

b) Open file "8250_pci.c".
- find for the macro PCI_DEVICE_ID_NETMOS_9865. It will be found in two
places,

        1) In the struct definition "serial_pci_tbl[]"
          - Comment the below lines,

        "
                {       PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865,
                        0xA000, 0x1000,
                        0, 0, pbn_b0_1_115200 },

                {       PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865,
                        0xA000, 0x3004,
                        0, 0, pbn_b0_bt_4_115200 },
        "

---------------------------------------------------------------------------------------------------

Quoted 6 lines

This seems to be the problem.
At least you must recompile parts of the kernel to get it running. So you can't work with the standard kernel of a distribution!

It would be very helpful if this driver would be part of the standard kernel sources.

But it _is_ in standard kernel sources; see very old commit:

commit ac6ec5b1de5d1d5afcbe88d73c05df71dca0ac39

Author: Ira W. Snyder <[email protected]>
Date:   Mon Dec 21 16:26:45 2009 -0800

serial: 8250_pci: add support for MCS9865 / SYBA 6x Serial Port Card

Maybe your problem is related to not having this very recent commit?

commit 333c085e4b0cd9df04b087d29f87969a4e26dfa9

Author: Dmitry Eremin-Solenikov <[email protected]>
Date:   Tue Feb 11 14:18:13 2014 +0400

serial: 8250_pci: unbreak last serial ports on NetMos 9865 cards

In any case, I suggest collecting the boot logs relating to your serial card and posting them here; boot with the latest kernel, and without any vendor drivers. With the right information, I suspect people here can fix the driver for your card as well.

Please also include the "lspci [-vvv]" output relating to your specific card, so that quirks can be assigned to specific cards if needed.

Paul.
--

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html