Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Jun 2000 13:43:28 -0700
From:      Mike Smith <msmith@freebsd.org>
To:        Poul-Henning Kamp <phk@FreeBSD.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/dev/musycc musycc.c 
Message-ID:  <200006112043.NAA15090@mass.cdrom.com>
In-Reply-To: Your message of "Sun, 11 Jun 2000 12:09:48 PDT." <200006111909.MAA41375@freefall.freebsd.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
> phk         2000/06/11 12:09:48 PDT
> 
>   Added files:
>     sys/dev/musycc       musycc.c 
>   Log:
>   The very feeble beginnings of a driver for the LanMedia LMC1504 card.
>   
>   New-Bus wizards are encouraged to look at this, I think it poses a
>   challenge for the current newbus design.

Can you be a little more explicit about the nature of the problem?  It 
looks pretty straightforward from here...

Making some assumptions - function 0 and function 1 both describe 
resources that a single driver instance requires in order to operate 
correctly.

The attach for function 0 should allocate and fill in the softc, and flag 
it as partially complete.  The attach for function 1 should use 
devclass_get_softc to find the softc that was assigned for function 0, 
perform resource allocation etc. using it, and then return an error (so 
that no device instance is actually created for the second function).

Alternatively, you could just fail the probe for function != 0 and dig 
out the PCI resources yourself, but that would be a lot harder.

An alternate approach would be to create a parent instance and then one 
child instance for each of the functions; I haven't thought this entirely 
through though, it could get pretty messy.

It's also possible I'm missing your point here.

-- 
\\ Give a man a fish, and you feed him for a day. \\  Mike Smith
\\ Tell him he should learn how to fish himself,  \\  msmith@freebsd.org
\\ and he'll hate you for a lifetime.             \\  msmith@cdrom.com




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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