Subject: Re: Socket Dual Serial Port PCMCIA Card wouldn't work
To: None <current-users@netbsd.org>
From: Sverre Froyen <sverre@viewmark.com>
List: netbsd-bugs
Date: 11/12/2006 20:04:38
On Sunday 12 November 2006 08:15, Bernd Ernesti wrote:
> [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:

While trying to get my PCMCIA modem to work (see kern/32938), I found that the 
code that results in "com2: ns16550a, working fifo" would produce that 
message even if the IO space setup was not working.  It is possible that the 
IO-space for this card suffers the same problem as described in the PR.  I am 
not sure, however, if the code in com_pcmcia.c supports cards with two 
interfaces.

> 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