On 2012/10/19 12:44, William Ahern wrote:
> The puc(4) man page lists the SIIG Cyber 4S PCI as supported. I just
> inserted a SIIG Cyber 4S PCIe. I figured it would look the same as the PCI
> card, considering that the new chip is named OXPCIe954, similar to the old
> OXPCI954.
> 
> But obviously that was hopelessly naive. Instead I get:
> 
>       vendor "Oxford", unknown product 0xc208 (class communications
>       subclass serial, rev 0x00) at pci13 dev 0 function 0 not configured
> 
> It looks like the vendor id is PCI_VENDOR_OXFORD2, and not PCI_VENDOR_SIIG.
> Any pointers on what data structure and defines I should try adding? It
> looks like the actual PUC driver is simple enough, I just need the card to
> be recognized.
> 
> I'm running stock OpenBSD 5.1/amd64 on a Soekris net6501.
> 

My original mail about the chip (including diff) is at
http://marc.info/?l=openbsd-tech&m=126446213208560&w=2, there is
some problem I was unable to track down which prevents things from
working when the port is set to the correct frequency, but setting
to half the frequency gets a usable port, you just need to half
the desired baud rate of the serial port (e.g. cu -s 4800 -l cua03).

Diff there won't apply directly as things have changed since then.

The pcidevs change might apply with patch but is simple enough to
hand-apply; after doing this, run "make" in sys/dev/pci to update
the pcidevs.h/pcidevs_data.h files.

The pucdata.c table has changed format since then to save memory,
something like the below should be about right, you can't get the
speed bang-on with the new table format (rather than recording
actual speed it uses shorthand to allow multipliers or powers-of-two
of the standard COM port UART frequency 1.8432MHz; the exact needed
speed can't be stored in this notation but using a multiplier of 17
should be close enough for other ports to lock onto it - if not
then try 18). This version is untested though as I am lacking
machines with PCIe slots that I can use for testing.

        /* Oxford Semiconductor OXPCIe954 PCIe */
        {   /* "OXPCIe954", */
            {   PCI_VENDOR_OXFORD2, PCI_PRODUCT_OXFORD2_OXPCIE954,      0, 0 },
            {   0xffff, 0xffff,                                         0, 0 },
            {
                /*
                 * Clock is fixed at 62.5 MHz, derived from PCIe clock.
                 * But this doesn't work so use half the speed.
                 * XXX Number of ports should not be hard-coded, it can vary
                 * and should be fetched from BAR offset 0x0004.
                 */
                { PUC_COM_MUL(17), 0x10, 0x1000 },
                { PUC_COM_MUL(17), 0x10, 0x1200 },
                { PUC_COM_MUL(17), 0x10, 0x1400 },
                { PUC_COM_MUL(17), 0x10, 0x1600 },
            },
        },

Also the first PCIe954 chip can be connected to a companion chip(/s?)
to allow for up to 8 extra ports but you can't determine whether
this has been done just by looking at PCI IDs, you are supposed to
fetch information about how many ports are wired up from information
provided by the chip itself - however hardcoding the first 4 ports
is enough to get the 4-port card working.

Reply via email to