Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Feb 2015 21:03:22 -0800
From:      John-Mark Gurney <jmg@funkthat.com>
To:        "O'Connor, Daniel" <darius@dons.net.au>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: Two drivers sharing a single PCI device
Message-ID:  <20150207050322.GG58410@funkthat.com>
In-Reply-To: <643918BB-810C-4FB2-AE1A-C4CDA6C8A661@dons.net.au>
References:  <643918BB-810C-4FB2-AE1A-C4CDA6C8A661@dons.net.au>

next in thread | previous in thread | raw e-mail | index | archive | help
O'Connor, Daniel wrote this message on Fri, Feb 06, 2015 at 14:20 +1030:
> 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.

You could treat EHCI as a bridge, similar to the pcib... Your debug
driver hangs off EHCI and allocates the necessary resources through
EHCI...  I'm not sure if it'd be easier to pass the requested resource
through the normal driver frame work, of if adding a special interface
to get it would be easier/cleaner...

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150207050322.GG58410>