From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 6 03:50:46 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BEA309AA for ; Fri, 6 Feb 2015 03:50:46 +0000 (UTC) Received: from ipmail06.adl2.internode.on.net (ipmail06.adl2.internode.on.net [150.101.137.129]) by mx1.freebsd.org (Postfix) with ESMTP id 53887CC8 for ; Fri, 6 Feb 2015 03:50:45 +0000 (UTC) Received: from ppp118-210-197-72.lns20.adl6.internode.on.net (HELO midget.dons.net.au) ([118.210.197.72]) by ipmail06.adl2.internode.on.net with ESMTP; 06 Feb 2015 14:20:37 +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 t163oTIH062115 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 6 Feb 2015 14:20:34 +1030 (CST) (envelope-from darius@dons.net.au) From: "O'Connor, Daniel" Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Fri, 6 Feb 2015 14:20:29 +1030 Subject: Two drivers sharing a single PCI device To: FreeBSD Hackers Message-Id: <643918BB-810C-4FB2-AE1A-C4CDA6C8A661@dons.net.au> Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) 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 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: Fri, 06 Feb 2015 03:50:46 -0000 Hi, I am working on an EHCI debug driver and I have the basics working = (attach, probe for a debug dongle and send data back and forth) - = https://bitbucket.org/DJOConnor/dbgp However one problem remaining is that for it to work you have to detach = the EHCI driver (obviously rather suboptimal :) so I am wondering what = the best way would be to allow both ehci and dbgp to attach to the same = PCI device. The dbgp driver doesn't touch the EHCI registers once it's running but = it does have some code to start the EHCI controller and reset the port = during attach. I can modify echi so it uses RF_SHAREABLE which should allow them to get = newbus handles to the same area but the problem is that only one probe = routine gets called. Any help appreciated, thanks. -- 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