From owner-freebsd-bugs@FreeBSD.ORG Sat May 23 18:30:02 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FD6710656AB for ; Sat, 23 May 2009 18:30:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 5A1868FC20 for ; Sat, 23 May 2009 18:30:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n4NIU1uP072415 for ; Sat, 23 May 2009 18:30:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n4NIU1Ti072412; Sat, 23 May 2009 18:30:01 GMT (envelope-from gnats) Resent-Date: Sat, 23 May 2009 18:30:01 GMT Resent-Message-Id: <200905231830.n4NIU1Ti072412@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, David Wood Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B190F106566B for ; Sat, 23 May 2009 18:23:42 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 845CA8FC08 for ; Sat, 23 May 2009 18:23:42 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n4NINgWp050450 for ; Sat, 23 May 2009 18:23:42 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n4NINfiN050439; Sat, 23 May 2009 18:23:41 GMT (envelope-from nobody) Message-Id: <200905231823.n4NINfiN050439@www.freebsd.org> Date: Sat, 23 May 2009 18:23:41 GMT From: David Wood To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/134878: [puc] [patch] Add support for Oxford OXPCIe954 and OXPCIe958 PCI Express chips X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2009 18:30:02 -0000 >Number: 134878 >Category: kern >Synopsis: [puc] [patch] Add support for Oxford OXPCIe954 and OXPCIe958 PCI Express chips >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat May 23 18:30:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: David Wood >Release: 7.2-RELEASE amd64 >Organization: >Environment: FreeBSD manganese.wood2.org.uk 7.2-RELEASE FreeBSD 7.2-RELEASE #2: Sat May 23 10:41:30 BST 2009 david@manganese.wood2.org.uk:/scratch/usr/obj/usr/src/sys/MANGANESE amd64 >Description: puc(4) doesn't support the Oxford PCI Express Expresso family devices, which are used on many native PCI Express serial boards, such as: eMegatech MP954ER4 (4 port) and MP958ER8 (8 port) Lindy 51189 (4 port) StarTech.com PEX4S952 (4 port) and PEX8S952 (8 port) >How-To-Repeat: >Fix: A patch against 7.2-RELEASE can be found at http://www.wood2.org.uk/freebsd/oxford-pci-e-pucdata.c.7.2-release.patch - this has been tested with a Lindy 51189 board, which uses an OXPCIe954, in a Dell PowerEdge 2950 III. A patch against HEAD can be found at http://www.wood2.org.uk/freebsd/oxford-pci-e-pucdata.c.patch - this has not been tested. Whilst I'm here, I've updated the URL for manufacturer's data - Oxford Semiconductor has now been taken over by PLX Technology. The patch assumes that the number of ports are the number of ports on the chip connected to the PCI Express bus. A possible future enhancement is to read the number of UARTs from BAR 0 offset 0x4, which reflects any ports on a slave chip (this appears to be non-trivial, as bus_allocate_resource(9) hasn't been called on the BAR before the number of ports is required). Fortunately, very few designs are likely to use a slave chip, especially with the 8 port OXPCIe958 available. MSI-X support has not been attempted, though would be nice to have. Note: Oxford OXPCIe952 is most likely to appear as two separate devices, each with a single UART. I'm hopeful that uart(4) (or sio(4) if you're still using that) will recognise those UARTs without the need of a helping hand from puc(4). I haven't added support for the unlikely configuration of OXPCIe952 appearing as a single device with two UARTs, especially as I don't have a suitable boardto test with. >Release-Note: >Audit-Trail: >Unformatted: