1) Split the sioattach() routine. Leave the isa-dependent part in sioattach(), and build the bus-independent attachment function sio_attach_unit(). 2) Change the com_addr macro. Use the array of pointers, not the devclass_get_softc routine, which is inadequate for multiport adapters. 3) Change sio_pci_attach, handle multiport adapters. For a new adapter type, add a string to pci_ids[]. The adapters are parameterized by a number of ports, fifo size, hardware rts/cts support and i/o address step. Pci ports get unit numbers, starting from the last isa unit number. No sio_pci_kludge_unit() is needed. The option COM_MULTIPORT is not needed for pci multiport adapters. 4) Add sio_pci_intr() routine for handling interrupts from PCI multiport adapters. Tested on Cronyx Omega-PCI 8-channel adapter.
I tried this patch today, and I got as far as probing and attaching to an ADCOMtec 4 port PCI card. There are some problems though: Some parts of the patch rejects on -current, but that is fixable. Worse is that the pci unit number allocation is bogus. I'm not sure what the right way is and will therefore leave this alone for now. I may be able to send the ADCOMtec card to any dedicated sio hacker to keep in return for making this patch work. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD coreteam member | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.
Responsible Changed From-To: freebsd-bugs->bde Over to sio(4) maintainer.
State Changed From-To: open->closed OBE. Multiport cards are now handled by puc(4).