Date: Fri, 07 Apr 2000 13:07:57 -0600 From: Warner Losh <imp@village.org> To: Paul Richards <paul@originative.co.uk> Cc: new-bus@FreeBSD.ORG Subject: Re: Driver source location Message-ID: <200004071907.NAA01401@harmony.village.org> In-Reply-To: Your message of "Fri, 07 Apr 2000 19:42:06 BST." <38EE2BFE.B696AD7@originative.co.uk> References: <38EE2BFE.B696AD7@originative.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <38EE2BFE.B696AD7@originative.co.uk> Paul Richards writes: : Why not put everything in /sys/dev and if we need to subdivide do it on : the basis of function, and then subdivide each driver on the basis of : either bus or arch as necessary. That's the idea. : e.g. : /sys/dev/lnc : for generic lnc code : /sys/dev/lnc/pci : for PCI bus code : /sys/dev/lnc/isa : for ISA bus code There's no need to have a separate file for the bus stuff. It is almost never large enough to warrant anything but its own file. In this case you'd have sys/dev/lnc with if_lnc.c being the main driver, if_lnc_isa.c being the isa attachment, if_lnc_pccard.c being for the pccard attachment, if_lnc_pci.c being for the pci attachment. Generally if_lncvar.h is for driver internal defines (softc, things like that) and if_lncreg.h is for the hardware description of an lnc. : A lot of the drivers already do this unless they are not multi-bus, in : which case they seem to live in the /sys/pci directory (or equivalent). : This scattering seems rather pointless and if another bus gets supported : later it gets even more messy. The sys/pci really should be broken up. And it should be sys/dev/pci, but too many people whined when I suggested that. Ditto for sys/isa. : While I'm rambling, the newbusification is also a little haphazard, some : drivers have hooked into the newbus probing mechanism but not the new : style resource management. I think a driver should be moved over : entirely to the new code before it can be said to have been newbusified. True, but there is a small matter of only having so many hours in the day. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-new-bus" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200004071907.NAA01401>