Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Nov 2014 12:17:30 -0500
From:      Alexander Kabaev <kabaev@gmail.com>
To:        "O'Connor, Daniel" <darius@dons.net.au>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: Newbus question
Message-ID:  <20141115121730.3a5bac94@kan>
In-Reply-To: <EE77EB4C-E317-4EAB-9319-18F0B292571F@dons.net.au>
References:  <EE77EB4C-E317-4EAB-9319-18F0B292571F@dons.net.au>

next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_/oyipExaqpN.rvU7xy3OZF8P
Content-Type: text/plain; charset=KOI8-R
Content-Transfer-Encoding: quoted-printable

On Sat, 15 Nov 2014 17:32:39 +1030
"O'Connor, Daniel" <darius@dons.net.au> wrote:

> Hi,
> I am trying to write a driver for the EHCI debug port [1]. I found
> some userland code which I got working (written by the person who did
> the Linux version) and now I am trying to get it running in the
> kernel. One problem I have is that it needs to run in parallel with
> the normal EHCI controller. It uses the same BAR as the EHCI
> controller but offset (the offset is found in a PCI capability). I
> think I can bus_alloc_resource() if I change EHCI to allocate with
> RF_SHAREABLE but my first problem is to add another device so my
> driver doesn't contest with the EHCI driver.
>=20
> Currently I have a module which loops over bus/slot/func using
> find_bsf (is there a way to enumerate all connected PCI devices?) and
> then check each for the debug capability (I plan on being a bit
> pickier later but it works so far) then creating a child device. The
> problem is that the probe routine <missing text>
>=20

Hi,

I do not think this can be done without cooperation of the ECHI device.
You'd have to go the way of the full parent/child relationship between
ehci parent and debug port child devices. Fortunately, this is not that
hard to do and you can even define your own devmethod interfaces to make
communication between debug port decoupled, so that debug port can be
loaded and unloaded independently. The echi device already manages one
child usbus device, adding another should not be too hard.


--=20
Alexander Kabaev

--Sig_/oyipExaqpN.rvU7xy3OZF8P
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iD8DBQFUZ4quQ6z1jMm+XZYRAmnGAKCW1kPEjSclBHUkYWUZjvL2nydMIwCfZ+4n
4JJgm/FglzZfIu3lr973uk8=
=tGtX
-----END PGP SIGNATURE-----

--Sig_/oyipExaqpN.rvU7xy3OZF8P--



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