Two drivers, one physical device: How to deal with that?

Jeff Roberson jroberson at jroberson.net
Tue Dec 30 00:38:19 UTC 2008


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.

I am curious; how do you test the ECC functionality?  Is there a way to 
induce an error?

Thanks,
Jeff

>
> Thanks,
>
> 	-Andre
> _______________________________________________
> freebsd-arch at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-arch
> To unsubscribe, send any mail to "freebsd-arch-unsubscribe at freebsd.org"
>


More information about the freebsd-arch mailing list