Date: Wed, 21 Jan 2009 18:08:38 +0100 From: Andre Albsmeier <Andre.Albsmeier@siemens.com> To: John Baldwin <jhb@freebsd.org> Cc: Andre Albsmeier <Andre.Albsmeier@siemens.com>, freebsd-arch@freebsd.org Subject: Re: Two drivers, one physical device: How to deal with that? Message-ID: <20090121170838.GB94880@curry.mchp.siemens.de> In-Reply-To: <200901210847.05858.jhb@freebsd.org> References: <20081229212020.GA1809@curry.mchp.siemens.de> <20081229143221.X1076@desktop> <200901210847.05858.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 21-Jan-2009 at 08:47:05 -0500, John Baldwin wrote: > On Monday 29 December 2008 7:35:21 pm Jeff Roberson wrote: > > On Mon, 29 Dec 2008, Andre Albsmeier wrote: > > > > > Hello, > > > > > > I have written a driver which attaches to the host bridge in > > > order to periodically read the appropriate registers and > > > inform the user about ECC errors (ECC-Monitor). No I have > > > run across a mainboard where the host bridge is already > > > taken by the agp driver. Of course, I can detach the agp > > > driver and attach myself and everything is working but > > > what is if someone does not want to loose the agp > > > functionality? > > > > > > How does one deal with the case when two separate drivers > > > have to access the same device (the host bridge in my case)? > > > > > > I assume, the correct way would be to join the AGP and > > > ECC functionality in one driver but maybe there are other > > > tricks I am not aware of? > > > > Well I don't think it would be correct to merge two conceptually seperate > > drivers into one just to share the same device. It sounds like the right > > solution is to make a generic layer the attaches to the host bridge and > > arbitrates access to it. Then allow other device to find and communicate > > with this generic layer. For the host bridge this doesn't have to be > > particularly fancy. > > This is already the case in 7.0 and later where hostb(4) always attaches to > host bridges and agp(4) attaches to the hostb(4) devices. Thanks for the hint. I will try this as soon as I got my first 7.x system running. -Andre -- Es ist den Untertanen untersagt, den Massstab ihrer beschraenkten Einsicht an die Handlungen der Obrigkeit anzulegen. (Friedrich Wilhelm, Kurfuerst von Brandenburg, 1620 - 1688)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090121170838.GB94880>