Subject: Re: Socket Dual Serial Port PCMCIA Card wouldn't work
To: Joerg Niendorf <joerg.bsd@internode.net.au>
From: Bernd Ernesti <veego@NetBSD.org>
List: current-users
Date: 11/12/2006 16:15:30
[Please note the reply-to which is set to current-users@NetBSD.org,
because netbsd-bugs@NetBSD.org is only for mails send with send-pr]

On Fri, Nov 10, 2006 at 02:49:04AM +1000, Joerg Niendorf wrote:
> Hi all,
> 
> I just spent mega-bucks on a Socket Dual Serial Port PCMCIA Card
> as I don't like those USB<->RS232 converters and this PCMCIA card
> is metioned here: http://www.netbsd.org/Hardware/pcmcia.html
> 
> I built the kernel with cbb, cardslot, cardbus, pcmcia, pcmcom and
> com support but unfortunately, the pcmcom driver, which is necessary
> for these dual-port cards, is not being configured. Consequently, no
> serial ports are available.

What do you mean with 'no' serial ports are available?
Your dmesg output says that at least one port is available:

pcmcia0: CIS checksum failed
pcmcia0: CIS version PC Card Standard 5.0
pcmcia0: CIS info: Socket, Dual I/O HS Card Win CE Rev 2.1(Legacy)
pcmcia0: Manufacturer code 0x104, product 0xa1
[..]
com2 at pcmcia0 function 0: <Socket, Dual I/O HS Card Win CE Rev 2.1(Legacy)>
com2: ns16550a, working fifo

> It looks like the product ID of this card (0xa1) differs from the
> relevant entry in src/sys/dev/pcmcia/pcmciadevs:
> product SOCKET DUAL_RS232       0x0006 Socket Communications Dual RS232

Btw I think you don't have the 'normal' rs232 card. There are two type of cards,
one is the normal one and the other is a highspeed card.

You could try to add the diffrent id to

src/sys/dev/pcmcia/pcmciadevs by copying the old entry, changing the DUAL_RS232
name to something else. e.g.

product SOCKET DUAL_RS232_HS       0x00a1 Socket Communications HighSpeed Dual RS232

Then do a 'make -f Makefile.pcmciadevs' in src/sys/dev/pcmcia.

Now you only need to add the new entry to pcmcom.c:

Look for this lines:

const struct pcmcia_product pcmcom_products[] = {
	{ PCMCIA_VENDOR_SOCKET, PCMCIA_PRODUCT_SOCKET_DUAL_RS232,
	  PCMCIA_CIS_INVALID },
}; 

and change it to:

const struct pcmcia_product pcmcom_products[] = {
	{ PCMCIA_VENDOR_SOCKET, PCMCIA_PRODUCT_SOCKET_DUAL_RS232,
	  PCMCIA_CIS_INVALID },
	{ PCMCIA_VENDOR_SOCKET, PCMCIA_PRODUCT_SOCKET_DUAL_RS232_HS,
	  PCMCIA_CIS_INVALID },
}; 

so the new HS entry should now match your card.

Let me know if this works.

Regards,
Bernd