Date: Sat, 3 Mar 2018 14:41:58 -0500 (EST) From: Daniel Eischen <deischen@freebsd.org> To: Andre Albsmeier <Andre.Albsmeier@siemens.com> Cc: freebsd-hackers@FreeBSD.org Subject: Re: Adding support for MosChip 9912 PCIe (serial/parallel) cards Message-ID: <Pine.GSO.4.64.1803031439210.20340@sea.ntplx.net> In-Reply-To: <20180303184359.GA29745@bali> References: <20180302061852.GA7887@bali> <Pine.GSO.4.64.1803020833290.14754@sea.ntplx.net> <20180303064400.GA27337@bali> <Pine.GSO.4.64.1803031051290.19549@sea.ntplx.net> <20180303184359.GA29745@bali>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 3 Mar 2018, Andre Albsmeier wrote: > On Sat, 03-Mar-2018 at 10:53:20 -0500, Daniel Eischen wrote: >> On Sat, 3 Mar 2018, Andre Albsmeier wrote: >> >>> On Fri, 02-Mar-2018 at 08:36:40 -0500, Daniel Eischen wrote: >>>> On Fri, 2 Mar 2018, Andre Albsmeier wrote: >>>> >>>>> I have a MosChip 9912 card (PCIe card with 1 parallel and 2 serial >>>>> ports) sitting here which does not get detected on 11.1. I tried >>>>> to simply add it to the uart and ppc drivers with >>>>> >>>> [ ... ] >>>> >>>> Do you try adding similar support to puc_pci_devices[] in >>>> sys/dev/puc/pucdata.c? >>> >>> Just tried that: >>> >>> @@ -1204,6 +1204,11 @@ >>> PUC_PORT_1S1P, 0x10, 4, 0, >>> }, >>> >>> +{ 0x9710, 0x9912, 0xa000, 0x3012, >>> + "NetMos NM9912 Dual UART and 1284 Printer port", >>> + DEFAULT_RCLK, >>> + PUC_PORT_2S1P, 0x10, 4, 0, >>> +}, >>> { 0x9710, 0x9865, 0xa000, 0x3012, >>> "NetMos NM9865 Dual UART and 1284 Printer port", >>> DEFAULT_RCLK, >>> >>> But the results are exactly the same. It also doesn't >>> matter if puc.ko is loaded at all. >> >> Are you sure your subvendor and subdevice are correct? I would > > No ;-). I have to use: 0x9710, 0x9912, 0xa000, 0x2000, > > Now I have the following behaviour: > > When I load puc.ko I get: > puc0: <NetMos NM9912 Dual UART and 1284 Printer port> at device 0.2 on pci9 > > If I load ppc.ko now, I get: > ppc0: parallel port not found. > > But if I unload puc and ppc and load ppc again, I get: > > ppc0: <MosChip MCS9912 PCIe to Peripheral Controller> port 0xd000-0xd007,0xd008-0xd00f mem 0x89200000-0x89200fff irq 20 at device 0.2 on pci9 > ppc0: Generic chipset (EPP/NIBBLE) in COMPATIBLE mode > ppbus0: <Parallel port bus> on ppc0 > lpt0: <Printer> on ppbus0 > lpt0: Interrupt-driven port > > For all this I have to disable /boot/device.hints -- otherwise > the messages "driver bug: Unable to set devclass" comes back. > > So I think there are two problems: > > First the settings of the ISA stuff in /boot/device.hints conflicted > with the settings the driver probed. This would be easy to solve -- > just disable them in /boot/device.hints. > > Second it appears that ppc only attaches if puc did some kind of > initialisation first. But we have to detach puc so the ppc can attach. Strange. Did you try setting puc_load="YES" in /boot/loader.conf and rebooting? Or are you just loading and unloading modules for now? -- DE
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.64.1803031439210.20340>