From owner-freebsd-hackers@freebsd.org Fri Mar 2 06:23:31 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F06D2F2812C for ; Fri, 2 Mar 2018 06:23:30 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from goliath.siemens.de (goliath.siemens.de [192.35.17.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "goliath.siemens.de", Issuer "Siemens Issuing CA Internet Server 2017" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7287A6F5F6 for ; Fri, 2 Mar 2018 06:23:30 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id w226Ir57002891 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 2 Mar 2018 07:18:53 +0100 Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.40.130]) by mail1.siemens.de (8.15.2/8.15.2) with ESMTP id w226IrDZ016543 for ; Fri, 2 Mar 2018 07:18:53 +0100 Received: (from user@localhost) by curry.mchp.siemens.de (8.15.2/8.15.2) id w226IrbW098668; Date: Fri, 2 Mar 2018 07:18:52 +0100 From: Andre Albsmeier To: freebsd-hackers@FreeBSD.org Cc: Andre.Albsmeier@siemens.com Subject: Adding support for MosChip 9912 PCIe (serial/parallel) cards Message-ID: <20180302061852.GA7887@bali> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Mar 2018 06:23:31 -0000 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 --- sys/dev/uart/uart_bus_pci.c.ORI 2018-02-12 06:17:57.000000000 +0100 +++ sys/dev/uart/uart_bus_pci.c 2018-03-01 18:27:05.212040000 +0100 @@ -158,6 +158,8 @@ "MosChip MCS9904 PCIe to Peripheral Controller", 0x10 }, { 0x9710, 0x9922, 0xa000, 0x1000, "MosChip MCS9922 PCIe to Peripheral Controller", 0x10 }, +{ 0x9710, 0x9912, 0xa000, 0x1000, + "MosChip MCS9912 PCIe to Peripheral Controller", 0x10 }, { 0xdeaf, 0x9051, 0xffff, 0, "Middle Digital PC Weasel Serial Port", 0x10 }, { 0xffff, 0, 0xffff, 0, NULL, 0, 0} }; and --- sys/dev/ppc/ppc_pci.c.ORI 2017-09-03 17:55:53.000000000 +0200 +++ sys/dev/ppc/ppc_pci.c 2018-03-01 18:27:23.000000000 +0100 @@ -93,6 +93,7 @@ { 0x98659710, "MosChip MCS9865 1284 Printer port", 0x10 }, { 0x99009710, "MosChip MCS9900 PCIe to Peripheral Controller", 0x10 }, { 0x99019710, "MosChip MCS9901 PCIe to Peripheral Controller", 0x10 }, + { 0x99129710, "MosChip MCS9912 PCIe to Peripheral Controller", 0x10 }, { 0xffff } }; Now, when loading ppc.ko and uart.ko it gives me in dmesg: ppc1: port 0xd010-0xd017,0xd000-0xd007 mem 0x89201000-0x89201fff,0x89200000-0x89200fff irq 20 at device 0.2 on pci9 ppc1: Generic chipset (EPP/NIBBLE) in COMPATIBLE mode ppbus0: on ppc1 lpt0: on ppbus0 lpt0: Interrupt-driven port driver bug: Unable to set devclass (class: ppc devname: (unknown)) ppc0: parallel port not found. ppc0: parallel port not found. uart2: port 0xd030-0xd037 mem 0x89205000-0x89205fff,0x89204000-0x89204fff irq 22 at device 0.0 on pci9 uart3: port 0xd020-0xd027 mem 0x89203000-0x89203fff,0x89202000-0x89202fff irq 23 at device 0.1 on pci9 driver bug: Unable to set devclass (class: uart devname: (unknown)) driver bug: Unable to set devclass (class: uart devname: (unknown)) driver bug: Unable to set devclass (class: ppc devname: (unknown)) uart4: <16550 or compatible> port 0x3e8-0x3ef irq 7 on acpi0 What am I missing here?