NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: uplcom: can only receive data

Thanks for all the responses so far.

Most probably I've found the problem:

# usbdevs -v
port 1 addr 2: full speed, power 100 mA, config 1, USB-Serial Controller D(0x2008), Prolific Technology Inc.(0x0557), rev 3.00

from src/sys/dev/usb/usbdevs:
vendor ATEN                     0x0557  ATEN International
product ATEN UC232A             0x2008  Serial adapter

whereas should be:
vendor PROLIFIC2                0x0b8c  Prolific Technology Inc
product PROLIFIC2 PL2303 0x2303 PL2303 Serial adapter (SMART Technologies)

The adapter states the wrong vendor and product ids and, as a result, the driver omits some extra initialization needed for this chip variant (in uplcom_pl2303x_init() if you are curious). When I force this extra code to be executed the adapter works fine but unfortunately breaks all older chips.

I have no idea how to deal with this problem since the current implementation ties the chip variant to the vendor and product ids.

This is how the Linux folks do it:
else if (serial->dev->descriptor.bMaxPacketSize0 == 0x40)
        type = HX;

Maybe something similiar like that is possible with our driver?

Regards, Freddy

BTW, in USB_ATTACH() (uplcom.c) there's the following idiom:

        /* determine chip type */
        for (i = 0; uplcom_devs[i].uplcom_dev.ud_vendor != 0; i++) {

but uplcom_devs[] is not NULL-terminated. Is that correct?

Home | Main Index | Thread Index | Old Index