> On Dec 22, 2015, at 6:20 PM, Stuart Henderson <s...@spacehopper.org> wrote: > > On 2015-12-22, Jordon <open...@sirjorj.com <mailto:open...@sirjorj.com>> wrote: >> I have actually made some progress on this serial port card! I looked at how >> FreeBSD has it configured, tried to map the values to the OpenBSD struct, and >> actually got something working! >> >> >> >> I added the following to pcidevs: >> >> vendor PERLE 0x155f Perle >> vendor COMTROL 0x11fe Comtrol >> >> product PERLE R35583 0xb008 Speed8 LE >> product COMTROL 5002265 0x0805 RocketPort uPCI Octa >> >> >> >> I added the following to pucdata.c: >> >> { >> { PCI_VENDOR_PERLE, PCI_PRODUCT_PERLE_R35583, 0, 0 }, >> { 0xffff, 0xffff, 0, 0 }, >> { >> { PUC_COM_POW2(0), 0x10, 0x0000 }, >> { PUC_COM_POW2(0), 0x10, 0x0008 }, >> { PUC_COM_POW2(1), 0x10, 0x0010 }, >> { PUC_COM_POW2(1), 0x10, 0x0018 }, >> { PUC_COM_POW2(2), 0x10, 0x0020 }, >> { PUC_COM_POW2(2), 0x10, 0x0028 }, >> { PUC_COM_POW2(3), 0x10, 0x0030 }, >> { PUC_COM_POW2(3), 0x10, 0x0038 }, >> }, >> }, >> >> And much to my surprise, it shows up (with some issues) and when i connect 2 >> of the ports with a null modem adapter, i can cu from one to another! >> (For now, Iâm not too concerned about the RocketPort card) >> >> >> >> The dmesg looks like this: >> >> puc0 at pci0 dev 9 function 0 "Perle Speed8 LE" rev 0x00: ports: 8 com >> com4 at puc0 port 0 apic 2 int 18: st16650, 32 byte fifo >> com4: probed fifo depth: 16 bytes >> com5 at puc0 port 1 apic 2 int 18: st16650, 32 byte fifo >> com5: probed fifo depth: 16 bytes >> com6 at puc0 port 2 apic 2 int 18: st16650, 32 byte fifo >> com6: probed fifo depth: 16 bytes >> com7 at puc0 port 3 apic 2 int 18: st16650, 32 byte fifo >> com7: probed fifo depth: 16 bytes >> puc0: couldn't get subregion for port 4 >> puc0: couldn't get subregion for port 5 >> puc0: couldn't get subregion for port 6 >> puc0: couldn't get subregion for port 7 >> puc1 at pci0 dev 9 function 1 "Perle Speed8 LE" rev 0x00: ports: 8 com >> com8 at puc1 port 0 apic 2 int 18: st16650, 32 byte fifo >> com9 at puc1 port 1 apic 2 int 18: st16650, 32 byte fifo >> com10 at puc1 port 2 apic 2 int 18: st16650, 32 byte fifo >> com11 at puc1 port 3 apic 2 int 18: st16650, 32 byte fifo >> puc1: couldn't get subregion for port 4 >> puc1: couldn't get subregion for port 5 >> puc1: couldn't get subregion for port 6 >> puc1: couldn't get subregion for port 7 >> "Comtrol RocketPort uPCI Octa" rev 0x01 at pci0 dev 10 function 0 not >> configured > > Assuming you have one card not two connected, it looks like you should > set the device as 4 ports not 8.
Wow. I understood that it was 2 chips with 4 ports each, but I still set it up as an 8 port device anyway! After removing the bottom 4 devices and rebuilding/rebooting, it did this: puc0 at pci0 dev 9 function 0 "Perle Speed8 LE" rev 0x00: ports: 4 com com4 at puc0 port 0 apic 2 int 18: st16650, 32 byte fifo com4: probed fifo depth: 16 bytes com5 at puc0 port 1 apic 2 int 18: st16650, 32 byte fifo com5: probed fifo depth: 16 bytes com6 at puc0 port 2 apic 2 int 18: st16650, 32 byte fifo com6: probed fifo depth: 16 bytes com7 at puc0 port 3 apic 2 int 18: st16650, 32 byte fifo com7: probed fifo depth: 16 bytes puc1 at pci0 dev 9 function 1 "Perle Speed8 LE" rev 0x00: ports: 4 com com8 at puc1 port 0 apic 2 int 18: st16650, 32 byte fifo com9 at puc1 port 1 apic 2 int 18: st16650, 32 byte fifo com10 at puc1 port 2 apic 2 int 18: st16650, 32 byte fifo com11 at puc1 port 3 apic 2 int 18: st16650, 32 byte fifo Much better! > >> >> Now some questions: >> >> I first listed all 8 ports with PUC_COM_POW2(3) because I think I saw a >> similar device (a Boca card or something) using it. it worked fine (one of >> the ports was connected to a different machine an cu could pass text). I then >> changed the numbers passed in (to 0, 1, 2, 3) just to see if anything changed, >> and the first and second ports can still talk to each other. What exactly >> does that value do? > > Sets the clock multiplier - even if this is set wrongly a null-modem > between ports on the card will still work so be sure to test all the > ports to a different machine and make sure the speeds are right; > sometimes not all ports have the same multiplier. I will do some experimenting with the multiplier. Iâll probably just take this system with me when I go home for Christmas. >> Why do the first four ports probe to 16 bytes but not the next four? > > unsure. This is still strange. > >> This is my first real attempt at development of this type so I am pretty happy >> about this. I would love for 5.9 to have support for this card. > > It probably only needs a few tweaks so there might well be time for this. Thanks for the feedback! Jordon