From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 8 04:28:37 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63FC5DAC for ; Sun, 8 Feb 2015 04:28:37 +0000 (UTC) Received: from ipmail06.adl6.internode.on.net (ipmail06.adl6.internode.on.net [150.101.137.145]) by mx1.freebsd.org (Postfix) with ESMTP id E428E335 for ; Sun, 8 Feb 2015 04:28:36 +0000 (UTC) Received: from ppp118-210-197-72.lns20.adl6.internode.on.net (HELO midget.dons.net.au) ([118.210.197.72]) by ipmail06.adl6.internode.on.net with ESMTP; 08 Feb 2015 14:58:33 +1030 Received: from auxxoconnd1m1.dons.net.au (AUXXOCONND1M1.dons.net.au [10.0.2.104]) (authenticated bits=0) by midget.dons.net.au (8.15.1/8.14.9) with ESMTPSA id t184STdb054140 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 8 Feb 2015 14:58:31 +1030 (CST) (envelope-from darius@dons.net.au) Subject: Re: Two drivers sharing a single PCI device Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: text/plain; charset=us-ascii From: "O'Connor, Daniel" In-Reply-To: <54D5AB87.9050309@selasky.org> Date: Sun, 8 Feb 2015 14:58:28 +1030 Content-Transfer-Encoding: quoted-printable Message-Id: References: <643918BB-810C-4FB2-AE1A-C4CDA6C8A661@dons.net.au> <54D4ABA6.805@selasky.org> <54D5AB87.9050309@selasky.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.2070.6) X-Spam-Score: -2.909 () ALL_TRUSTED,BAYES_00,T_RP_MATCHES_RCVD,URIBL_BLOCKED X-Scanned-By: MIMEDefang 2.75 on 10.0.2.1 Cc: FreeBSD Hackers X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 04:28:37 -0000 > On 7 Feb 2015, at 16:37, Hans Petter Selasky wrote: >>> You possibly want "D_TRACKCLOSE" in d_flags in your cdevsw. >>=20 >>> What's the advantage of using the debug port over the regular EHCI = USB interface? >>=20 >> I don't think that would help. It is supposed to be (largely) = separate from the regular EHCI controller - it has it's own register set = and it can steal the debug port from the regular controller so it = doesn't appear occupied (although there is a bit of messing around on = port reset). >>=20 >> The advantage is that it runs separately to the EHCI interface and it = is quite simple to talk to, there is more information in appendix C of = the USB 2 spec (usb_20.pdf). >>=20 >=20 > Hi, >=20 > You know about "sys/boot/usb" ? If you could integrate the USB debug = port to use the kernel USB stack HOST API, only limited to BULK, CONTROL = and INTERRUPT, then we could easily use it there aswell. The EHCI debug = port functions very much resemble those found in = "sys/dev/usb/controller/dwc_otg*" for example. Hmm I am not really sure what it's for.. Is it for the loader? Basically I would like to be able to run a console and GDB port over = USB, although I think it won't be quite as good as a 'real' serial one = because it will have to start later (when the PCI bus is up). FWIW I did get my driver and EHCI to attach at the same time - I = iterated over pci_devq and allocated my own softc in MOD_LOAD. The next = part is trying to get the EHCI controller from stealing back the debug = port - it gets lost on reset I think so I need to work out how to tell = it not to touch it (if possible). -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C