Date: Wed, 08 Sep 1999 16:45:46 +0800 From: Peter Wemm <peter@netplex.com.au> To: Bruce Evans <bde@zeta.org.au> Cc: "Matthew N. Dodd" <winter@jurai.net>, Bruce Evans <bde@FreeBSD.org>, dfr@nlsystems.com, cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Subject: Re: cvs commit: src/sys/alpha/conf files.alpha src/sys/i386/conf files.i386 src/sys/conf files src/sys/dev/sio sio.c src/sys/isa sio.c sioreg.h Message-ID: <19990908084546.8DA8A1CA9@overcee.netplex.com.au> In-Reply-To: Your message of "Wed, 08 Sep 1999 14:50:49 %2B1000." <Pine.BSF.4.10.9909081439330.12081-100000@alphplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans wrote: > > On Tue, 7 Sep 1999, Bruce Evans wrote: > > > Right now I'm only objecting to the misorganisation in /dev. I have > > > objected to it before :-). I don't want directories with 1 or 2 files > > > in them. The bus-independent part of the sio driver probably needs 2 > > > files, sio.c and siovar.h (not the existing sioreg.h). > > > > Right now sys/dev/sio has 1 or 2 files. > > > > In the future it will have as many as 10. > > > > sio_isa.c > > sio_pci.c > > sio_mca.c > > sio_eisa.c > > > > etc... > > I hope not. At the moment there are things like this: com->loses_outints = COM_LOSESOUTINTS(flags) != 0; com->no_irq = isa_get_irq(dev) < 0; # <<<<< com->tx_fifo_size = 1; which are scattered throughout the probe/attach code. Would you rather: com->loses_outints = COM_LOSESOUTINTS(flags) != 0; #if NISA > 0 if (com->busmode == COM_ISA) com->no_irq = isa_get_irq(dev) < 0; #endif #if NEISA > 0 if (com->busmode == COM_EISA) com->no_irq = rman_get_start(com->irqres) < 0; #endif #if NPCI > 0 if (com->busmode == COM_PCI) .... #endif .. NMCA .. NPCCARD .. etc. com->tx_fifo_size = 1; .. or would you prefer it being done properly? > > Keeping all the files for a particular driver in 1 place and not all > > spread out makes propogating changes to the various files a little easier > > to manage no? > > No :-). > > Changes should rarely need to be propagated if the core is properly > designed. E.g., in my cy driver, which is similar to sio, I rarely > had to even look at cy_pci.c. .. cy.c/cy_pci.c are are a near perfect example of what we want to do. Things like com_addr() etc would be fixed to not call external functions, the newbus stuff wouldn't intrude on the probe/attach code and so on. > Bruce Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au 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?19990908084546.8DA8A1CA9>