From owner-cvs-all Sun Jun 11 13:39:34 2000 Delivered-To: cvs-all@freebsd.org Received: from mass.cdrom.com (adsl-63-206-88-224.dsl.snfc21.pacbell.net [63.206.88.224]) by hub.freebsd.org (Postfix) with ESMTP id CDB3637B7F8; Sun, 11 Jun 2000 13:39:27 -0700 (PDT) (envelope-from msmith@mass.cdrom.com) Received: from mass.cdrom.com (localhost [127.0.0.1]) by mass.cdrom.com (8.9.3/8.9.3) with ESMTP id NAA15090; Sun, 11 Jun 2000 13:43:28 -0700 (PDT) (envelope-from msmith@mass.cdrom.com) Message-Id: <200006112043.NAA15090@mass.cdrom.com> X-Mailer: exmh version 2.1.1 10/15/1999 To: Poul-Henning Kamp Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/musycc musycc.c In-reply-to: Your message of "Sun, 11 Jun 2000 12:09:48 PDT." <200006111909.MAA41375@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 11 Jun 2000 13:43:28 -0700 From: Mike Smith Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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