Date: Fri, 04 Feb 2005 09:46:15 -0700 (MST) From: "M. Warner Losh" <imp@bsdimp.com> To: dfr@qubesoft.com Cc: nate@root.org Subject: Re: cvs commit: src/sys/ia64/ia64 machdep.c Message-ID: <20050204.094615.123623745.imp@bsdimp.com> In-Reply-To: <4f339e2416fad9f0baab265cec8a744d@qubesoft.com> References: <5539563a425020d35ef1878057f4f85d@qubesoft.com> <20050204.093654.114275559.imp@bsdimp.com> <4f339e2416fad9f0baab265cec8a744d@qubesoft.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <4f339e2416fad9f0baab265cec8a744d@qubesoft.com> Doug Rabson <dfr@qubesoft.com> writes: : : On 4 Feb 2005, at 16:36, M. Warner Losh wrote: : : > In message: <5539563a425020d35ef1878057f4f85d@qubesoft.com> : > Doug Rabson <dfr@qubesoft.com> writes: : > : : > : On 4 Feb 2005, at 16:14, M. Warner Losh wrote: : > : : > : > In message: <84e9ba659174ea3f7c7b2930c0ae3759@xcllnt.net> : > : > Marcel Moolenaar <marcel@xcllnt.net> writes: : > : > : > I'm not sure if my approach is correct -- should different : > drivers : > : > for : > : > : > the same hardware share the same devclass? : > : > : : > : > : A datapoint: sio(4) and uart(4) are different drivers for the : > same : > : > : hardware. : > : > : They don't share the devclass. : > : > : > : > Neither do they share the same name. : > : : > : Just to make things clear, if two drivers use the same name, they : > will : > : always share the devclass automatically (whether or not they use the : > : same variable to reference the devclass) and will allocate : > : non-conflicting unit numbers. : > : > Cool. I'd thought I'd wound up with two instances of ed0 when I had : > different devclasses in the if_ed_isa and if_ed_pci files once upon a : > time... : : This shouldn't be possible - both the driver registrations should go : through devclass_find_internal() to find their devclasses and this : always searches for an existing class before it creates one. If this : happens then its a serious bug... I think I had this problem in 4.0-current before 4.0 release. Maybe there used to be a bug, or I did something stupid... If this is the case, why then do we have the allocation of devclass in the drivers and not just leave it to subr_bus.c? Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050204.094615.123623745.imp>