# WCH 2xCOM9 PCI addon card problems

## mansniks

I added one PCI card, which should give 2 additional serial ports, but it gives no additional /dev/ttyS*. 

First of all - should it? Or I have to hack with it by creating nodes or similar?

lspci shows: "Serial controller: Device 4348:3253 (rev 10)". 

dmesg | grep Serial

Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled.

There was also one COM9 output, which gave same 4 ports as seen by driver (driver "serial" is used), but they didn't work also. I was thinking, they are dead and got that card. Hell, how to solve that?!Last edited by mansniks on Fri Nov 28, 2008 1:21 pm; edited 1 time in total

----------

## NeddySeagoon

mansniks,

Check your kernel for the number of supported serial ports. It defualts to four, which will not include the ports on your card.

If you change it, you will need to rebuild your kernel.

----------

## mansniks

I did, but still doesn't work.

What options must be into kernel for serial IO to work ... please?

I enabled all I *saw* relevant...

----------

## NeddySeagoon

mansniks,

The options on that menu (you may need Extended Optiosn too) should be enough.

```
  │ │    <M> 8250/16550 and compatible serial support                    │ │  

  │ │    <M> 8250/16550 PCI device support                               │ │  

  │ │    < > 8250/16550 PNP device support                               │ │  

  │ │    (4) Maximum number of 8250/16550 serial ports                   │ │  

  │ │    (4) Number of 8250/16550 serial ports to register at runtime    │ │  

  │ │    [*] Extended 8250/16550 serial driver options                   │ │  

  │ │    [ ]   Support more than 4 legacy serial ports (NEW)             │ │  

  │ │    [ ]   Support for sharing serial interrupts (NEW)               │ │  

  │ │    [ ]   Autodetect IRQ on standard port
```

Read all the help too.

Be aware that resources are reserved on PCs for four serial ports, regardless of whats actually fitted so you will want to change the two '4's

[ ]   Support more than 4 legacy serial ports (NEW) may be useful too.

What does your dmesg show about things being detected?

----------

## mansniks

I have no 

<M> 8250/16550 PCI device support

option! Is kernel 2.6.25 gentoo-sources. How so?

----------

## snIP3r

hi!

i have the same hardwareconfig like yours and my kernel config looks like this:

```

#

# Serial drivers

#

CONFIG_SERIAL_8250=y

CONFIG_SERIAL_8250_CONSOLE=y

CONFIG_FIX_EARLYCON_MEM=y

CONFIG_SERIAL_8250_PCI=y

CONFIG_SERIAL_8250_PNP=y

CONFIG_SERIAL_8250_NR_UARTS=4

CONFIG_SERIAL_8250_RUNTIME_UARTS=4

CONFIG_SERIAL_8250_EXTENDED=y

# CONFIG_SERIAL_8250_MANY_PORTS is not set

CONFIG_SERIAL_8250_SHARE_IRQ=y

# CONFIG_SERIAL_8250_DETECT_IRQ is not set

# CONFIG_SERIAL_8250_RSA is not set

```

i have this card:

```

area52 ~ # lspci |grep Serial

04:00.0 Serial controller: NetMos Technology PCI 9835 Multi-I/O Controller (rev 01)

```

in my case, the irq sharing option had to be activated to make the device working... perhaps this helps...

HTH

snIP3r

----------

## mansniks

So, if that card doesn't support irq sharing, I have an useless hardware?  :Sad: 

----------

## snIP3r

 *mansniks wrote:*   

> So, if that card doesn't support irq sharing, I have an useless hardware? 

 

i dont think so. by default, irq sharing for the serial port is disabled. this was also displayed first in my config. then after enabling the option, everything runs perfect. so its worth a try...

HTH

snIP3r

----------

## mansniks

Well, but you, at least have "NetMos Technology PCI 9835 Multi-I/O Controller" instead of what I have...

If lspci can't identify hardware manufacturer, can I assume, it won't work?

----------

## snIP3r

 *mansniks wrote:*   

> Well, but you, at least have "NetMos Technology PCI 9835 Multi-I/O Controller" instead of what I have...
> 
> If lspci can't identify hardware manufacturer, can I assume, it won't work?

 

no, not at all. if lspci cannot identify it, it means only that its not in its "database". you can update it via the "update-pciids" command. i had the same issue, but after the update of the pci-ids my card was recognized. but as i wrote already, the device might work, even if lspci cannot show you details...

HTH

snIP3r

----------

## mansniks

update-pciids

lspci -v

05:01.0 Serial controller: Device 4348:3253 (rev 10) (prog-if 02 [16550])

        Subsystem: Device 4348:3253

        Flags: medium devsel, IRQ 17

        I/O ports at ec00 [size=8]

        I/O ports at e880 [size=8]

        Kernel driver in use: serial

Even manufacturer gives manual, where it is supposed to be differently. I guess, this card 

http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=250313003957

is a great crap and I have wasted my time...

The suspicious thing is: I had ugly problems with built-in serial port too and I decided, it has been burned, since connecting wires were teared.

----------

## snIP3r

have you tried to enable the irq sharing option as suggested and then try the card again?

----------

## mansniks

Incredible... This COM port thing can really drive one crazy: turns out, that ebay seller has sent me not a moschip, but WCH CH352L!

I tried sharing, yes. Well, no good.

I am finding about that WCH...

----------

## NeddySeagoon

mansniks,

In days of old when the serial port was first fitted to the PC. IRQ sharing was not permitted for any devices. 

They were all effectively on the ISA bus.

When the PCI bus was introduced, IRQ sharing was mandated, so the serial ports on your PCI card must support IRQ sharing to be PCI specification compliant.

There was a big overlap between the introduction of the PCI bus and the phasing out of old style on board serial ports.

Please check your 

```
uname -a
```

The date/time is the build date/time of the running kernel. Maybe you have not installed your kernel properly after a rebuild ?

----------

## mansniks

Some progress over here: once I cleared out, that is WCH, I found program for it, which was on a disk sent by ebay seller. 

So I run ./ch35x_80x86, it does hell knows what (it is just said to be run each time system boots) and finally my COM device is showing some signs of living.

That binary is closed source. I don't recommend this hardware even if it will work good.

Dammit!!! This took me more than month to get it working (well, not all the time for it, but...)! Awfully. The most ridiculous thing of that all is: I never had much of good choice. My suggestion for others is: ALWAYS CHECK EACH WIRE, which could be damaged!!! Perhaps, it would have saved me lots of wasted time.

----------

